Package net.officefloor.frame.test
Class ReflectiveGovernanceBuilder
- java.lang.Object
-
- net.officefloor.frame.test.ReflectiveGovernanceBuilder
-
- All Implemented Interfaces:
GovernanceFactory<java.lang.Object,Indexed>
public class ReflectiveGovernanceBuilder extends java.lang.Object implements GovernanceFactory<java.lang.Object,Indexed>
ReflectiveGovernanceBuilder
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ReflectiveGovernanceBuilder.ReflectiveGovernanceActivityBuilder
ReflectiveGovernance
action.
-
Constructor Summary
Constructors Constructor Description ReflectiveGovernanceBuilder(java.lang.Class<C> clazz, C object, java.lang.String governanceName, OfficeBuilder officeBuilder, ConstructTestSupport constructTestSupport)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Governance<java.lang.Object,Indexed>
createGovernance()
Creates theGovernance
.ReflectiveGovernanceBuilder.ReflectiveGovernanceActivityBuilder
disregard(java.lang.String methodName)
Constructs the disregardGovernanceActivity
.ReflectiveGovernanceBuilder.ReflectiveGovernanceActivityBuilder
enforce(java.lang.String methodName)
Constructs the enforceGovernanceActivity
.GovernanceBuilder<Indexed>
getBuilder()
Obtains theGovernanceBuilder
.ReflectiveGovernanceBuilder.ReflectiveGovernanceActivityBuilder
register(java.lang.String methodName)
Constructs the registerManagedObject
GovernanceActivity
.
-
-
-
Constructor Detail
-
ReflectiveGovernanceBuilder
public ReflectiveGovernanceBuilder(java.lang.Class<C> clazz, C object, java.lang.String governanceName, OfficeBuilder officeBuilder, ConstructTestSupport constructTestSupport)
Instantiate.- Type Parameters:
C
-Governance
Class
type.- Parameters:
clazz
-Class
.object
- Object should the method not bestatic
. May benull
ifstatic
Method
of theClass
.governanceName
- Name of theGovernance
.officeBuilder
-OfficeBuilder
.constructTestSupport
-ConstructTestSupport
.
-
-
Method Detail
-
getBuilder
public GovernanceBuilder<Indexed> getBuilder()
Obtains theGovernanceBuilder
.- Returns:
GovernanceBuilder
.
-
register
public ReflectiveGovernanceBuilder.ReflectiveGovernanceActivityBuilder register(java.lang.String methodName)
Constructs the registerManagedObject
GovernanceActivity
.- Parameters:
methodName
- Name ofMethod
to register theManagedObject
.- Returns:
ReflectiveGovernanceBuilder.ReflectiveGovernanceActivityBuilder
.
-
enforce
public ReflectiveGovernanceBuilder.ReflectiveGovernanceActivityBuilder enforce(java.lang.String methodName)
Constructs the enforceGovernanceActivity
.- Parameters:
methodName
- Name ofMethod
for enforcing theGovernance
.- Returns:
ReflectiveGovernanceBuilder.ReflectiveGovernanceActivityBuilder
.
-
disregard
public ReflectiveGovernanceBuilder.ReflectiveGovernanceActivityBuilder disregard(java.lang.String methodName)
Constructs the disregardGovernanceActivity
.- Parameters:
methodName
- Name ofMethod
for disregarding theGovernance
.- Returns:
ReflectiveGovernanceBuilder.ReflectiveGovernanceActivityBuilder
.
-
createGovernance
public Governance<java.lang.Object,Indexed> createGovernance() throws java.lang.Throwable
Description copied from interface:GovernanceFactory
Creates theGovernance
.- Specified by:
createGovernance
in interfaceGovernanceFactory<java.lang.Object,Indexed>
- Returns:
Governance
.- Throws:
java.lang.Throwable
- If fails to create theGovernance
.
-
-