Class ManagedFunctionTypeImpl<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>
- 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 java.lang.Enum<M>,F extends java.lang.Enum<F>> extends java.lang.Object implements ManagedFunctionType<M,F>, ManagedFunctionTypeBuilder<M,F>
ManagedFunctionTypeimplementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ManagedFunctionTypeImpl(java.lang.String functionName, java.lang.Class<M> objectKeyClass, java.lang.Class<F> flowKeyClass)Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagedFunctionTypeBuilder<M,F>addAnnotation(java.lang.Object annotation)Adds an annotation.<E extends java.lang.Throwable>
ManagedFunctionEscalationTypeBuilderaddEscalation(java.lang.Class<E> escalationType)Adds aManagedFunctionEscalationTypeBuilderto theManagedFunctionTypeBuilderdefinition.ManagedFunctionFlowTypeBuilder<F>addFlow()Adds aManagedFunctionFlowTypeBuilderto theManagedFunctionTypeBuilderdefinition.ManagedFunctionObjectTypeBuilder<M>addObject(java.lang.Class<?> objectType)Adds aManagedFunctionObjectTypeBuilderto theManagedFunctionTypeBuilderdefinition.java.lang.Object[]getAnnotations()Obtains the annotations.ManagedFunctionEscalationType[]getEscalationTypes()Obtains theManagedFunctionEscalationTypedefinitions for the possibleEscalationFlowinstances by theManagedFunction.java.lang.Class<F>getFlowKeyClass()ManagedFunctionFlowType<F>[]getFlowTypes()Obtains theManagedFunctionFlowTypedefinitions for the possibleFlowinstances instigated by theManagedFunction.java.lang.StringgetFunctionName()Obtains the name of theManagedFunction.ManagedFunctionFactory<M,F>getManagedFunctionFactory()Obtains theManagedFunctionFactory.java.lang.Class<M>getObjectKeyClass()Obtains theEnumproviding the keys for the dependentObjectinstances.ManagedFunctionObjectType<M>[]getObjectTypes()Obtains theManagedFunctionObjectTypedefinitions for the dependentObjectinstances required by theManagedFunction.java.lang.Class<?>getReturnType()Obtains the type name ofObjectreturned from theManagedFunctionthat is to be used as the argument to the nextManagedFunction.ManagedFunctionTypeBuilder<M,F>setFunctionFactory(ManagedFunctionFactory<M,F> functionFactory)Specifies theManagedFunctionFactoryto create theManagedFunction.ManagedFunctionTypeBuilder<M,F>setReturnType(java.lang.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, wait
-
Methods inherited from interface net.officefloor.compile.type.AnnotatedType
getAnnotation, getAnnotations
-
-
-
-
Constructor Detail
-
ManagedFunctionTypeImpl
public ManagedFunctionTypeImpl(java.lang.String functionName, java.lang.Class<M> objectKeyClass, java.lang.Class<F> flowKeyClass)Initiate.- Parameters:
functionName- Name of theManagedFunction.objectKeyClass-Enumproviding keys for dependentObjectinstances.flowKeyClass-Enumproviding keys for instigatedFlowinstances.
-
-
Method Detail
-
setFunctionFactory
public ManagedFunctionTypeBuilder<M,F> setFunctionFactory(ManagedFunctionFactory<M,F> functionFactory)
Description copied from interface:ManagedFunctionTypeBuilderSpecifies theManagedFunctionFactoryto create theManagedFunction.- Specified by:
setFunctionFactoryin interfaceManagedFunctionTypeBuilder<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>- Parameters:
functionFactory-ManagedFunctionFactoryto create theManagedFunction.- Returns:
this.
-
addAnnotation
public ManagedFunctionTypeBuilder<M,F> addAnnotation(java.lang.Object annotation)
Description copied from interface:ManagedFunctionTypeBuilderAdds an annotation.- Specified by:
addAnnotationin interfaceManagedFunctionTypeBuilder<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>- Parameters:
annotation- Annotation.- Returns:
this.
-
setReturnType
public ManagedFunctionTypeBuilder<M,F> setReturnType(java.lang.Class<?> returnType)
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 java.lang.Enum<M>,F extends java.lang.Enum<F>>- Parameters:
returnType- Return type of theManagedFunction.- Returns:
this.
-
addObject
public ManagedFunctionObjectTypeBuilder<M> addObject(java.lang.Class<?> objectType)
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).- Specified by:
addObjectin interfaceManagedFunctionTypeBuilder<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>- Parameters:
objectType- Type of the dependentObject.- Returns:
ManagedFunctionObjectTypeBuilderto provide thetype definitionof the added dependentObject.
-
addFlow
public ManagedFunctionFlowTypeBuilder<F> 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 java.lang.Enum<M>,F extends java.lang.Enum<F>>- Returns:
ManagedFunctionFlowTypeBuilderto provide thetype definitionof the possible instigatedFlowby theManagedFunction.
-
addEscalation
public <E extends java.lang.Throwable> ManagedFunctionEscalationTypeBuilder addEscalation(java.lang.Class<E> escalationType)
Description copied from interface:ManagedFunctionTypeBuilderAdds aManagedFunctionEscalationTypeBuilderto theManagedFunctionTypeBuilderdefinition.- Specified by:
addEscalationin interfaceManagedFunctionTypeBuilder<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>- Type Parameters:
E-Escalationtype.- Parameters:
escalationType- Type to be handled by anEscalationFlow.- Returns:
ManagedFunctionEscalationTypeBuilderto provide thetype definition.
-
getFunctionName
public java.lang.String getFunctionName()
Description copied from interface:ManagedFunctionTypeObtains the name of theManagedFunction.- Specified by:
getFunctionNamein interfaceManagedFunctionType<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>- Returns:
- Name of the
ManagedFunction.
-
getManagedFunctionFactory
public ManagedFunctionFactory<M,F> getManagedFunctionFactory()
Description copied from interface:ManagedFunctionTypeObtains theManagedFunctionFactory.- Specified by:
getManagedFunctionFactoryin interfaceManagedFunctionType<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>- Returns:
ManagedFunctionFactory.
-
getAnnotations
public java.lang.Object[] getAnnotations()
Description copied from interface:AnnotatedTypeObtains the annotations.- Specified by:
getAnnotationsin interfaceAnnotatedType- Returns:
- Annotations.
-
getObjectKeyClass
public java.lang.Class<M> getObjectKeyClass()
Description copied from interface:ManagedFunctionTypeObtains theEnumproviding the keys for the dependentObjectinstances.- Specified by:
getObjectKeyClassin interfaceManagedFunctionType<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>- Returns:
Enumproviding the dependentObjectkeys ornullifIndexedor no dependencies.
-
getObjectTypes
public ManagedFunctionObjectType<M>[] getObjectTypes()
Description copied from interface:ManagedFunctionTypeObtains theManagedFunctionObjectTypedefinitions for the dependentObjectinstances required by theManagedFunction.- Specified by:
getObjectTypesin interfaceManagedFunctionType<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>- Returns:
ManagedFunctionObjectTypedefinitions for the dependentObjectinstances required by theManagedFunction.
-
getFlowKeyClass
public java.lang.Class<F> getFlowKeyClass()
Description copied from interface:ManagedFunctionType- Specified by:
getFlowKeyClassin interfaceManagedFunctionType<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>- Returns:
Enumproviding instigatedFlowkeys ornullifIndexedor no instigatedFlowinstances.
-
getFlowTypes
public ManagedFunctionFlowType<F>[] getFlowTypes()
Description copied from interface:ManagedFunctionTypeObtains theManagedFunctionFlowTypedefinitions for the possibleFlowinstances instigated by theManagedFunction.- Specified by:
getFlowTypesin interfaceManagedFunctionType<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>- Returns:
ManagedFunctionFlowTypedefinitions for the possibleFlowinstances instigated by theManagedFunction.
-
getEscalationTypes
public ManagedFunctionEscalationType[] getEscalationTypes()
Description copied from interface:ManagedFunctionTypeObtains theManagedFunctionEscalationTypedefinitions for the possibleEscalationFlowinstances by theManagedFunction.- Specified by:
getEscalationTypesin interfaceManagedFunctionType<M extends java.lang.Enum<M>,F extends java.lang.Enum<F>>- Returns:
ManagedFunctionEscalationTypedefinitions for the possibleEscalationFlowinstances by theManagedFunction.
-
getReturnType
public java.lang.Class<?> 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 java.lang.Enum<M>,F extends java.lang.Enum<F>>- Returns:
- Return type name of the
ManagedFunction.
-
-