Class ManagedFunctionFlowTypeImpl<F extends java.lang.Enum<F>>
- java.lang.Object
-
- net.officefloor.compile.impl.managedfunction.ManagedFunctionFlowTypeImpl<F>
-
- All Implemented Interfaces:
ManagedFunctionFlowType<F>
,ManagedFunctionFlowTypeBuilder<F>
,AnnotatedType
public class ManagedFunctionFlowTypeImpl<F extends java.lang.Enum<F>> extends java.lang.Object implements ManagedFunctionFlowType<F>, ManagedFunctionFlowTypeBuilder<F>
ManagedFunctionFlowType
implementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ManagedFunctionFlowTypeImpl(int index)
Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagedFunctionFlowTypeBuilder<F>
addAnnotation(java.lang.Object annotation)
Adds an annotation.java.lang.Object[]
getAnnotations()
Obtains the annotations.java.lang.Class<?>
getArgumentType()
Obtains the type of the argument passed by theManagedFunction
to theFlow
.java.lang.String
getFlowName()
Obtains the name for theManagedFunctionFlowType
.int
getIndex()
Obtains the index for theManagedFunctionFlowType
.F
getKey()
Obtains theEnum
key for theManagedFunctionFlowType
.ManagedFunctionFlowTypeBuilder<F>
setArgumentType(java.lang.Class<?> argumentType)
Specifies the type of the argument passed by theManagedFunction
to theFlow
.ManagedFunctionFlowTypeBuilder<F>
setKey(F key)
Specifies theEnum
for thisManagedFunctionFlowTypeBuilder
.ManagedFunctionFlowTypeBuilder<F>
setLabel(java.lang.String label)
Provides means to specify a display label for theFlow
.-
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
-
ManagedFunctionFlowTypeImpl
public ManagedFunctionFlowTypeImpl(int index)
Initiate.- Parameters:
index
- Index of thisManagedFunctionFlowType
.
-
-
Method Detail
-
setKey
public ManagedFunctionFlowTypeBuilder<F> setKey(F key)
Description copied from interface:ManagedFunctionFlowTypeBuilder
Specifies theEnum
for thisManagedFunctionFlowTypeBuilder
. This is required to be set ifF
is notNone
orIndexed
.- Specified by:
setKey
in interfaceManagedFunctionFlowTypeBuilder<F extends java.lang.Enum<F>>
- Parameters:
key
-Enum
for thisManagedFunctionFlowTypeBuilder
.- Returns:
this
.
-
setArgumentType
public ManagedFunctionFlowTypeBuilder<F> setArgumentType(java.lang.Class<?> argumentType)
Description copied from interface:ManagedFunctionFlowTypeBuilder
Specifies the type of the argument passed by the
ManagedFunction
to theFlow
.Should there be no argument, do not call this method.
- Specified by:
setArgumentType
in interfaceManagedFunctionFlowTypeBuilder<F extends java.lang.Enum<F>>
- Parameters:
argumentType
- Type of argument passed toFlow
.- Returns:
this
.
-
setLabel
public ManagedFunctionFlowTypeBuilder<F> setLabel(java.lang.String label)
Description copied from interface:ManagedFunctionFlowTypeBuilder
Provides means to specify a display label for the
Flow
.This need not be set as is only an aid to better identify the
Flow
. If not set theManagedFunctionTypeBuilder
will use the following order to get a display label:Enum
key name- index value
- Specified by:
setLabel
in interfaceManagedFunctionFlowTypeBuilder<F extends java.lang.Enum<F>>
- Parameters:
label
- Display label for theFlow
.- Returns:
this
.
-
addAnnotation
public ManagedFunctionFlowTypeBuilder<F> addAnnotation(java.lang.Object annotation)
Description copied from interface:ManagedFunctionFlowTypeBuilder
Adds an annotation.- Specified by:
addAnnotation
in interfaceManagedFunctionFlowTypeBuilder<F extends java.lang.Enum<F>>
- Parameters:
annotation
- Annotation.- Returns:
this
.
-
getFlowName
public java.lang.String getFlowName()
Description copied from interface:ManagedFunctionFlowType
Obtains the name for theManagedFunctionFlowType
.- Specified by:
getFlowName
in interfaceManagedFunctionFlowType<F extends java.lang.Enum<F>>
- Returns:
- Name for the
ManagedFunctionFlowType
.
-
getIndex
public int getIndex()
Description copied from interface:ManagedFunctionFlowType
Obtains the index for the
ManagedFunctionFlowType
.Should there be an
Enum
then will be theEnum.ordinal()
value. Otherwise will be the index that this was added.- Specified by:
getIndex
in interfaceManagedFunctionFlowType<F extends java.lang.Enum<F>>
- Specified by:
getIndex
in interfaceManagedFunctionFlowTypeBuilder<F extends java.lang.Enum<F>>
- Returns:
- Index for the
ManagedFunctionFlowType
.
-
getArgumentType
public java.lang.Class<?> getArgumentType()
Description copied from interface:ManagedFunctionFlowType
Obtains the type of the argument passed by theManagedFunction
to theFlow
.- Specified by:
getArgumentType
in interfaceManagedFunctionFlowType<F extends java.lang.Enum<F>>
- Returns:
- Type of argument passed to
Flow
. May benull
to indicate no argument.
-
getKey
public F getKey()
Description copied from interface:ManagedFunctionFlowType
Obtains theEnum
key for theManagedFunctionFlowType
.- Specified by:
getKey
in interfaceManagedFunctionFlowType<F extends java.lang.Enum<F>>
- Returns:
Enum
key for theManagedFunctionFlowType
. May benull
if noEnum
for flows.
-
getAnnotations
public java.lang.Object[] getAnnotations()
Description copied from interface:AnnotatedType
Obtains the annotations.- Specified by:
getAnnotations
in interfaceAnnotatedType
- Returns:
- Annotations.
-
-