public boolean hasAnnotation(IJAnnotatable annotatable, Class<? extends Annotation> annotationClass) { return hasAnnotation(annotatable, annotationClass.getCanonicalName()); }
private boolean hasAnnotation(IJAnnotatable annotatable, AnnotationMirror annotationMirror) { return hasAnnotation(annotatable, annotationMirror.getAnnotationType().toString()); }
public void copyAnnotation(IJAnnotatable annotatable, AnnotationMirror annotationMirror) { Map<? extends ExecutableElement, ? extends AnnotationValue> parameters = annotationMirror.getElementValues(); if (!hasAnnotation(annotatable, annotationMirror) || annotatable instanceof JAnnotationArrayMember) { AbstractJClass annotation = typeMirrorToJClass(annotationMirror.getAnnotationType()); JAnnotationUse annotate = annotatable.annotate(annotation); for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> param : parameters.entrySet()) { param.getValue().accept(new AnnotationParamExtractor(annotate, this), param.getKey().getSimpleName().toString()); } } }
copyNonAAAnnotations(method, executableElement.getAnnotationMirrors()); if (!hasAnnotation(method, Override.class)) { method.annotate(Override.class);
public boolean hasAnnotation(IJAnnotatable annotatable, Class<? extends Annotation> annotationClass) { return hasAnnotation(annotatable, annotationClass.getCanonicalName()); }
private boolean hasAnnotation(IJAnnotatable annotatable, AnnotationMirror annotationMirror) { return hasAnnotation(annotatable, annotationMirror.getAnnotationType().toString()); }
public void copyAnnotation(IJAnnotatable annotatable, AnnotationMirror annotationMirror) { Map<? extends ExecutableElement, ? extends AnnotationValue> parameters = annotationMirror.getElementValues(); if (!hasAnnotation(annotatable, annotationMirror) || annotatable instanceof JAnnotationArrayMember) { AbstractJClass annotation = typeMirrorToJClass(annotationMirror.getAnnotationType()); JAnnotationUse annotate = annotatable.annotate(annotation); for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> param : parameters.entrySet()) { param.getValue().accept(new AnnotationParamExtractor(annotate, this), param.getKey().getSimpleName().toString()); } } }
copyNonAAAnnotations(method, executableElement.getAnnotationMirrors()); if (!hasAnnotation(method, Override.class)) { method.annotate(Override.class);