Package net.officefloor.frame.test
Class ReflectiveFunctionBuilder
- java.lang.Object
- 
- net.officefloor.frame.api.function.StaticManagedFunction<Indexed,Indexed>
- 
- net.officefloor.frame.test.ReflectiveFunctionBuilder
 
 
- 
- All Implemented Interfaces:
- ManagedFunction<Indexed,Indexed>,- ManagedFunctionFactory<Indexed,Indexed>
 
 public class ReflectiveFunctionBuilder extends StaticManagedFunction<Indexed,Indexed> ReflectiveManagedFunctionBuilder.- Author:
- Daniel Sagenschneider
 
- 
- 
Constructor SummaryConstructors Constructor Description ReflectiveFunctionBuilder(java.lang.Class<C> clazz, C object, java.lang.String methodName, OfficeBuilder officeBuilder, ConstructTestSupport constructTestSupport)Initiate.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildAsynchronousFlow()BuildsAsynchronousFlow.voidbuildFlow(java.lang.String functionName, java.lang.Class<?> argumentType, boolean isSpawnThreadState)Builds the flow.voidbuildManagedFunctionContext()Builds theManagedFunctionContext.voidbuildObject(java.lang.String scopeManagedObjectName)Links theManagedObjectto theManagedFunction.DependencyMappingBuilderbuildObject(java.lang.String officeManagedObjectName, ManagedObjectScope managedObjectScope)Builds theManagedObjectScopeboundManagedObject.voidbuildParameter()Builds the parameter.voidexecute(ManagedFunctionContext<Indexed,Indexed> context)Executes the function.ManagedFunctionBuilder<Indexed,Indexed>getBuilder()Obtains theManagedFunctionBuilder.ReflectiveAdministrationBuilderpostAdminister(java.lang.String methodName)Creates postAdministration.ReflectiveAdministrationBuilderpreAdminister(java.lang.String methodName)Creates preAdministration.voidsetNextFunction(java.lang.String functionName)Specifies the nextManagedFunctionusing the return type of theMethodas the argument type.- 
Methods inherited from class net.officefloor.frame.api.function.StaticManagedFunctioncreateManagedFunction
 
- 
 
- 
- 
- 
Constructor Detail- 
ReflectiveFunctionBuilderpublic ReflectiveFunctionBuilder(java.lang.Class<C> clazz, C object, java.lang.String methodName, OfficeBuilder officeBuilder, ConstructTestSupport constructTestSupport)Initiate.- Type Parameters:
- C-- ManagedFunction- Methodcontaining- Classtype.
- Parameters:
- clazz-- Class.
- object- Object should the method not be- static. May be- nullif- static- Methodof the- Class.
- methodName- Name of the- Methodto invoke.
- officeBuilder-- OfficeBuilder.
- constructTestSupport-- ConstructTestSupport.
 
 
- 
 - 
Method Detail- 
getBuilderpublic ManagedFunctionBuilder<Indexed,Indexed> getBuilder() Obtains theManagedFunctionBuilder.- Returns:
- ManagedFunctionBuilder.
 
 - 
buildManagedFunctionContextpublic void buildManagedFunctionContext() Builds theManagedFunctionContext.
 - 
buildParameterpublic void buildParameter() Builds the parameter.
 - 
buildAsynchronousFlowpublic void buildAsynchronousFlow() BuildsAsynchronousFlow.
 - 
buildObjectpublic void buildObject(java.lang.String scopeManagedObjectName) Links theManagedObjectto theManagedFunction.- Parameters:
- scopeManagedObjectName- Scope name of the- ManagedObject.
 
 - 
buildObjectpublic DependencyMappingBuilder buildObject(java.lang.String officeManagedObjectName, ManagedObjectScope managedObjectScope) Builds theManagedObjectScopeboundManagedObject.- Parameters:
- officeManagedObjectName-- Officename of the- ManagedObject.
- managedObjectScope-- ManagedObjectScopefor the- ManagedObject.
- Returns:
- DependencyMappingBuilder.
 
 - 
buildFlowpublic void buildFlow(java.lang.String functionName, java.lang.Class<?> argumentType, boolean isSpawnThreadState)Builds the flow.- Parameters:
- functionName-- ManagedFunctionname.
- argumentType- Type of argument passed to the- Flow.
- isSpawnThreadState-- trueto spawn in- ThreadState.
 
 - 
setNextFunctionpublic void setNextFunction(java.lang.String functionName) Specifies the nextManagedFunctionusing the return type of theMethodas the argument type.- Parameters:
- functionName-- ManagedFunctionname.
 
 - 
preAdministerpublic ReflectiveAdministrationBuilder preAdminister(java.lang.String methodName) Creates preAdministration.- Parameters:
- methodName- Name of- Methodfor- Administration.
- Returns:
- ReflectiveAdministrationBuilder.
 
 - 
postAdministerpublic ReflectiveAdministrationBuilder postAdminister(java.lang.String methodName) Creates postAdministration.- Parameters:
- methodName- Name of- Methodfor- Administration.
- Returns:
- ReflectiveAdministrationBuilder.
 
 - 
executepublic void execute(ManagedFunctionContext<Indexed,Indexed> context) throws java.lang.Throwable Description copied from interface:ManagedFunctionExecutes the function.- Parameters:
- context-- ManagedFunctionContextfor the- ManagedFunction.
- Throws:
- java.lang.Throwable- Indicating failure of the- ManagedFunction.
 
 
- 
 
-