@Override public final Annotation[] getDeclaredAnnotations() { return accessibleObject.getDeclaredAnnotations(); }
@Override public final Annotation[] getDeclaredAnnotations() { return accessibleObject.getDeclaredAnnotations(); }
@Override public final Annotation[] getDeclaredAnnotations() { return accessibleObject.getDeclaredAnnotations(); }
private Annotation[] getAnnotations(final AccessibleObject accessibleObject) { return accessibleObject == null ? FilteringHelper.EMPTY_ANNOTATIONS : accessibleObject.getDeclaredAnnotations(); }
@Override public final Annotation[] getDeclaredAnnotations() { return accessibleObject.getDeclaredAnnotations(); }
public Annotation[] getAnnotations() { // for all but Class, getAnnotations == getDeclaredAnnotations return getDeclaredAnnotations(); }
public Annotation[] getDeclaredAnnotations() { return getDeclaredAnnotations(true); }
public List<Annotation> callAccessibleObjectGetDeclaredAnnotations(AccessibleObject m) { return Arrays.asList(m.getDeclaredAnnotations()); } public Annotation callAccessibleObjectGetAnnotation(AccessibleObject m, Class<? extends Annotation> annotClass) {
public <T extends Annotation> T getAnnotation(Class<T> annotationType) { if (annotationType == null) { throw new NullPointerException("annotationType == null"); } Annotation[] annos = getDeclaredAnnotations(false); for (int i = annos.length-1; i >= 0; --i) { if (annos[i].annotationType() == annotationType) { return (T) annos[i]; } } return null; }
/** * @since 1.5 */ public Annotation[] getAnnotations() { return getDeclaredAnnotations(); }
@Override public final Annotation[] getDeclaredAnnotations() { return accessibleObject.getDeclaredAnnotations(); }
public <T extends Annotation> T getAnnotation(Class<T> annotationType) { if (annotationType == null) { throw new NullPointerException("annotationType == null"); } Annotation[] annos = getDeclaredAnnotations(false); for (int i = annos.length-1; i >= 0; --i) { if (annos[i].annotationType() == annotationType) { return (T) annos[i]; } } return null; }
public <T extends Annotation> T getAnnotation(Class<T> annotationType) { if (annotationType == null) { throw new NullPointerException("annotationType == null"); } Annotation[] annos = getDeclaredAnnotations(false); for (int i = annos.length-1; i >= 0; --i) { if (annos[i].annotationType() == annotationType) { return (T) annos[i]; } } return null; }
public <T extends Annotation> T getAnnotation(Class<T> annotationType) { if (annotationType == null) { throw new NullPointerException("annotationType == null"); } Annotation[] annos = getDeclaredAnnotations(false); for (int i = annos.length-1; i >= 0; --i) { if (annos[i].annotationType() == annotationType) { return (T) annos[i]; } } return null; }
public <T extends Annotation> T getAnnotation(Class<T> annotationType) { if (annotationType == null) { throw new NullPointerException("annotationType == null"); } Annotation[] annos = getDeclaredAnnotations(false); for (int i = annos.length-1; i >= 0; --i) { if (annos[i].annotationType() == annotationType) { return (T) annos[i]; } } return null; }
public <T extends Annotation> T getAnnotation(Class<T> annotationType) { if (annotationType == null) { throw new NullPointerException("annotationType == null"); } Annotation[] annos = getDeclaredAnnotations(false); for (int i = annos.length-1; i >= 0; --i) { if (annos[i].annotationType() == annotationType) { return (T) annos[i]; } } return null; }
public <T extends Annotation> T getAnnotation(Class<T> annotationType) { if (annotationType == null) { throw new NullPointerException("annotationType == null"); } Annotation[] annos = getDeclaredAnnotations(false); for (int i = annos.length-1; i >= 0; --i) { if (annos[i].annotationType() == annotationType) { return (T) annos[i]; } } return null; }
private Annotation getMethodAnnotation(AccessibleObject o, String annotationClassName) { for(Annotation next : o.getDeclaredAnnotations()) { if( next.annotationType().getName().equals(annotationClassName)) { return next; } } return null; }
@JTranscSync public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { for (Annotation annotation : getDeclaredAnnotations()) { if (annotation.getClass() == annotationClass) return (T) annotation; } return null; }
@JRubyMethod(name = "declared_annotations?") public RubyBoolean declared_annotations_p() { return getRuntime().newBoolean(accessibleObject().getDeclaredAnnotations().length > 0); }