Method Summary |
|
public void | addDataTypeDefinition(String typeName, Class typeClass) Adds a new datatype definition.
Attempting to override an existing definition with an
equivalent one (i.e. |
public void | addDataTypeDefinition(AntTypeDefinition def) Describe addDataTypeDefinition method here. |
public void | addTaskDefinition(String taskName, Class taskClass) Adds a new task definition to the project.
Attempting to override an existing definition with an
equivalent one (i.e. |
public void | checkTaskClass(Class taskClass) Checks whether or not a class is suitable for serving as Ant task.
Ant task implementation classes must be public, concrete, and have
a no-arg constructor.
Parameters: taskClass - The class to be checked.Must not be null . exception: BuildException - if the class is unsuitable for being an Anttask. |
public Object | createComponent(UnknownElement ue, String ns, String componentType) Factory method to create the components.
This should be called by UnknownElement.
Parameters: ue - The Unknown Element creating this component. Parameters: ns - Namespace URI. |
public Object | createComponent(String componentName) Create an object for a component.
Parameters: componentName - the name of the component, ifthe component is in a namespace, thename is prefixed with the namespace uri and ":". |
public Object | createDataType(String typeName) Creates a new instance of a data type.
Parameters: typeName - The name of the data type to create an instance of.Must not be null . |
public Task | createTask(String taskType) Creates a new instance of a task.
Called from Project.createTask(), which can be called by tasks.
Parameters: taskType - The name of the task to create an instance of.Must not be null . |
public String | diagnoseCreationFailure(String componentName, String type) Handler called to do decent diagnosis on instantiation failure. |
public void | enterAntLib(String uri) Called at the start of processing an antlib. |
public void | exitAntLib() Called at the end of processing an antlib. |
public Hashtable | getAntTypeTable() Returns the current datatype definition hashtable. |
public Class | getComponentClass(String componentName) Return the class of the component name.
Parameters: componentName - the name of the component, ifthe component is in a namespace, thename is prefixed with the namespace uri and ":". |
public static ComponentHelper | getComponentHelper(Project project) Find a project component for a specific project, creating
it if it does not exist.
Parameters: project - the project. |
public String | getCurrentAntlibUri() |
public Hashtable | getDataTypeDefinitions() Returns the current type definition hashtable. |
public AntTypeDefinition | getDefinition(String componentName) Return the antTypeDefinition for a componentName.
Parameters: componentName - the name of the component. |
public String | getElementName(Object element) Returns a description of the type of the given element.
This is useful for logging purposes.
Parameters: element - The element to describe.Must not be null . |
public String | getElementName(Object o, boolean brief) Returns a description of the type of the given element.
This is useful for logging purposes.
Parameters: o - The element to describe.Must not be null . Parameters: brief - whether to use a brief description. |
public static String | getElementName(Project p, Object o, boolean brief) Convenient way to get some element name even when you may not have a
Project context.
Parameters: p - The optional Project instance. Parameters: o - The element to describe.Must not be null . Parameters: brief - whether to use a brief description. |
public ComponentHelper | getNext() Get the next chained component helper. |
public Hashtable | getTaskDefinitions() Returns the current task definition hashtable. |
public void | initDefaultDefinitions() This method is initialization code implementing the original ant component
loading from /org/apache/tools/ant/taskdefs/default.properties
and /org/apache/tools/ant/types/default.properties. |
public void | initSubProject(ComponentHelper helper) Used with creating child projects. |
public void | setNext(ComponentHelper next) Set the next chained component helper. |
public void | setProject(Project project) Sets the project for this component helper. |