Package org.int4.dirk.library
Class ConfigurableAnnotationStrategy
- java.lang.Object
-
- org.int4.dirk.library.ConfigurableAnnotationStrategy
-
- All Implemented Interfaces:
AnnotationStrategy
public class ConfigurableAnnotationStrategy extends java.lang.Object implements AnnotationStrategy
Implementation ofAnnotationStrategywhich allows configuring one or more annotations used to control injection.
-
-
Constructor Summary
Constructors Constructor Description ConfigurableAnnotationStrategy(java.lang.Class<? extends java.lang.annotation.Annotation> inject, java.lang.Class<? extends java.lang.annotation.Annotation> qualifier, java.lang.Class<? extends java.lang.annotation.Annotation> optional)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.annotation.Annotation>getInjectAnnotations(java.lang.reflect.AnnotatedElement element)java.util.Set<java.lang.annotation.Annotation>getQualifiers(java.lang.reflect.AnnotatedElement element)booleanisOptional(java.lang.reflect.AnnotatedElement element)booleanisQualifier(java.lang.annotation.Annotation annotation)
-
-
-
Constructor Detail
-
ConfigurableAnnotationStrategy
public ConfigurableAnnotationStrategy(java.lang.Class<? extends java.lang.annotation.Annotation> inject, java.lang.Class<? extends java.lang.annotation.Annotation> qualifier, java.lang.Class<? extends java.lang.annotation.Annotation> optional)Constructs a new instance.- Parameters:
inject- an inject annotationClassto use, cannot benullqualifier- a qualifier annotationClassto use, cannot benulloptional- an optional annotationClassto use, can benull
-
-
Method Detail
-
isOptional
public boolean isOptional(java.lang.reflect.AnnotatedElement element)
- Specified by:
isOptionalin interfaceAnnotationStrategy
-
getInjectAnnotations
public java.util.Set<java.lang.annotation.Annotation> getInjectAnnotations(java.lang.reflect.AnnotatedElement element)
- Specified by:
getInjectAnnotationsin interfaceAnnotationStrategy
-
getQualifiers
public java.util.Set<java.lang.annotation.Annotation> getQualifiers(java.lang.reflect.AnnotatedElement element)
- Specified by:
getQualifiersin interfaceAnnotationStrategy
-
isQualifier
public boolean isQualifier(java.lang.annotation.Annotation annotation)
- Specified by:
isQualifierin interfaceAnnotationStrategy
-
-