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 interface
ClassDependencyManufacturerContext.AnnotationConfigurer<T>
Allows specifying annotation.static interface
ClassDependencyManufacturerContext.ClassDependency
Allows further configuration of theClass
dependency.static interface
ClassDependencyManufacturerContext.ClassFlow
Allows further configuration of theClass
dependency.static interface
ClassDependencyManufacturerContext.ItemBuilder
Builds and adds the item.static interface
ClassDependencyManufacturerContext.QualifierConfigurer<T>
Allows specifying the qualifier.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAnnotation(java.lang.Object annotation)
Adds an annotation to theManagedFunction
/ManagedObject
requiring 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 theAnnotation
by the input type.java.lang.annotation.Annotation[]
getDependencyAnnotations()
Obtains theAnnotation
instances for the dependency.java.lang.Class<?>
getDependencyClass()
Obtains theClass
of the dependency.java.lang.String
getDependencyQualifier()
Obtains the dependency qualifier.java.lang.reflect.Type
getDependencyType()
Obtains theType
of the dependency.java.util.logging.Logger
getLogger()
Obtains theLogger
.java.lang.String
getName()
Obtains the name of item receiving the dependency.SourceContext
getSourceContext()
Obtains theSourceContext
.ClassDependencyManufacturerContext.ClassDependency
newDependency(java.lang.Class<?> objectType)
ClassDependencyManufacturerContext.ClassFlow
newFlow(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 theClass
of the dependency.- Returns:
Class
of the dependency.
-
getDependencyType
java.lang.reflect.Type getDependencyType()
Obtains theType
of the dependency.- Returns:
Type
of the dependency.
-
getDependencyQualifier
java.lang.String getDependencyQualifier()
Obtains the dependency qualifier.
This is via
Qualifier
orQualified
Annotation
on the dependency.This provides standard means to obtain the qualifier and avoid each
ClassDependencyManufacturer
handlingAnnotation
to determine.- Returns:
- Qualifier for the dependency.
-
getDependencyAnnotations
java.lang.annotation.Annotation[] getDependencyAnnotations()
Obtains theAnnotation
instances for the dependency.- Returns:
Annotation
instances for the dependency.
-
getDependencyAnnotation
<A extends java.lang.annotation.Annotation> A getDependencyAnnotation(java.lang.Class<? extends A> annotationType)
Obtains theAnnotation
by the input type.- Parameters:
annotationType
- RequiredAnnotation
type.- Returns:
Annotation
ornull
if noAnnotation
by 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
-Escalation
type.- Parameters:
escalationType
- Type to be handled by anEscalationFlow
.
-
addAnnotation
void addAnnotation(java.lang.Object annotation)
Adds an annotation to theManagedFunction
/ManagedObject
requiring the dependency.- Parameters:
annotation
- Annotation.
-
getSourceContext
SourceContext getSourceContext()
Obtains theSourceContext
.- Returns:
SourceContext
.
-
-