com.googlecode.lightest.core
Class SimpleApi
java.lang.Object
com.googlecode.lightest.core.SimpleApi
- All Implemented Interfaces:
- IDomainSpecificApi, groovy.lang.GroovyObject
public class SimpleApi
- extends Object
- implements groovy.lang.GroovyObject, IDomainSpecificApi
A simple IDomainSpecificApi implementation that creates tasks from the
package named by the parameter passed to the constructor, or added via
addPackage(). The class loader used to load the task classes is passed in as
the first argument to all constructors. If the object is passed into the
constructor is not a class loader, the class loader for that object's class
will be used.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleApi
public SimpleApi()
SimpleApi
public SimpleApi(ClassLoader classLoader)
SimpleApi
public SimpleApi(String packageName)
SimpleApi
public SimpleApi(ClassLoader classLoader,
String packageName)
addPackage
public void addPackage(String packageName)
- Adds another package whose tasks to include in the API.
getTask
public ITask getTask(String name)
- Description copied from interface:
IDomainSpecificApi
- Returns a task, if the task is defined in this API. Returns null
otherwise.
- Specified by:
getTask in interface IDomainSpecificApi
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClass in interface groovy.lang.GroovyObject
setMetaClass
public void setMetaClass(groovy.lang.MetaClass metaClass)
- Specified by:
setMetaClass in interface groovy.lang.GroovyObject
invokeMethod
public Object invokeMethod(String name,
Object args)
- Specified by:
invokeMethod in interface groovy.lang.GroovyObject
getProperty
public Object getProperty(String name)
- Specified by:
getProperty in interface groovy.lang.GroovyObject
setProperty
public void setProperty(String name,
Object value)
- Specified by:
setProperty in interface groovy.lang.GroovyObject
Copyright © 2009. All Rights Reserved.