public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { return getAnnotation(annotationClass) != null; }
public Annotation[] getDeclaredAnnotations() { return getAnnotations(); }
@Override public boolean equals(Object obj) { if (obj instanceof Parameter<?>) { Parameter<?> that = (Parameter<?>) obj; return this.getDeclaringMember().equals(that.getDeclaringMember()) && this.getPosition() == that.getPosition(); } else { return false; } }
Parameter<?> p = Parameter.create(method.getKey(), parameter.getKey()); redefineAnnotationBuilder(annotationType, redefinition, p, p.getBaseType(), parameter.getValue(), null); Parameter<?> p = Parameter.create(constructor.getKey(), parameter.getKey()); redefineAnnotationBuilder(annotationType, redefinition, p, p.getBaseType(), parameter.getValue(), null);
@Override public int hashCode() { int hash = 1; hash = hash * 31 + getDeclaringMember().hashCode(); hash = hash * 31 + Integer.valueOf(position).hashCode(); return hash; }
public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { for (Annotation annotation : getAnnotations()) { if (annotation.annotationType().equals(annotationClass)) { return annotationClass.cast(annotation); } } return null; }