private AnnotationSource<O> getAnnotation(final AnnotationTargetSource<O, T> target, final List<?> modifiers, final String type) { List<AnnotationSource<O>> annotations = getAnnotations(target, modifiers); for (AnnotationSource<O> annotation : annotations) { if (Types.areEquivalent(type, annotation.getName())) { return annotation; } } return null; }
private AnnotationSource<O> getAnnotation(final AnnotationTargetSource<O, T> target, final List<?> modifiers, final String type) { List<AnnotationSource<O>> annotations = getAnnotations(target, modifiers); for (AnnotationSource<O> annotation : annotations) { if (Types.areEquivalent(type, annotation.getName())) { return annotation; } } return null; }
public boolean isManagedAnnotation(AnnotationSource<?> annotation, ClassTypeResolver classTypeResolver) throws Exception { String annotationClassName = resolveTypeName(classTypeResolver, annotation.getName()); return getConfiguredAnnotation(annotationClassName) != null; }
private AnnotationSource<O> getAnnotation(final AnnotationTargetSource<O, T> target, final List<?> modifiers, final String type) { List<AnnotationSource<O>> annotations = getAnnotations(target, modifiers); for (AnnotationSource<O> annotation : annotations) { if (Types.areEquivalent(type, annotation.getName())) { return annotation; } } return null; }
private <E extends AnnotationTargetSource<O, T>> boolean hasAnnotation(final E target, final List<?> modifiers, final String type) { for (Object object : modifiers) { if (object instanceof org.eclipse.jdt.core.dom.Annotation) { AnnotationSource<O> annotation = new AnnotationImpl<>(target, object); String annotationType = annotation.getName(); if (Types.areEquivalent(type, annotationType)) { return true; } } } return false; }
private <E extends AnnotationTargetSource<O, T>> boolean hasAnnotation(final E target, final List<?> modifiers, final String type) { for (Object object : modifiers) { if (object instanceof org.eclipse.jdt.core.dom.Annotation) { AnnotationSource<O> annotation = new AnnotationImpl<O, T>(target, object); String annotationType = annotation.getName(); if (Types.areEquivalent(type, annotationType)) { return true; } } } return false; }
private <E extends AnnotationTargetSource<O, T>> boolean hasAnnotation(final E target, final List<?> modifiers, final String type) { for (Object object : modifiers) { if (object instanceof org.eclipse.jdt.core.dom.Annotation) { AnnotationSource<O> annotation = new AnnotationImpl<O, T>(target, object); String annotationType = annotation.getName(); if (Types.areEquivalent(type, annotationType)) { return true; } } } return false; }
private Annotation createAnnotation(AnnotationSource annotationToken, ClassTypeResolver classTypeResolver) throws ModelDriverException { AnnotationDefinition annotationDefinition; Annotation annotation = null; annotationDefinition = buildAnnotationDefinition(annotationToken, classTypeResolver); if (annotationDefinition != null) { AnnotationDriver annotationDriver = new DefaultJavaRoasterModelAnnotationDriver(); annotation = annotationDriver.buildAnnotation(annotationDefinition, annotationToken); } else { logger.warn("Annotation: " + annotationToken.getName() + " is not configured for this ModelDriver driver."); } return annotation; }