Class SimpleScopeStrategy

    • 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.
    • 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 annotation Class to use for identifying scope annotations, cannot be null
        defaultAnnotation - an annotation which indicates the default scope, cannot be null
        singletonAnnotation - an annotation which indicates singletons, cannot be null
        dependentAnnotation - an annotation which indicates dependent scoped objects, cannot be null
    • Method Detail

      • isPseudoScope

        public boolean isPseudoScope​(java.lang.annotation.Annotation annotation)
        Specified by:
        isPseudoScope in interface ScopeStrategy
      • getScope

        public java.lang.annotation.Annotation getScope​(java.lang.reflect.AnnotatedElement element)
                                                 throws org.int4.dirk.api.definition.DefinitionException
        Specified by:
        getScope in interface ScopeStrategy
        Throws:
        org.int4.dirk.api.definition.DefinitionException