| Modifier and Type | Class and Description |
|---|---|
| public static class | ScriptDef.Attribute
Class representing an attribute definition |
| public static class | ScriptDef.NestedElement
Class to represent a nested element definition |
| Modifier and Type | Field and Description |
|---|---|
| private List | attributes
Attributes definitions of this script |
| private Set | attributeSet
The attribute names as a set |
| private ScriptRunnerHelper | helper
script runner helper |
| private String | name
the name by which this script will be activated |
| private Map | nestedElementMap
The nested element definitions indexed by their names |
| private List | nestedElements
Nested Element definitions of this script |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addAttribute(ScriptDef.
the attribute definition. attributeAdds an attribute definition to this script. |
| public void | addElement(ScriptDef.
the nested element definition. nestedElementAdds a nested element definition. |
| public void | |
| public Object | Returns: object representing the element name.the name of the nested element. elementName)Creates a nested element to be configured. |
| public void | |
| public void | |
| public void | executeScript(Map<String, String>
collection of attributes attributes, Map<String, List<Object>> a list of nested element values. elements, ScriptDefBase the script instance; can be null instance)Executes the script. |
| public boolean | Returns: true if the attribute is supported by the script.the name of the attribute. attributeName)Indicates whether the task supports a given attribute name |
| private Map | Returns: the current script repository registered as a reference.Finds or creates the script repository - it is stored in the project. |
| public void | setCompiled(boolean
enables the script compilation if available. compiled)Defines the compilation feature; optional. |
| public void | setEncoding(String
the encoding of the file containing the script source. encoding)Sets the encoding of the script from an external file; optional. |
| public void | setLanguage(String
the scripting language name for the script. language)Defines the language (required). |
| public void | |
| public void | |
| public void | |
| public void | setProject(Project
the project that this definition belongs to. project)
Set the project.
|
| public void | |
| public void | |
| private Map |
| attributes | back to summary |
|---|---|
| private List<ScriptDef. Attributes definitions of this script | |
| attributeSet | back to summary |
|---|---|
| private Set<String> attributeSet The attribute names as a set | |
| helper | back to summary |
|---|---|
| private ScriptRunnerHelper helper script runner helper | |
| name | back to summary |
|---|---|
| private String name the name by which this script will be activated | |
| nestedElementMap | back to summary |
|---|---|
| private Map<String, ScriptDef. The nested element definitions indexed by their names | |
| nestedElements | back to summary |
|---|---|
| private List<ScriptDef. Nested Element definitions of this script | |
| ScriptDef | back to summary |
|---|---|
| public ScriptDef() Create a new | |
| add | back to summary |
|---|---|
| public void add(ResourceCollection resource) Adds any source resource.
| |
| addAttribute | back to summary |
|---|---|
| public void addAttribute(ScriptDef. Adds an attribute definition to this script. | |
| addElement | back to summary |
|---|---|
| public void addElement(ScriptDef. Adds a nested element definition.
| |
| addText | back to summary |
|---|---|
| public void addText(String text) Sets the script text.
| |
| createNestedElement | back to summary |
|---|---|
| public Object createNestedElement(String elementName) Creates a nested element to be configured. | |
| execute | back to summary |
|---|---|
| public void execute() Overrides org. Defines the script.
| |
| executeScript | back to summary |
|---|---|
| public void executeScript(Map<String, String> attributes, Map<String, List<Object>> elements)
Deprecated since 1.7. Use executeScript(attribute, elements, instance) instead. Executes the script. | |
| executeScript | back to summary |
|---|---|
| public void executeScript(Map<String, String> attributes, Map<String, List<Object>> elements, ScriptDefBase instance) Executes the script. This is called by the script instance to execute the script for this definition. | |
| isAttributeSupported | back to summary |
|---|---|
| public boolean isAttributeSupported(String attributeName) Indicates whether the task supports a given attribute name
| |
| lookupScriptRepository | back to summary |
|---|---|
| private Map Finds or creates the script repository - it is stored in the project.
This method is synchronized on the project under | |
| setCompiled | back to summary |
|---|---|
| public void setCompiled(boolean compiled) Defines the compilation feature; optional.
| |
| setEncoding | back to summary |
|---|---|
| public void setEncoding(String encoding) Sets the encoding of the script from an external file; optional.
| |
| setLanguage | back to summary |
|---|---|
| public void setLanguage(String language) Defines the language (required).
| |
| setManager | back to summary |
|---|---|
| public void setManager(String manager)
Deprecated
Defines the manager.
| |
| setManager | back to summary |
|---|---|
| public void setManager(ScriptManager manager) Set the script manager. | |
| setName | back to summary |
|---|---|
| public void setName(String name) Sets the name under which this script will be activated in a build file
| |
| setProject | back to summary |
|---|---|
| public void setProject(Project project) Overrides org. Set the project. | |
| setSetBeans | back to summary |
|---|---|
| public void setSetBeans(boolean setBeans) Set the setbeans attribute. If this is true, <script> will create variables in the script instance for all properties, targets and references of the current project. It this is false, only the project and self variables will be set. The default is true.
| |
| setSrc | back to summary |
|---|---|
| public void setSrc(File file) Loads the script from an external file; optional.
| |
| withDefault | back to summary |
|---|---|
| private Map | |
| Modifier and Type | Field and Description |
|---|---|
| private String | defaultValue
The attribute's default value |
| private String | name
The attribute name |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv String | |
| pack-priv String | |
| pack-priv boolean | |
| public void | |
| public void |
| defaultValue | back to summary |
|---|---|
| private String defaultValue The attribute's default value | |
| name | back to summary |
|---|---|
| private String name The attribute name | |
| Attribute | back to summary |
|---|---|
| public Attribute() | |
| getDefault | back to summary |
|---|---|
| pack-priv String getDefault() Get the default value of this | |
| getName | back to summary |
|---|---|
| pack-priv String getName() Get the name of this | |
| hasDefault | back to summary |
|---|---|
| pack-priv boolean hasDefault() Learn whether this
| |
| setDefault | back to summary |
|---|---|
| public void setDefault(String defaultValue) Set the default value of this | |
| setName | back to summary |
|---|---|
| public void setName(String name) Sets the attribute name.
| |
| Modifier and Type | Field and Description |
|---|---|
| private String | className
The class to be created for this nested element |
| private String | name
The name of the nested element |
| private String | type
The Ant type to which this nested element corresponds. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | setClassName(String
the name of the class to use for this nested
element. className)Sets the classname of the class to be used for the nested element. |
| public void | |
| public void |
| className | back to summary |
|---|---|
| private String className The class to be created for this nested element | |
| name | back to summary |
|---|---|
| private String name The name of the nested element | |
| type | back to summary |
|---|---|
| private String type The Ant type to which this nested element corresponds. | |
| NestedElement | back to summary |
|---|---|
| public NestedElement() | |
| setClassName | back to summary |
|---|---|
| public void setClassName(String className) Sets the classname of the class to be used for the nested element. This specifies the class directly and is an alternative to specifying the Ant type name.
| |
| setName | back to summary |
|---|---|
| public void setName(String name) Sets the tag name for this nested element
| |
| setType | back to summary |
|---|---|
| public void setType(String type) Sets the type of this element. This is the name of an Ant task or type which is to be used when this element is to be created. This is an alternative to specifying the class name directly
| |