Package org.int4.dirk.library
Class SimpleScopeStrategy
- java.lang.Object
-
- org.int4.dirk.library.SimpleScopeStrategy
-
- All Implemented Interfaces:
ScopeStrategy
public class SimpleScopeStrategy extends java.lang.Object implements ScopeStrategy
An implementation ofScopeStrategy.
-
-
Constructor Summary
Constructors Constructor Description SimpleScopeStrategy(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotationClass, java.lang.annotation.Annotation defaultAnnotation, java.lang.annotation.Annotation singletonAnnotation, java.lang.annotation.Annotation dependentAnnotation)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.annotation.AnnotationgetDefaultAnnotation()java.lang.annotation.AnnotationgetDependentAnnotation()java.lang.annotation.AnnotationgetScope(java.lang.reflect.AnnotatedElement element)java.lang.annotation.AnnotationgetSingletonAnnotation()booleanisPseudoScope(java.lang.annotation.Annotation annotation)
-
-
-
Constructor Detail
-
SimpleScopeStrategy
public SimpleScopeStrategy(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotationClass, java.lang.annotation.Annotation defaultAnnotation, java.lang.annotation.Annotation singletonAnnotation, java.lang.annotation.Annotation dependentAnnotation)Constructs a new instance.- Parameters:
scopeAnnotationClass- an annotationClassto use for identifying scope annotations, cannot benulldefaultAnnotation- an annotation which indicates the default scope, cannot benullsingletonAnnotation- an annotation which indicates singletons, cannot benulldependentAnnotation- an annotation which indicates dependent scoped objects, cannot benull
-
-
Method Detail
-
isPseudoScope
public boolean isPseudoScope(java.lang.annotation.Annotation annotation)
- Specified by:
isPseudoScopein interfaceScopeStrategy
-
getDefaultAnnotation
public java.lang.annotation.Annotation getDefaultAnnotation()
- Specified by:
getDefaultAnnotationin interfaceScopeStrategy
-
getDependentAnnotation
public java.lang.annotation.Annotation getDependentAnnotation()
- Specified by:
getDependentAnnotationin interfaceScopeStrategy
-
getSingletonAnnotation
public java.lang.annotation.Annotation getSingletonAnnotation()
- Specified by:
getSingletonAnnotationin interfaceScopeStrategy
-
getScope
public java.lang.annotation.Annotation getScope(java.lang.reflect.AnnotatedElement element) throws org.int4.dirk.api.definition.DefinitionException- Specified by:
getScopein interfaceScopeStrategy- Throws:
org.int4.dirk.api.definition.DefinitionException
-
-