com.googlecode.lightest.core
Class LightestContextFactory
java.lang.Object
com.googlecode.lightest.core.LightestContextFactory
- All Implemented Interfaces:
- groovy.lang.GroovyObject
public class LightestContextFactory
- extends Object
- implements groovy.lang.GroovyObject
A factory class for LightestContext instances.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CONTEXT_CLASS
public static final String DEFAULT_CONTEXT_CLASS
LightestContextFactory
public LightestContextFactory(String contextClass,
ClassLoader classLoader,
String outputDir)
- Parameters:
contextClass - the binary name of the context classclassLoader - the class loader to use to load the context class.
May be null.outputDir - the output directory value to make available on all
context instances created by this factory.
getContextClass
public String getContextClass()
setContextClass
public void setContextClass(String value)
getClassLoader
public ClassLoader getClassLoader()
setClassLoader
public void setClassLoader(ClassLoader value)
getOutputDir
public String getOutputDir()
setOutputDir
public void setOutputDir(String value)
create
public LightestContext create()
- Creates and returns a new LightestContext instance, based on the class
set as the context class on this object. The class must extend
LightestContext; an exception will be thrown if it does not. This method
will throw a ClassNotFoundException if the class can't be loaded using
the sepecified class loader, or the current Thread's context class
loader if no class loader was specified.
create
public LightestContext create(LightestContext parentContext)
- Creates and returns a new LightestContext instance, with a parent
instance to model from.
- Parameters:
parentContext -
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.