use of jodd.paramo.MethodParameter in project jodd by oblac.
the class DbQueryBuilder method resolveMethodParameterNames.
/**
* Resolves method parameter names.
*/
protected String[] resolveMethodParameterNames(ProxyTargetInfo proxyTargetInfo) {
String[] paramNames;
Method method;
try {
method = proxyTargetInfo.targetClass.getDeclaredMethod(proxyTargetInfo.targetMethodName, proxyTargetInfo.argumentsClasses);
} catch (NoSuchMethodException ex) {
throw new DbOomException(ex);
}
MethodParameter[] methodParameters = Paramo.resolveParameters(method);
paramNames = new String[methodParameters.length];
for (int i = 0; i < methodParameters.length; i++) {
MethodParameter methodParameter = methodParameters[i];
paramNames[i] = methodParameter.getName();
}
return paramNames;
}
use of jodd.paramo.MethodParameter in project jodd by oblac.
the class Wimp method aaa.
public String aaa(int Welcome, String To, Object Jodd) {
String methodName = ProxyTarget.targetMethodName();
Class[] argTypes = ProxyTarget.createArgumentsClassArray();
Class targetClass = ProxyTarget.targetClass();
Method m = null;
try {
m = targetClass.getDeclaredMethod(methodName, argTypes);
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
MethodParameter[] methodParameters = Paramo.resolveParameters(m);
Class c = ProxyTarget.argumentType(1);
Object val = ProxyTarget.argument(1);
return c.getName() + val.toString() + methodParameters[0].getName() + methodParameters[1].getName() + methodParameters[2].getName();
}
Aggregations