java.lang.Object
net.officefloor.compile.impl.managedfunction.ManagedFunctionTypeImpl<M,F>
- All Implemented Interfaces:
ManagedFunctionType<M,,F> ManagedFunctionTypeBuilder<M,,F> AnnotatedType
public class ManagedFunctionTypeImpl<M extends Enum<M>,F extends Enum<F>>
extends Object
implements ManagedFunctionType<M,F>, ManagedFunctionTypeBuilder<M,F>
ManagedFunctionType implementation.- Author:
- Daniel Sagenschneider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAnnotation(Object annotation) Adds an annotation.<E extends Throwable>
ManagedFunctionEscalationTypeBuilderaddEscalation(Class<E> escalationType) Adds aManagedFunctionEscalationTypeBuilderto theManagedFunctionTypeBuilderdefinition.addFlow()Adds aManagedFunctionFlowTypeBuilderto theManagedFunctionTypeBuilderdefinition.Adds aManagedFunctionObjectTypeBuilderto theManagedFunctionTypeBuilderdefinition.Object[]Obtains the annotations.Obtains theManagedFunctionEscalationTypedefinitions for the possibleEscalationFlowinstances by theManagedFunction.Obtains theManagedFunctionFlowTypedefinitions for the possibleFlowinstances instigated by theManagedFunction.Obtains the name of theManagedFunction.Obtains theManagedFunctionFactory.Obtains theManagedFunctionObjectTypedefinitions for the dependentObjectinstances required by theManagedFunction.Class<?>Obtains the type name ofObjectreturned from theManagedFunctionthat is to be used as the argument to the nextManagedFunction.setFunctionFactory(ManagedFunctionFactory<M, F> functionFactory) Specifies theManagedFunctionFactoryto create theManagedFunction.setReturnType(Class<?> returnType) Specifies the type ofObjectreturned from theManagedFunctionthat is to be used as the argument to the nextManagedFunction.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.officefloor.compile.type.AnnotatedType
getAnnotation, getAnnotations
-
Constructor Details
-
ManagedFunctionTypeImpl
Initiate.- Parameters:
functionName- Name of theManagedFunction.objectKeyClass-Enumproviding keys for dependentObjectinstances.flowKeyClass-Enumproviding keys for instigatedFlowinstances.
-
-
Method Details
-
setFunctionFactory
public ManagedFunctionTypeBuilder<M,F> setFunctionFactory(ManagedFunctionFactory<M, F> functionFactory) Description copied from interface:ManagedFunctionTypeBuilderSpecifies theManagedFunctionFactoryto create theManagedFunction.- Specified by:
setFunctionFactoryin interfaceManagedFunctionTypeBuilder<M extends Enum<M>,F extends Enum<F>> - Parameters:
functionFactory-ManagedFunctionFactoryto create theManagedFunction.- Returns:
this.
-
addAnnotation
Description copied from interface:ManagedFunctionTypeBuilderAdds an annotation.- Specified by:
addAnnotationin interfaceManagedFunctionTypeBuilder<M extends Enum<M>,F extends Enum<F>> - Parameters:
annotation- Annotation.- Returns:
this.
-
setReturnType
Description copied from interface:ManagedFunctionTypeBuilderSpecifies the type ofObjectreturned from theManagedFunctionthat is to be used as the argument to the nextManagedFunction.- Specified by:
setReturnTypein interfaceManagedFunctionTypeBuilder<M extends Enum<M>,F extends Enum<F>> - Parameters:
returnType- Return type of theManagedFunction.- Returns:
this.
-
addObject
Description copied from interface:ManagedFunctionTypeBuilderAdds a
ManagedFunctionObjectTypeBuilderto theManagedFunctionTypeBuilderdefinition.Should the dependent
Objectinstances beIndexed, the order they are added is the order of indexing (starting at 0). -
addFlow
Description copied from interface:ManagedFunctionTypeBuilderAdds a
ManagedFunctionFlowTypeBuilderto theManagedFunctionTypeBuilderdefinition.Should the
Flowinstigation beIndexed, the order they are added is the order of indexing (starting at 0).- Specified by:
addFlowin interfaceManagedFunctionTypeBuilder<M extends Enum<M>,F extends Enum<F>> - Returns:
ManagedFunctionFlowTypeBuilderto provide thetype definitionof the possible instigatedFlowby theManagedFunction.
-
addEscalation
public <E extends Throwable> ManagedFunctionEscalationTypeBuilder addEscalation(Class<E> escalationType) Description copied from interface:ManagedFunctionTypeBuilderAdds aManagedFunctionEscalationTypeBuilderto theManagedFunctionTypeBuilderdefinition.- Specified by:
addEscalationin interfaceManagedFunctionTypeBuilder<M extends Enum<M>,F extends Enum<F>> - Type Parameters:
E-Escalationtype.- Parameters:
escalationType- Type to be handled by anEscalationFlow.- Returns:
ManagedFunctionEscalationTypeBuilderto provide thetype definition.
-
getFunctionName
Description copied from interface:ManagedFunctionTypeObtains the name of theManagedFunction.- Specified by:
getFunctionNamein interfaceManagedFunctionType<M extends Enum<M>,F extends Enum<F>> - Returns:
- Name of the
ManagedFunction.
-
getManagedFunctionFactory
Description copied from interface:ManagedFunctionTypeObtains theManagedFunctionFactory.- Specified by:
getManagedFunctionFactoryin interfaceManagedFunctionType<M extends Enum<M>,F extends Enum<F>> - Returns:
ManagedFunctionFactory.
-
getAnnotations
Description copied from interface:AnnotatedTypeObtains the annotations.- Specified by:
getAnnotationsin interfaceAnnotatedType- Returns:
- Annotations.
-
getObjectKeyClass
Description copied from interface:ManagedFunctionType -
getObjectTypes
Description copied from interface:ManagedFunctionTypeObtains theManagedFunctionObjectTypedefinitions for the dependentObjectinstances required by theManagedFunction.- Specified by:
getObjectTypesin interfaceManagedFunctionType<M extends Enum<M>,F extends Enum<F>> - Returns:
ManagedFunctionObjectTypedefinitions for the dependentObjectinstances required by theManagedFunction.
-
getFlowKeyClass
Description copied from interface:ManagedFunctionType -
getFlowTypes
Description copied from interface:ManagedFunctionTypeObtains theManagedFunctionFlowTypedefinitions for the possibleFlowinstances instigated by theManagedFunction.- Specified by:
getFlowTypesin interfaceManagedFunctionType<M extends Enum<M>,F extends Enum<F>> - Returns:
ManagedFunctionFlowTypedefinitions for the possibleFlowinstances instigated by theManagedFunction.
-
getEscalationTypes
Description copied from interface:ManagedFunctionTypeObtains theManagedFunctionEscalationTypedefinitions for the possibleEscalationFlowinstances by theManagedFunction.- Specified by:
getEscalationTypesin interfaceManagedFunctionType<M extends Enum<M>,F extends Enum<F>> - Returns:
ManagedFunctionEscalationTypedefinitions for the possibleEscalationFlowinstances by theManagedFunction.
-
getReturnType
Description copied from interface:ManagedFunctionTypeObtains the type name ofObjectreturned from theManagedFunctionthat is to be used as the argument to the nextManagedFunction.- Specified by:
getReturnTypein interfaceManagedFunctionType<M extends Enum<M>,F extends Enum<F>> - Returns:
- Return type name of the
ManagedFunction.
-