Class ExtensionCodeEditor.FunctionHeaderBuilder
- java.lang.Object
- 
- com.inductiveautomation.ignition.designer.scripteditor.component.ExtensionCodeEditor.FunctionHeaderBuilder
 
- 
- Enclosing class:
- ExtensionCodeEditor
 
 public static class ExtensionCodeEditor.FunctionHeaderBuilder extends java.lang.ObjectHelper class to build nicely formatted extension-function style def lines and docstring comments
- 
- 
Constructor SummaryConstructors Constructor Description FunctionHeaderBuilder()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtensionCodeEditor.FunctionHeaderBuilderaddSelf()Call this if you need a "self" argumentExtensionCodeEditor.FunctionHeaderBuilderarg(java.lang.String argName, java.lang.String argDescription)Adds an argument.ExtensionCodeEditor.FunctionHeaderBuilderargFromSchema(java.lang.String argName, JsonSchema schema)Adds an argument.java.lang.Stringbuild()Builds the header and docstring with a default width of 80java.lang.Stringbuild(int width)Builds the header and docstring.ExtensionCodeEditor.FunctionHeaderBuilderdefaultImpl(java.lang.String defaultImpl)Call this to provide a default implementation for the functionExtensionCodeEditor.FunctionHeaderBuilderdesc(java.lang.String desc)Gives the function a descriptionExtensionCodeEditor.FunctionHeaderBuildername(java.lang.String name)Sets the function name
 
- 
- 
- 
Method Detail- 
namepublic ExtensionCodeEditor.FunctionHeaderBuilder name(java.lang.String name) Sets the function name
 - 
descpublic ExtensionCodeEditor.FunctionHeaderBuilder desc(java.lang.String desc) Gives the function a description
 - 
argpublic ExtensionCodeEditor.FunctionHeaderBuilder arg(java.lang.String argName, java.lang.String argDescription) Adds an argument. Arguments will be listed in the order added, with the exception of 'self' if included, which will always be first.
 - 
argFromSchemapublic ExtensionCodeEditor.FunctionHeaderBuilder argFromSchema(java.lang.String argName, JsonSchema schema) Adds an argument. Arguments will be listed in the order added, with the exception of 'self' if included, which will always be first. Extracts (recursively) information about the argument from the schema provided.
 - 
defaultImplpublic ExtensionCodeEditor.FunctionHeaderBuilder defaultImpl(java.lang.String defaultImpl) Call this to provide a default implementation for the function
 - 
addSelfpublic ExtensionCodeEditor.FunctionHeaderBuilder addSelf() Call this if you need a "self" argument
 - 
buildpublic java.lang.String build() Builds the header and docstring with a default width of 80
 - 
buildpublic java.lang.String build(int width) Builds the header and docstring.- Parameters:
- width- The width of the output
 
 
- 
 
-