Class ClassObjectFactory
- java.lang.Object
-
- net.officefloor.plugin.clazz.factory.ClassObjectFactory
-
public class ClassObjectFactory extends java.lang.Object
Creates an object fromClass
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ClassObjectFactory(java.lang.reflect.Constructor<?> constructor, ClassDependencyFactory[] constructorDependencyFactories, ClassDependencyInjector[] dependencyInjectors)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
createObject(AdministrationContext<java.lang.Object,Indexed,Indexed> context)
Creates the object within theAdministration
context.java.lang.Object
createObject(ManagedFunctionContext<Indexed,Indexed> context)
Creates the object within aManagedFunction
context.java.lang.Object
createObject(ManagedObject managedObject, ManagedObjectContext context, ObjectRegistry<Indexed> registry)
Creates the object within aManagedObject
context.
-
-
-
Constructor Detail
-
ClassObjectFactory
public ClassObjectFactory(java.lang.reflect.Constructor<?> constructor, ClassDependencyFactory[] constructorDependencyFactories, ClassDependencyInjector[] dependencyInjectors)
Instantiate.- Parameters:
constructor
-Constructor
to instantiate the object.constructorDependencyFactories
-Constructor
ClassDependencyFactory
instances.dependencyInjectors
-ClassDependencyInjector
instances.
-
-
Method Detail
-
createObject
public java.lang.Object createObject(ManagedObject managedObject, ManagedObjectContext context, ObjectRegistry<Indexed> registry) throws java.lang.Throwable
Creates the object within aManagedObject
context.- Parameters:
managedObject
-ManagedObject
.context
-ManagedObjectContext
.registry
-ObjectRegistry
.- Returns:
- Created object.
- Throws:
java.lang.Throwable
- If fails to create object.
-
createObject
public java.lang.Object createObject(ManagedFunctionContext<Indexed,Indexed> context) throws java.lang.Throwable
Creates the object within aManagedFunction
context.- Parameters:
context
-ManagedFunctionContext
.- Returns:
- Created object.
- Throws:
java.lang.Throwable
- If fails to create object.
-
createObject
public java.lang.Object createObject(AdministrationContext<java.lang.Object,Indexed,Indexed> context) throws java.lang.Throwable
Creates the object within theAdministration
context.- Parameters:
context
-AdministrationContext
.- Returns:
- Created object.
- Throws:
java.lang.Throwable
- If fails to create object.
-
-