Class ClassStandAlone
- java.lang.Object
-
- net.officefloor.plugin.managedobject.clazz.ClassStandAlone
-
public class ClassStandAlone extends java.lang.Object
Loads
Class
viaClassManagedObjectSource
for stand alone use.This is typically for unit testing of the
Class
with mock injections.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ClassStandAlone()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
create(java.lang.Class<T> clazz)
Instantiates the objects and injects the dependencies.<T,I extends T>
voidregisterDependency(java.lang.Class<T> type, I dependency)
Registers an unqualified dependency for a dependency type.void
registerDependency(java.lang.Object dependency)
Registers an unqualified dependency for concrete type.<T,I extends T>
voidregisterDependency(java.lang.String qualifier, java.lang.Class<T> type, I dependency)
Registers a dependency for a dependency type.void
registerDependency(java.lang.String qualifier, java.lang.Object dependency)
Registers a qualified dependency for concrete type.void
registerFlow(java.lang.String flowName, InvokedProcessServicer servicer)
Registers an invokedFlow
(process).
-
-
-
Method Detail
-
registerDependency
public void registerDependency(java.lang.Object dependency)
Registers an unqualified dependency for concrete type.- Parameters:
dependency
- Dependency.
-
registerDependency
public void registerDependency(java.lang.String qualifier, java.lang.Object dependency)
Registers a qualified dependency for concrete type.- Parameters:
qualifier
- Qualifier.dependency
- Dependency.
-
registerDependency
public <T,I extends T> void registerDependency(java.lang.Class<T> type, I dependency)
Registers an unqualified dependency for a dependency type.- Type Parameters:
T
- Dependency type.I
- Implementation type.- Parameters:
type
- Dependency type.dependency
- Implementing dependency.
-
registerDependency
public <T,I extends T> void registerDependency(java.lang.String qualifier, java.lang.Class<T> type, I dependency)
Registers a dependency for a dependency type.- Type Parameters:
T
- Dependency type.I
- Implementation type.- Parameters:
qualifier
- Qualifier.type
- Dependency type.dependency
- Implementing dependency.
-
registerFlow
public void registerFlow(java.lang.String flowName, InvokedProcessServicer servicer)
Registers an invokedFlow
(process).- Parameters:
flowName
- Name ofFlow
.servicer
-InvokedProcessServicer
.
-
create
public <T> T create(java.lang.Class<T> clazz) throws java.lang.Throwable
Instantiates the objects and injects the dependencies.- Type Parameters:
T
- Object type.- Parameters:
clazz
- ObjectClass
.- Returns:
- Instantiated object with dependencies injected.
- Throws:
java.lang.Throwable
- If fails to create.
-
-