org.apache.tools.ant
public class TaskAdapter extends Task implements TypeAdapter
| Constructor Summary | |
|---|---|
| TaskAdapter()
No-arg constructor for reflection. | |
| TaskAdapter(Object proxy)
Constructor for given proxy.
| |
| Method Summary | |
|---|---|
| void | checkProxyClass(Class proxyClass)
Check if the proxy class is a valid class to use
with this adapter.
|
| static void | checkTaskClass(Class taskClass, Project project)
Checks whether or not a class is suitable to be adapted by TaskAdapter.
|
| void | execute()
Executes the proxied task.
|
| Object | getProxy()
Returns the target object being proxied.
|
| void | setProxy(Object o)
Sets the target object to proxy for.
|
myTaskContainer.addTask( new TaskAdapter(myProxy) );
Parameters: proxy The object which Ant should use as task.
Parameters: proxyClass the class to check.
Parameters: taskClass Class to test for suitability.
Must not be null. project Project to log warnings/errors to.
Must not be null.
See Also: checkTaskClass
Throws: BuildException if the project could not be set or the method could not be executed.
Returns: the target proxy object.
Parameters: o The target object. Must not be null.