public ParameterInfo(MethodInfo parent, Parameter<?> parameter) { super(parameter); this.declaringMethod = parent; this.index = parameter.getIndex(); this.parameter = parameter; }
public static <T> Parameter<Constructor<T>> declaredBy(Constructor<T> ctor, int index) { return new Parameter<Constructor<T>>(ctor, index) { @Override protected Annotation[][] getParameterAnnotations() { return getDeclaringExecutable().getParameterAnnotations(); } }; }
public Parameter<?> get() throws ClassNotFoundException { if (parameter == null) { Member member = declaringMethod.get(); if (member instanceof Method) { parameter = Parameter.declaredBy((Method) member, index); } else if (member instanceof Constructor<?>) { parameter = Parameter.declaredBy((Constructor<?>) member, index); } } return parameter; }
try { final Parameter<?> parameter = k.get(); if (parameter.getDeclaringExecutable().equals(ctor.getTarget()) && param.getTarget().intValue() == parameter.getIndex()) { param.addAnnotations(v); try { final Parameter<?> parameter = k.get(); if (parameter.getDeclaringExecutable().equals(methd.getTarget()) && param.getTarget().intValue() == parameter.getIndex()) { param.addAnnotations(v);
public Annotation[] getAnnotations() { return getDeclaredAnnotations(); }
public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { for (Annotation annotation : getAnnotations()) { if (annotationClass.equals(annotation.annotationType())) { @SuppressWarnings("unchecked") final T result = (T) annotation; return result; } } return null; }
public Annotation[] getDeclaredAnnotations() { return getParameterAnnotations()[index]; }
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { return getAnnotation(annotationClass) != null; }
for (final Annotated<Parameter<Method>> parameter : this.withAnnotations() .findAnnotatedMethodParameters(interest.annotationType)) { result.getWeavable(parameter.get().getDeclaringExecutable()) .getWeavableParameter(parameter.get().getIndex()) .addAnnotations(parameter.getAnnotations()); result.getWeavable(parameter.get().getDeclaringExecutable()) .getWeavableParameter(parameter.get().getIndex()) .addAnnotations(parameter.getAnnotations());
public Annotation[] getAnnotations() { return getDeclaredAnnotations(); }
public <T extends Annotation> T getAnnotation(Class<T> annotationClass) { for (Annotation annotation : getAnnotations()) { if (annotationClass.equals(annotation.annotationType())) { @SuppressWarnings("unchecked") final T result = (T) annotation; return result; } } return null; }
public Annotation[] getDeclaredAnnotations() { return getParameterAnnotations()[index]; }
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { return getAnnotation(annotationClass) != null; }
public Parameter<?> get() throws ClassNotFoundException { if (parameter == null) { Member member = declaringMethod.get(); if (member instanceof Method) { parameter = Parameter.declaredBy((Method) member, index); } else if (member instanceof Constructor<?>) { parameter = Parameter.declaredBy((Constructor<?>) member, index); } } return parameter; }
public ParameterInfo(MethodInfo parent, Parameter<?> parameter) { super(parameter); this.declaringMethod = parent; this.index = parameter.getIndex(); this.parameter = parameter; }
public static <T> Parameter<Constructor<T>> declaredBy(Constructor<T> ctor, int index) { return new Parameter<Constructor<T>>(ctor, index) { @Override protected Annotation[][] getParameterAnnotations() { return getDeclaringExecutable().getParameterAnnotations(); } }; }
@Override public Annotation[] getDeclaredAnnotations() { try { return get().getDeclaredAnnotations(); } catch (ClassNotFoundException e) { return super.getDeclaredAnnotations(); } }
for (int i = 0; i < annotations.length; i++) { if (annotations[i].annotationType().equals(annotation)) { result.add(Parameter.declaredBy(method, i));
public static Parameter<Method> declaredBy(Method method, int index) { return new Parameter<Method>(method, index) { @Override protected Annotation[][] getParameterAnnotations() { return getDeclaringExecutable().getParameterAnnotations(); } }; } }
@Override public Annotation[] getDeclaredAnnotations() { try { return get().getDeclaredAnnotations(); } catch (ClassNotFoundException e) { return super.getDeclaredAnnotations(); } }