/** * Returns the annotation preference defined for the given annotation type. * * @param annotationType the annotation type * @return the annotation preference for the given annotation type or <code>null</code> */ public AnnotationPreference getAnnotationPreference(String annotationType) { if (annotationType == null || annotationType == Annotation.TYPE_UNKNOWN) return null; AnnotationTypeHierarchy hierarchy= getAnnotationTypeHierarchy(); AnnotationType type= hierarchy.getAnnotationType(annotationType); AnnotationPreference preference= type.getPreference(); if (preference == null) { preference= new DelegatingAnnotationPreference(type, this); type.setAnnotationPreference(preference); } return preference; }
/** * Returns the annotation preference defined for the given annotation type. * * @param annotationType the annotation type * @return the annotation preference for the given annotation type or <code>null</code> */ public AnnotationPreference getAnnotationPreference(String annotationType) { if (annotationType == null || annotationType == Annotation.TYPE_UNKNOWN) return null; AnnotationTypeHierarchy hierarchy= getAnnotationTypeHierarchy(); AnnotationType type= hierarchy.getAnnotationType(annotationType); AnnotationPreference preference= type.getPreference(); if (preference == null) { preference= new DelegatingAnnotationPreference(type, this); type.setAnnotationPreference(preference); } return preference; }