|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.oddjob.arooa.SimpleObjectFactory
A Simple object factory that uses property sets of name class pairs to create the objects.
| Constructor Summary | |
SimpleObjectFactory()
|
|
SimpleObjectFactory(ObjectFactory parent)
|
|
| Method Summary | |
void |
addFile(java.io.File file)
Add definitions fom a property file. |
void |
addProperties(java.util.Properties props)
Add class definitions from properties. |
void |
addResource(java.lang.String classDefFileName)
Add definitions fom a resource property file, i.e. |
static void |
checkTaskClass(java.lang.Class taskClass)
Checks whether or not a class is suitable for serving as Ant task. |
java.lang.Object |
createObject(java.lang.String name)
Create the object for a given name. |
static java.lang.Object |
createObjectFromClass(java.lang.String className)
|
static java.lang.Class |
loadClass(java.lang.String className)
|
void |
set(java.lang.String key,
java.lang.String value)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleObjectFactory(ObjectFactory parent)
public SimpleObjectFactory()
| Method Detail |
public void addResource(java.lang.String classDefFileName)
classDefFileName - The file name.public void addFile(java.io.File file)
public void addProperties(java.util.Properties props)
props - Class definition properties.
public void set(java.lang.String key,
java.lang.String value)
public static void checkTaskClass(java.lang.Class taskClass)
throws ArooaException
taskClass - The class to be checked.
Must not be null.
ArooaException - if the class is unsuitable for being an Ant
task. An error level message is logged before
this exception is thrown.public static java.lang.Class loadClass(java.lang.String className)
public static java.lang.Object createObjectFromClass(java.lang.String className)
throws ArooaException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
ArooaException
java.lang.IllegalAccessException
java.lang.InstantiationException
public java.lang.Object createObject(java.lang.String name)
throws ArooaException
createObject in interface ObjectFactoryname - The name of the object.
ArooaException - If creation failed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||