protected List < Class < ? extends Annotation > > determineQualifiers ( Annotation bindingAnnotation , Annotation ... allAnnotations ) { List < Class < ? extends Annotation > > result = new ArrayList < Class < ? extends Annotation > > ( ) ; // The binding annotation itself is marked with @BindingScope Class < ? extends Annotation > bindingAnnotationType = bindingAnnotation . annotationType ( ) ; if ( bindingAnnotationType . getAnnotation ( BindingScope . class ) != null ) { result . add ( bindingAnnotationType ) ; } // The binding annotation is annotated with annotations marked with @BindingScope for ( Annotation next : bindingAnnotation . annotationType ( ) . getAnnotations ( ) ) { Class < ? extends Annotation > nextType = next . annotationType ( ) ; if ( nextType . getAnnotation ( BindingScope . class ) != null ) { result . add ( nextType ) ; } } // The method used to attach the annotation is annotated with annotations marked with @BindingScope for ( Annotation next : allAnnotations ) { Class < ? extends Annotation > nextType = next . annotationType ( ) ; if ( nextType . getAnnotation ( BindingScope . class ) != null ) { result . add ( nextType ) ; } } if ( result . isEmpty ( ) ) { result . add ( DefaultBinding . class ) ; } return result ; }
Returns the qualifiers for this method setting the Default qualifier if none are found Qualifiers can be either explicitly applied to the method or implicit on account of being found in the annotation itself ( for example