/** * Check if given type implements {@link java.lang.annotation.Annotation}. * * @param type The type. * @return {@code true} if given type implements {@link java.lang.annotation.Annotation}, {@code false} otherwise. */ private boolean implementsAnnotation(TypeElement type) { return types.isAssignable(type.asType(), getTypeMirror(Annotation.class)); }