Class ManagedFunctionObjectTypeImpl<M extends java.lang.Enum<M>>
- java.lang.Object
-
- net.officefloor.compile.impl.managedfunction.ManagedFunctionObjectTypeImpl<M>
-
- All Implemented Interfaces:
ManagedFunctionObjectType<M>
,ManagedFunctionObjectTypeBuilder<M>
,AnnotatedType
public class ManagedFunctionObjectTypeImpl<M extends java.lang.Enum<M>> extends java.lang.Object implements ManagedFunctionObjectType<M>, ManagedFunctionObjectTypeBuilder<M>
ManagedFunctionObjectType
implementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ManagedFunctionObjectTypeImpl(java.lang.Class<?> objectType, int index)
Initiate with the index of theManagedFunctionObjectType
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManagedFunctionObjectTypeBuilder<M>
addAnnotation(java.lang.Object annotation)
Adds an annotation.java.lang.Object[]
getAnnotations()
Obtains the annotations.int
getIndex()
Obtains the index for theManagedFunctionObjectType
.M
getKey()
Obtains theEnum
key for theManagedFunctionObjectType
.java.lang.String
getObjectName()
Obtains the name for theManagedFunctionObjectType
.java.lang.Class<?>
getObjectType()
Obtains the required type of the dependentObject
.java.lang.String
getTypeQualifier()
Obtains the qualifier on the type.ManagedFunctionObjectTypeBuilder<M>
setKey(M key)
Specifies theEnum
for thisManagedFunctionObjectTypeBuilder
.ManagedFunctionObjectTypeBuilder<M>
setLabel(java.lang.String label)
Provides means to specify a display label for theObject
.ManagedFunctionObjectTypeBuilder<M>
setTypeQualifier(java.lang.String qualifier)
Specifies the type qualifier.-
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
-
ManagedFunctionObjectTypeImpl
public ManagedFunctionObjectTypeImpl(java.lang.Class<?> objectType, int index)
Initiate with the index of theManagedFunctionObjectType
.- Parameters:
objectType
- Type of the dependencyObject
.index
- Index identifying thisManagedFunctionObjectType
.
-
-
Method Detail
-
setKey
public ManagedFunctionObjectTypeBuilder<M> setKey(M key)
Description copied from interface:ManagedFunctionObjectTypeBuilder
Specifies theEnum
for thisManagedFunctionObjectTypeBuilder
. This is required to be set ifM
is notNone
orIndexed
.- Specified by:
setKey
in interfaceManagedFunctionObjectTypeBuilder<M extends java.lang.Enum<M>>
- Parameters:
key
-Enum
for thisManagedFunctionObjectTypeBuilder
.- Returns:
this
.
-
setTypeQualifier
public ManagedFunctionObjectTypeBuilder<M> setTypeQualifier(java.lang.String qualifier)
Description copied from interface:ManagedFunctionObjectTypeBuilder
Specifies the type qualifier.- Specified by:
setTypeQualifier
in interfaceManagedFunctionObjectTypeBuilder<M extends java.lang.Enum<M>>
- Parameters:
qualifier
- Type qualifier.- Returns:
this
.
-
setLabel
public ManagedFunctionObjectTypeBuilder<M> setLabel(java.lang.String label)
Description copied from interface:ManagedFunctionObjectTypeBuilder
Provides means to specify a display label for the
Object
.This need not be set as is only an aid to better identify the
Object
. If not set theManagedFunctionTypeBuilder
will use the following order to get a display label:Enum
key name- index value
- Specified by:
setLabel
in interfaceManagedFunctionObjectTypeBuilder<M extends java.lang.Enum<M>>
- Parameters:
label
- Display label for theObject
.- Returns:
this
.
-
addAnnotation
public ManagedFunctionObjectTypeBuilder<M> addAnnotation(java.lang.Object annotation)
Description copied from interface:ManagedFunctionObjectTypeBuilder
Adds an annotation.- Specified by:
addAnnotation
in interfaceManagedFunctionObjectTypeBuilder<M extends java.lang.Enum<M>>
- Parameters:
annotation
- Annotation.- Returns:
this
.
-
getObjectName
public java.lang.String getObjectName()
Description copied from interface:ManagedFunctionObjectType
Obtains the name for theManagedFunctionObjectType
.- Specified by:
getObjectName
in interfaceManagedFunctionObjectType<M extends java.lang.Enum<M>>
- Returns:
- Name for the
ManagedFunctionObjectType
.
-
getIndex
public int getIndex()
Description copied from interface:ManagedFunctionObjectType
Obtains the index for the
ManagedFunctionObjectType
.Should there be an
Enum
then will be theEnum.ordinal()
value. Otherwise will be the index that this was added.- Specified by:
getIndex
in interfaceManagedFunctionObjectType<M extends java.lang.Enum<M>>
- Specified by:
getIndex
in interfaceManagedFunctionObjectTypeBuilder<M extends java.lang.Enum<M>>
- Returns:
- Index for the
ManagedFunctionObjectType
.
-
getObjectType
public java.lang.Class<?> getObjectType()
Description copied from interface:ManagedFunctionObjectType
Obtains the required type of the dependentObject
.- Specified by:
getObjectType
in interfaceManagedFunctionObjectType<M extends java.lang.Enum<M>>
- Returns:
- Required type of the dependent
Object
.
-
getTypeQualifier
public java.lang.String getTypeQualifier()
Description copied from interface:ManagedFunctionObjectType
Obtains the qualifier on the type.
This is to enable qualifying the type of dependency required.
- Specified by:
getTypeQualifier
in interfaceManagedFunctionObjectType<M extends java.lang.Enum<M>>
- Returns:
- Qualifier on the type. May be
null
if not qualifying the type.
-
getKey
public M getKey()
Description copied from interface:ManagedFunctionObjectType
Obtains theEnum
key for theManagedFunctionObjectType
.- Specified by:
getKey
in interfaceManagedFunctionObjectType<M extends java.lang.Enum<M>>
- Returns:
Enum
key for theManagedFunctionObjectType
. May benull
if noEnum
for objects.
-
getAnnotations
public java.lang.Object[] getAnnotations()
Description copied from interface:AnnotatedType
Obtains the annotations.- Specified by:
getAnnotations
in interfaceAnnotatedType
- Returns:
- Annotations.
-
-