Interface ClassDependencyManufacturerContext
- All Superinterfaces:
StatePoint
Context for the
ClassDependencyManufacturer.- Author:
- Daniel Sagenschneider
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAllows specifying annotation.static interfaceAllows further configuration of theClassdependency.static interfaceAllows further configuration of theClassdependency.static interfaceBuilds and adds the item.static interfaceAllows specifying the qualifier. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(Object annotation) Adds an annotation to theManagedFunction/ManagedObjectrequiring the dependency.<E extends Throwable>
voidaddEscalation(Class<E> escalationType) Registers anEscalation.<A extends Annotation>
AgetDependencyAnnotation(Class<? extends A> annotationType) Obtains theAnnotationby the input type.Obtains theAnnotationinstances for the dependency.Class<?>Obtains theClassof the dependency.Obtains the dependency qualifier.Obtains theTypeof the dependency.Obtains theLogger.getName()Obtains the name of item receiving the dependency.Obtains theSourceContext.newDependency(Class<?> objectType) Methods inherited from interface net.officefloor.plugin.clazz.state.StatePoint
getAnnotatedElement, getExecutable, getExecutableParameterIndex, getField, toLocation
-
Method Details
-
getDependencyClass
Class<?> getDependencyClass()Obtains theClassof the dependency.- Returns:
Classof the dependency.
-
getDependencyType
Type getDependencyType()Obtains theTypeof the dependency.- Returns:
Typeof the dependency.
-
getDependencyQualifier
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
Annotation[] getDependencyAnnotations()Obtains theAnnotationinstances for the dependency.- Returns:
Annotationinstances for the dependency.
-
getDependencyAnnotation
Obtains theAnnotationby the input type.- Type Parameters:
A- Annotation type.- Parameters:
annotationType- RequiredAnnotationtype.- Returns:
Annotationornullif noAnnotationby the required type.
-
getName
String getName()Obtains the name of item receiving the dependency.- Returns:
- Name of item receiving the dependency.
-
getLogger
Logger getLogger()Obtains theLogger.- Returns:
Logger.
-
newDependency
- Parameters:
objectType- Type of the dependentObject.- Returns:
ClassDependencyManufacturerContext.ClassDependency.
-
newFlow
- Parameters:
flowName- Name ofFlow.- Returns:
ClassDependencyManufacturerContext.ClassFlow.
-
addEscalation
Registers anEscalation.- Type Parameters:
E-Escalationtype.- Parameters:
escalationType- Type to be handled by anEscalationFlow.
-
addAnnotation
Adds an annotation to theManagedFunction/ManagedObjectrequiring the dependency.- Parameters:
annotation- Annotation.
-
getSourceContext
SourceContext getSourceContext()Obtains theSourceContext.- Returns:
SourceContext.
-