public <A extends Annotation> boolean isAnnotatedWith(Class<A> annotationType) { return executableElement.getAnnotationsByType(annotationType).length > 0; }
private boolean suppressWarnings(ExecutableElement methodElement, String warningName) { SuppressWarnings[] suppressWarnings = methodElement.getAnnotationsByType(SuppressWarnings.class); for (SuppressWarnings suppression : suppressWarnings) { for (String name : suppression.value()) { if (warningName.equals(name)) { return true; } } } return false; }
@Override public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) { return executableElement.getAnnotationsByType(annotationType); }
@Override public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) { return executableElement.getAnnotationsByType(annotationType); }
@Override public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) { return executableElement.getAnnotationsByType(annotationType); }
@Override public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) { return executableElement.getAnnotationsByType(annotationType); }
@Override public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) { return executableElement.getAnnotationsByType(annotationType); }
@Override public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) { return executableElement.getAnnotationsByType(annotationType); }
@Override public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) { return executableElement.getAnnotationsByType(annotationType); }
@Override public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) { return executableElement.getAnnotationsByType(annotationType); }
public <A extends Annotation> boolean isAnnotatedWith(Class<A> annotationType) { return executableElement.getAnnotationsByType(annotationType).length > 0; }
@Override public void contribute(RequestHandlerMethodInfo handlerMethod, LinkTemplateBuilder link) { ExecutableElement method = handlerMethod.getHandlerMethod(); for (LinkTitle titleAnnotation : method.getAnnotationsByType(LinkTitle.class)) { if (!titleAnnotation.rel().isEmpty()) { link.addTitle(titleAnnotation.rel(), titleAnnotation.value()); } else { link.setTitle(titleAnnotation.value()); } } } }
if (element.getAnnotationsByType(MapHide.class).length > 0) { Optional<AnnotationMirror> optMirror = MoreElements.getAnnotationMirror(element, MapHide.class); if (optMirror.isPresent()) { } else if (element.getAnnotationsByType(MapElementAdapter.class).length > 0) { type = Type.ADAPTER; Optional<AnnotationMirror> optMirror = MoreElements.getAnnotationMirror(element, MapElementAdapter.class); } else if (typeName.equals(TypeName.get(String.class))) { type = Type.STRING; } else if (element.getReturnType().getKind() == TypeKind.DECLARED && element.getAnnotationsByType(MapEnum.class).length > 0) { type = Type.ENUM; } else if (element.getReturnType().getKind() == TypeKind.ARRAY) { MapElementName[] name = element.getAnnotationsByType(MapElementName.class); if (name.length > 0) { mapName = name[0].value();