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>
ManagedFunctionObjectTypeimplementation.- 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.intgetIndex()Obtains the index for theManagedFunctionObjectType.MgetKey()Obtains theEnumkey for theManagedFunctionObjectType.java.lang.StringgetObjectName()Obtains the name for theManagedFunctionObjectType.java.lang.Class<?>getObjectType()Obtains the required type of the dependentObject.java.lang.StringgetTypeQualifier()Obtains the qualifier on the type.ManagedFunctionObjectTypeBuilder<M>setKey(M key)Specifies theEnumfor 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:ManagedFunctionObjectTypeBuilderSpecifies theEnumfor thisManagedFunctionObjectTypeBuilder. This is required to be set ifMis notNoneorIndexed.- Specified by:
setKeyin interfaceManagedFunctionObjectTypeBuilder<M extends java.lang.Enum<M>>- Parameters:
key-Enumfor thisManagedFunctionObjectTypeBuilder.- Returns:
this.
-
setTypeQualifier
public ManagedFunctionObjectTypeBuilder<M> setTypeQualifier(java.lang.String qualifier)
Description copied from interface:ManagedFunctionObjectTypeBuilderSpecifies the type qualifier.- Specified by:
setTypeQualifierin 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:ManagedFunctionObjectTypeBuilderProvides 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 theManagedFunctionTypeBuilderwill use the following order to get a display label:Enumkey name- index value
- Specified by:
setLabelin 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:ManagedFunctionObjectTypeBuilderAdds an annotation.- Specified by:
addAnnotationin interfaceManagedFunctionObjectTypeBuilder<M extends java.lang.Enum<M>>- Parameters:
annotation- Annotation.- Returns:
this.
-
getObjectName
public java.lang.String getObjectName()
Description copied from interface:ManagedFunctionObjectTypeObtains the name for theManagedFunctionObjectType.- Specified by:
getObjectNamein interfaceManagedFunctionObjectType<M extends java.lang.Enum<M>>- Returns:
- Name for the
ManagedFunctionObjectType.
-
getIndex
public int getIndex()
Description copied from interface:ManagedFunctionObjectTypeObtains the index for the
ManagedFunctionObjectType.Should there be an
Enumthen will be theEnum.ordinal()value. Otherwise will be the index that this was added.- Specified by:
getIndexin interfaceManagedFunctionObjectType<M extends java.lang.Enum<M>>- Specified by:
getIndexin interfaceManagedFunctionObjectTypeBuilder<M extends java.lang.Enum<M>>- Returns:
- Index for the
ManagedFunctionObjectType.
-
getObjectType
public java.lang.Class<?> getObjectType()
Description copied from interface:ManagedFunctionObjectTypeObtains the required type of the dependentObject.- Specified by:
getObjectTypein interfaceManagedFunctionObjectType<M extends java.lang.Enum<M>>- Returns:
- Required type of the dependent
Object.
-
getTypeQualifier
public java.lang.String getTypeQualifier()
Description copied from interface:ManagedFunctionObjectTypeObtains the qualifier on the type.
This is to enable qualifying the type of dependency required.
- Specified by:
getTypeQualifierin interfaceManagedFunctionObjectType<M extends java.lang.Enum<M>>- Returns:
- Qualifier on the type. May be
nullif not qualifying the type.
-
getKey
public M getKey()
Description copied from interface:ManagedFunctionObjectTypeObtains theEnumkey for theManagedFunctionObjectType.- Specified by:
getKeyin interfaceManagedFunctionObjectType<M extends java.lang.Enum<M>>- Returns:
Enumkey for theManagedFunctionObjectType. May benullif noEnumfor objects.
-
getAnnotations
public java.lang.Object[] getAnnotations()
Description copied from interface:AnnotatedTypeObtains the annotations.- Specified by:
getAnnotationsin interfaceAnnotatedType- Returns:
- Annotations.
-
-