Interface MethodParameterManufacturerContext
-
- All Superinterfaces:
SourceContext
,SourceProperties
public interface MethodParameterManufacturerContext extends SourceContext
Context for theMethodParameterManufacturer
.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addDefaultDependencyAnnotation(java.lang.Object annotation)
Adds an annotation to the defaultManagedFunctionObjectTypeBuilder
.<E extends java.lang.Throwable>
ManagedFunctionEscalationTypeBuilderaddEscalation(java.lang.Class<E> escalationType)
Adds aManagedFunctionEscalationTypeBuilder
to theManagedFunctionTypeBuilder
definition.int
addFlow(java.util.function.Consumer<ManagedFunctionFlowTypeBuilder<Indexed>> builder)
Adds aManagedFunctionFlowTypeBuilder
to theManagedFunctionTypeBuilder
definition.int
addObject(java.lang.Class<?> objectType, java.util.function.Consumer<ManagedFunctionObjectTypeBuilder<Indexed>> builder)
Adds aManagedFunctionObjectTypeBuilder
to theManagedFunctionTypeBuilder
definition.java.lang.String
getFunctionName()
Obtains the name of theManagedFunction
.java.lang.reflect.Method
getMethod()
Obtains theMethod
.java.lang.annotation.Annotation[]
getParameterAnnotations()
Obtains theAnnotation
instances for the parameter.java.lang.Class<?>
getParameterClass()
Obtains theClass
of the parameter.int
getParameterIndex()
Obtains the index of the parameter on theMethod
.java.lang.String
getParameterQualifier()
Obtains the parameter qualifier.java.lang.reflect.Type
getParameterType()
Obtains theType
of the parameter.SourceContext
getSourceContext()
Obtains theSourceContext
.-
Methods inherited from interface net.officefloor.frame.api.source.SourceContext
getClassLoader, getClock, getLogger, getName, getOptionalResource, getProfiles, getResource, isLoadingType, loadClass, loadOptionalClass, loadOptionalService, loadOptionalServices, loadService, loadService, loadServices
-
Methods inherited from interface net.officefloor.frame.api.source.SourceProperties
getProperties, getProperty, getProperty, getPropertyNames
-
-
-
-
Method Detail
-
getParameterClass
java.lang.Class<?> getParameterClass()
Obtains theClass
of the parameter.- Returns:
Class
of the parameter.
-
getParameterType
java.lang.reflect.Type getParameterType()
Obtains theType
of the parameter.- Returns:
Type
of the parameter.
-
getParameterQualifier
java.lang.String getParameterQualifier()
Obtains the parameter qualifier.
This is via
Qualifier
orQualified
Annotation
on the parameter.This provides standard means to obtain the qualifier and avoid each
MethodParameterManufacturer
handlingAnnotation
to determine.- Returns:
- Qualifier for the parameter.
-
getParameterAnnotations
java.lang.annotation.Annotation[] getParameterAnnotations()
Obtains theAnnotation
instances for the parameter.- Returns:
Annotation
instances for the parameter.
-
getFunctionName
java.lang.String getFunctionName()
Obtains the name of theManagedFunction
.- Returns:
- Name of the
ManagedFunction
.
-
getMethod
java.lang.reflect.Method getMethod()
Obtains the
Method
.Due to type erasure, the type information on the parameter
Class
may be lost. This allows more information to be derived about the parameter.- Returns:
Method
.
-
getParameterIndex
int getParameterIndex()
Obtains the index of the parameter on theMethod
.- Returns:
- Index of the parameter on the
Method
.
-
addObject
int addObject(java.lang.Class<?> objectType, java.util.function.Consumer<ManagedFunctionObjectTypeBuilder<Indexed>> builder)
Adds aManagedFunctionObjectTypeBuilder
to theManagedFunctionTypeBuilder
definition.- Parameters:
objectType
- Type of the dependentObject
.builder
- Means to build theManagedFunctionObjectTypeBuilder
.- Returns:
- Index for the added
Object
.
-
addFlow
int addFlow(java.util.function.Consumer<ManagedFunctionFlowTypeBuilder<Indexed>> builder)
Adds aManagedFunctionFlowTypeBuilder
to theManagedFunctionTypeBuilder
definition.- Parameters:
builder
- Means to build theManagedFunctionFlowTypeBuilder
.- Returns:
- Index for the added
Flow
.
-
addEscalation
<E extends java.lang.Throwable> ManagedFunctionEscalationTypeBuilder addEscalation(java.lang.Class<E> escalationType)
Adds a
ManagedFunctionEscalationTypeBuilder
to theManagedFunctionTypeBuilder
definition.It is possible the
MethodParameterFactory
will throw anEscalation
. While this should be avoided, this allows registeringEscalation
for being handled.- Type Parameters:
E
-Escalation
type.- Parameters:
escalationType
- Type to be handled by anEscalationFlow
.- Returns:
ManagedFunctionEscalationTypeBuilder
to provide thetype definition
.
-
addDefaultDependencyAnnotation
void addDefaultDependencyAnnotation(java.lang.Object annotation)
Adds an annotation to the default
ManagedFunctionObjectTypeBuilder
.This allows enriching the default
ManagedFunctionObjectTypeBuilder
with additional annotations.- Parameters:
annotation
- Annotation for the defaultManagedFunctionObjectTypeBuilder
.
-
getSourceContext
SourceContext getSourceContext()
Obtains theSourceContext
.- Returns:
SourceContext
.
-
-