private Class<?>[] getParameterTypes(Method method, Object[] args) { Class<?>[] types = method.getParameterTypes(); final Annotation[][] parAnnotations = method.getParameterAnnotations(); for (int x = 0; x < types.length; x++) { UnwrapParam p = getUnwrapParam(parAnnotations[x]); if (p != null) { String s = p.methodName(); String tn = p.typeMethodName(); try { Method m = args[x].getClass().getMethod(s); if ("#default".equals(tn)) { types[x] = m.getReturnType(); } else { Method m2 = args[x].getClass().getMethod(tn); types[x] = (Class<?>)ReflectionUtil.setAccessible(m2).invoke(args[x]); } args[x] = ReflectionUtil.setAccessible(m).invoke(args[x]); } catch (Exception ex) { throw new RuntimeException(ex); } } } return types; }
private Class<?>[] getParameterTypes(Method method, Object[] args) { Class<?>[] types = method.getParameterTypes(); for (int x = 0; x < types.length; x++) { UnwrapParam p = getUnwrapParam(method.getParameterAnnotations()[x]); if (p != null) { String s = p.methodName(); String tn = p.typeMethodName(); try { Method m = args[x].getClass().getMethod(s); if ("#default".equals(tn)) { types[x] = m.getReturnType(); } else { Method m2 = args[x].getClass().getMethod(tn); types[x] = (Class<?>)ReflectionUtil.setAccessible(m2).invoke(args[x]); } args[x] = ReflectionUtil.setAccessible(m).invoke(args[x]); } catch (Exception ex) { throw new RuntimeException(ex); } } } return types; }
private Class<?>[] getParameterTypes(Method method, Object[] args) { Class<?>[] types = method.getParameterTypes(); final Annotation[][] parAnnotations = method.getParameterAnnotations(); for (int x = 0; x < types.length; x++) { UnwrapParam p = getUnwrapParam(parAnnotations[x]); if (p != null) { String s = p.methodName(); String tn = p.typeMethodName(); try { Method m = args[x].getClass().getMethod(s); if ("#default".equals(tn)) { types[x] = m.getReturnType(); } else { Method m2 = args[x].getClass().getMethod(tn); types[x] = (Class<?>)ReflectionUtil.setAccessible(m2).invoke(args[x]); } args[x] = ReflectionUtil.setAccessible(m).invoke(args[x]); } catch (Exception ex) { throw new RuntimeException(ex); } } } return types; }
private Class<?>[] getParameterTypes(Method method, Object[] args) { Class<?>[] types = method.getParameterTypes(); final Annotation[][] parAnnotations = method.getParameterAnnotations(); for (int x = 0; x < types.length; x++) { UnwrapParam p = getUnwrapParam(parAnnotations[x]); if (p != null) { String s = p.methodName(); String tn = p.typeMethodName(); try { Method m = args[x].getClass().getMethod(s); if ("#default".equals(tn)) { types[x] = m.getReturnType(); } else { Method m2 = args[x].getClass().getMethod(tn); types[x] = (Class<?>)ReflectionUtil.setAccessible(m2).invoke(args[x]); } args[x] = ReflectionUtil.setAccessible(m).invoke(args[x]); } catch (Exception ex) { throw new RuntimeException(ex); } } } return types; }
private Class<?>[] getParameterTypes(Method method, Object[] args) { Class<?>[] types = method.getParameterTypes(); final Annotation[][] parAnnotations = method.getParameterAnnotations(); for (int x = 0; x < types.length; x++) { UnwrapParam p = getUnwrapParam(parAnnotations[x]); if (p != null) { String s = p.methodName(); String tn = p.typeMethodName(); try { Method m = args[x].getClass().getMethod(s); if ("#default".equals(tn)) { types[x] = m.getReturnType(); } else { Method m2 = args[x].getClass().getMethod(tn); types[x] = (Class<?>)ReflectionUtil.setAccessible(m2).invoke(args[x]); } args[x] = ReflectionUtil.setAccessible(m).invoke(args[x]); } catch (Exception ex) { throw new RuntimeException(ex); } } } return types; }