org.apache.tools.ant
public class RuntimeConfigurable extends Object implements Serializable
Constructor Summary | |
---|---|
RuntimeConfigurable(Object proxy, String elementTag)
Sole constructor creating a wrapper for the specified object.
|
Method Summary | |
---|---|
void | addChild(RuntimeConfigurable child)
Adds a child element to the wrapped element.
|
void | addText(String data)
Adds characters from #PCDATA areas to the wrapped element.
|
void | addText(char[] buf, int start, int count)
Adds characters from #PCDATA areas to the wrapped element.
|
void | applyPreSet(RuntimeConfigurable r)
Apply presets, attributes and text are set if not currently set.
nested elements are prepended.
|
Hashtable | getAttributeMap() Return the attribute map.
|
AttributeList | getAttributes()
Returns the list of attributes for the wrapped element.
|
Enumeration | getChildren()
Returns an enumeration of all child wrappers. |
String | getElementTag()
Returns the tag name of the wrapped element.
|
String | getPolyType()
get the polymorphic type for this element |
Object | getProxy()
Get the object for which this RuntimeConfigurable holds the configuration
information
|
StringBuffer | getText() Get the text content of this element. |
void | maybeConfigure(Project p)
Configures the wrapped element and all its children.
|
void | maybeConfigure(Project p, boolean configureChildren)
Configures the wrapped element. |
void | reconfigure(Project p)
Reconfigure the element, even if it has already been configured.
|
void | setAttribute(String name, String value)
Set an attribute to a given value
|
void | setAttributes(AttributeList attributes)
Sets the attributes for the wrapped element.
|
void | setPolyType(String polyType)
set the polymorphic type for this element |
void | setProxy(Object proxy)
Sets the element to configure.
|
Parameters: proxy The element to configure. Must not be null
. elementTag The tag name generating this element.
Should not be null
.
Parameters: child The child element wrapper to add to this one.
Must not be null
.
Parameters: data Text to add to the wrapped element.
Should not be null
.
Parameters: buf A character array of the text within the element.
Must not be null
. start The start element in the array. count The number of characters to read from the array.
Parameters: r a RuntimeConfigurable
value
Returns: Attribute name to attribute value map
Since: Ant 1.6
Deprecated: Deprecated since Ant 1.6 in favor of {@link #getAttributeMap}.
Returns the list of attributes for the wrapped element.Returns: An AttributeList representing the attributes defined in the
XML for this element. May be null
.
Returns: an enumeration of the child wrappers.
Since: Ant 1.6
Returns: The tag name of the wrapped element. This is unlikely
to be null
, but may be.
Returns: the ant component type name, null if not set
Returns: the object whose configure is held by this instance.
Returns: the text content of this element.
Since: Ant 1.6
id
attribute, a reference
is added to the project as well.
Parameters: p The project containing the wrapped element.
Must not be null
.
Throws: BuildException if the configuration fails, for instance due to invalid attributes or children, or text being added to an element which doesn't accept it.
id
attribute, a reference
is added to the project as well.
Parameters: p The project containing the wrapped element.
Must not be null
.
configureChildren Whether to configure child elements as
well. if true, child elements will be configured after the
wrapped element.
Throws: BuildException if the configuration fails, for instance due to invalid attributes or children, or text being added to an element which doesn't accept it.
Parameters: p the project instance for this configuration.
Parameters: name the name of the attribute. value the attribute's value.
Deprecated:
Sets the attributes for the wrapped element.Parameters: attributes List of attributes defined in the XML for this
element. May be null
.
Parameters: polyType the ant component type name, null if not set
Parameters: proxy The element to configure. Must not be null
.