Interface ClassDependencyManufacturerContext
-
- All Superinterfaces:
StatePoint
public interface ClassDependencyManufacturerContext extends StatePoint
Context for theClassDependencyManufacturer.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceClassDependencyManufacturerContext.AnnotationConfigurer<T>Allows specifying annotation.static interfaceClassDependencyManufacturerContext.ClassDependencyAllows further configuration of theClassdependency.static interfaceClassDependencyManufacturerContext.ClassFlowAllows further configuration of theClassdependency.static interfaceClassDependencyManufacturerContext.ItemBuilderBuilds and adds the item.static interfaceClassDependencyManufacturerContext.QualifierConfigurer<T>Allows specifying the qualifier.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAnnotation(java.lang.Object annotation)Adds an annotation to theManagedFunction/ManagedObjectrequiring the dependency.<E extends java.lang.Throwable>
voidaddEscalation(java.lang.Class<E> escalationType)Registers anEscalation.<A extends java.lang.annotation.Annotation>
AgetDependencyAnnotation(java.lang.Class<? extends A> annotationType)Obtains theAnnotationby the input type.java.lang.annotation.Annotation[]getDependencyAnnotations()Obtains theAnnotationinstances for the dependency.java.lang.Class<?>getDependencyClass()Obtains theClassof the dependency.java.lang.StringgetDependencyQualifier()Obtains the dependency qualifier.java.lang.reflect.TypegetDependencyType()Obtains theTypeof the dependency.java.util.logging.LoggergetLogger()Obtains theLogger.java.lang.StringgetName()Obtains the name of item receiving the dependency.SourceContextgetSourceContext()Obtains theSourceContext.ClassDependencyManufacturerContext.ClassDependencynewDependency(java.lang.Class<?> objectType)ClassDependencyManufacturerContext.ClassFlownewFlow(java.lang.String flowName)-
Methods inherited from interface net.officefloor.plugin.clazz.state.StatePoint
getAnnotatedElement, getExecutable, getExecutableParameterIndex, getField, toLocation
-
-
-
-
Method Detail
-
getDependencyClass
java.lang.Class<?> getDependencyClass()
Obtains theClassof the dependency.- Returns:
Classof the dependency.
-
getDependencyType
java.lang.reflect.Type getDependencyType()
Obtains theTypeof the dependency.- Returns:
Typeof the dependency.
-
getDependencyQualifier
java.lang.String getDependencyQualifier()
Obtains the dependency qualifier.
This is via
QualifierorQualifiedAnnotationon the dependency.This provides standard means to obtain the qualifier and avoid each
ClassDependencyManufacturerhandlingAnnotationto determine.- Returns:
- Qualifier for the dependency.
-
getDependencyAnnotations
java.lang.annotation.Annotation[] getDependencyAnnotations()
Obtains theAnnotationinstances for the dependency.- Returns:
Annotationinstances for the dependency.
-
getDependencyAnnotation
<A extends java.lang.annotation.Annotation> A getDependencyAnnotation(java.lang.Class<? extends A> annotationType)
Obtains theAnnotationby the input type.- Parameters:
annotationType- RequiredAnnotationtype.- Returns:
Annotationornullif noAnnotationby the required type.
-
getName
java.lang.String getName()
Obtains the name of item receiving the dependency.- Returns:
- Name of item receiving the dependency.
-
getLogger
java.util.logging.Logger getLogger()
Obtains theLogger.- Returns:
Logger.
-
newDependency
ClassDependencyManufacturerContext.ClassDependency newDependency(java.lang.Class<?> objectType)
- Parameters:
objectType- Type of the dependentObject.- Returns:
ClassDependencyManufacturerContext.ClassDependency.
-
newFlow
ClassDependencyManufacturerContext.ClassFlow newFlow(java.lang.String flowName)
- Parameters:
flowName- Name ofFlow.- Returns:
ClassDependencyManufacturerContext.ClassFlow.
-
addEscalation
<E extends java.lang.Throwable> void addEscalation(java.lang.Class<E> escalationType)
Registers anEscalation.- Type Parameters:
E-Escalationtype.- Parameters:
escalationType- Type to be handled by anEscalationFlow.
-
addAnnotation
void addAnnotation(java.lang.Object annotation)
Adds an annotation to theManagedFunction/ManagedObjectrequiring the dependency.- Parameters:
annotation- Annotation.
-
getSourceContext
SourceContext getSourceContext()
Obtains theSourceContext.- Returns:
SourceContext.
-
-