|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.leafcutter.core.TaskRunner
public class TaskRunner
The main class in the Leafcutter API. The most important method is run(...) which allows you to execute an Ant task.
See the Leafcutter User Guide for more information.
Field Summary | |
---|---|
protected static java.lang.String |
DEFAULT_TASKS
|
protected static java.lang.String |
DEFAULT_TYPES
|
Method Summary | |
---|---|
static void |
addReference(java.lang.String refid,
java.lang.String declaration)
Add a reference with no properties. |
static void |
addReference(java.lang.String refid,
java.lang.String declaration,
java.lang.Object arg1)
Add a reference with one property. |
static void |
addReference(java.lang.String refid,
java.lang.String declaration,
java.lang.Object[] args)
Define a reference to type in the Leafcutter runtime. |
static void |
addReference(java.lang.String refid,
java.lang.String declaration,
java.lang.Object arg1,
java.lang.Object arg2)
Add a reference with two properties. |
static void |
addReference(java.lang.String refid,
java.lang.String declaration,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Add a reference with three properties. |
static void |
addReference(java.lang.String refid,
java.lang.String declaration,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3,
java.lang.Object arg4)
Add a reference with four properties. |
static void |
addTaskDef(java.lang.String taskName,
java.lang.String className)
Define an Ant task in the Leafcutter runtime. |
static void |
addTaskDefs(java.io.InputStream is)
Define all tasks in a properties file in the Leafcutter runtime. |
static void |
addTypeDef(java.lang.String typeName,
java.lang.String className)
Define an Ant type in the Leafcutter runtime. |
static void |
addTypeDefs(java.io.InputStream is)
Define all types in a properties file in the Leafcutter runtime. |
static java.util.Map |
getAntProjectProperties()
Get the values of the Ant properties which have been set as the result of executing some task, |
static java.lang.String |
getAntProjectProperty(java.lang.String name)
Get the value of an Ant property which has been set as the result of executing some task, e.g. |
static Logger |
getLogger()
Returns the singleton logger, allowing your application to write to the same logs as the Ant tasks that it uses. |
static org.apache.tools.ant.Project |
getProject()
Returns the singleton Project subclass which is used by all Ant tasks executed by Leafcutter |
static void |
main(java.lang.String[] args)
|
static void |
removeReference(java.lang.String refid)
Remove a previously-defined reference from the Leafcutter runtime. |
static java.lang.String |
run(java.lang.String antCommand)
Run an Ant task with no properties. |
static java.lang.String |
run(java.lang.String antCommand,
java.lang.Object arg1)
Run an Ant task with one property. |
static java.lang.String |
run(java.lang.String antCommand,
java.lang.Object[] args)
Run an Ant task. |
static java.lang.String |
run(java.lang.String antCommand,
java.lang.Object arg1,
java.lang.Object arg2)
Run an Ant task with two properties. |
static java.lang.String |
run(java.lang.String antCommand,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Run an Ant task with three properties. |
static java.lang.String |
run(java.lang.String antCommand,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3,
java.lang.Object arg4)
Run an Ant task with four properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String DEFAULT_TASKS
protected static final java.lang.String DEFAULT_TYPES
Method Detail |
---|
public static void addTypeDef(java.lang.String typeName, java.lang.String className)
typeName
- used to refer to the type inside commands passed to run() or
declarations passed to addReference()className
- fully qualifed name of the class implementing the type.public static void addTaskDef(java.lang.String taskName, java.lang.String className)
taskName
- used to refer to the task inside command strings passed to run()className
- fully qualifed name of the class implementing the task.public static void addTypeDefs(java.io.InputStream is) throws java.io.IOException
is
- an InputStream created from the properties file
java.io.IOException
- problem loading properties from the filepublic static void addTaskDefs(java.io.InputStream is) throws java.io.IOException
is
- an InputStream created from the properties file
java.io.IOException
- problem loading properties from the filepublic static void addReference(java.lang.String refid, java.lang.String declaration) throws TaskRunnerException
TaskRunnerException
addReference(String, String, Object[])
public static void addReference(java.lang.String refid, java.lang.String declaration, java.lang.Object arg1) throws TaskRunnerException
TaskRunnerException
addReference(String, String, Object[])
public static void addReference(java.lang.String refid, java.lang.String declaration, java.lang.Object arg1, java.lang.Object arg2) throws TaskRunnerException
TaskRunnerException
addReference(String, String, Object[])
public static void addReference(java.lang.String refid, java.lang.String declaration, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3) throws TaskRunnerException
TaskRunnerException
addReference(String, String, Object[])
public static void addReference(java.lang.String refid, java.lang.String declaration, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4) throws TaskRunnerException
TaskRunnerException
addReference(String, String, Object[])
public static void addReference(java.lang.String refid, java.lang.String declaration, java.lang.Object[] args) throws TaskRunnerException
refid
- the handle on the referencedeclaration
- the declaration string. See the Leafcutter User Guide for syntaxargs
- the arguments that are referred to by expressions like ${1} in the declaration
TaskRunnerException
- a problem occurred when parsing the declaration.public static void removeReference(java.lang.String refid)
refid
- the handle on the referencepublic static java.lang.String run(java.lang.String antCommand) throws TaskRunnerException
TaskRunnerException
run(String, Object[])
public static java.lang.String run(java.lang.String antCommand, java.lang.Object arg1) throws TaskRunnerException
TaskRunnerException
run(String, Object[])
public static java.lang.String run(java.lang.String antCommand, java.lang.Object arg1, java.lang.Object arg2) throws TaskRunnerException
TaskRunnerException
run(String, Object[])
public static java.lang.String run(java.lang.String antCommand, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3) throws TaskRunnerException
TaskRunnerException
run(String, Object[])
public static java.lang.String run(java.lang.String antCommand, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4) throws TaskRunnerException
TaskRunnerException
run(String, Object[])
public static java.lang.String run(java.lang.String antCommand, java.lang.Object[] args) throws TaskRunnerException
antCommand
- the command string. See the Leafcutter User Guide for syntaxargs
- the arguments that are referred to by expressions like ${1} in the command
TaskRunnerException
- a problem was encountered when initialising the taskpublic static java.lang.String getAntProjectProperty(java.lang.String name)
name
- the name of the property
public static java.util.Map getAntProjectProperties()
public static Logger getLogger()
public static org.apache.tools.ant.Project getProject()
public static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |