protected Signature createParametersSignature(String name, String[] parameters, int index) { return new MethodParametersSignature(name, parameters, index); } }
/** * Create a new Signature. * * @param name the name * @param param the parameter number * @param parameters the parameters */ public MethodParametersSignature(String name, String[] parameters, int param) { super(name, parameters); this.param = param; checkParam(); }
/** * Check the param number makes sense */ protected void checkParam() { if (param < 0 || param >= getParameters().length) throw new IllegalArgumentException("param must be between 0 and " + getParameters().length); }
Method method = methodParametersSignature.getMethod(); if (method == null) method = SecurityActions.findMethod(clazz, signature.getName(), signature.getParametersTypes(clazz)); if (paramAnnotations[methodParametersSignature.getParam()].length == 0) return null; return new SimpleMetaDataLoader(paramAnnotations[methodParametersSignature.getParam()]); Annotation[][] paramAnnotations = method.getParameterAnnotations(); MethodParametersSignature sig = (MethodParametersSignature) signature; if (paramAnnotations[sig.getParam()].length == 0) return null; return new SimpleMetaDataLoader(paramAnnotations[sig.getParam()]);
annotations = method.getParameterAnnotations()[mps.getParam()];
/** * Create a new Signature. * * @param method the method info * @param param the parameter number */ public MethodParametersSignature(MethodInfo method, int param) { super(method.getName(), convertParameterTypes(method.getParameterTypes())); this.param = param; checkParam(); }
Annotation[][] paramAnnotations = method.getParameterAnnotations(); MethodParametersSignature sig = (MethodParametersSignature) signature; return new SimpleMetaDataLoader(paramAnnotations[sig.getParam()]); Annotation[][] paramAnnotations = method.getParameterAnnotations(); MethodParametersSignature sig = (MethodParametersSignature) signature; return new SimpleMetaDataLoader(paramAnnotations[sig.getParam()]); Annotation[][] paramAnnotations = constructor.getParameterAnnotations(); MethodParametersSignature sig = (MethodParametersSignature) signature; return new SimpleMetaDataLoader(paramAnnotations[sig.getParam()]);
/** * Gets the MDR parameters signature for a parameter * * @param i the index of the parameter * @return the parameter signature */ @Override ParametersSignature getParametersSignature(int i) { return new MethodParametersSignature(getJavaMember(), i); }
/** * Create a new Signature. * * @param name the name * @param param the parameter number * @param parameters the parameters */ public MethodParametersSignature(String name, int param, Class<?>... parameters) { super(name, parameters); this.param = param; checkParam(); }
protected Signature getParameterSignature(MemberInfo info, int index) { if (info instanceof ConstructorInfo) { ConstructorInfo ci = ConstructorInfo.class.cast(info); return new ConstructorParametersSignature(ci, index); } else if (info instanceof MethodInfo) { MethodInfo mi = MethodInfo.class.cast(info); return new MethodParametersSignature(mi, index); } else { throw new IllegalArgumentException("Cannot handle info: " + info); } }
/** * Create a new Signature. * * @param method the method * @param param the parameter number */ public MethodParametersSignature(Method method, int param) { super(method.getName(), method.getParameterTypes()); this.param = param; checkParam(); }
protected Signature getParameterSignature(MemberInfo info, int index) { if (info instanceof ConstructorInfo) { ConstructorInfo ci = ConstructorInfo.class.cast(info); return new ConstructorParametersSignature(ci, index); } else if (info instanceof MethodInfo) { MethodInfo mi = MethodInfo.class.cast(info); return new MethodParametersSignature(mi, index); } else { throw new IllegalArgumentException("Cannot handle info: " + info); } }