public static Object callMethod0(Object target, String methodN) throws Exception { if (target == null) { d("Assert: Illegal params " + target); return null; } if (dbg > 0) d("callMethod0 " + target.getClass().getName() + "." + methodN); Class params[] = new Class[0]; Method m = findMethod(target.getClass(), methodN, params); if (m == null) throw new NoSuchMethodException(target.getClass().getName() + " " + methodN); return m.invoke(target, emptyArray); }
public static Object callMethod0(Object target, String methodN) throws Exception { if (target == null) { d("Assert: Illegal params " + target); return null; } if (dbg > 0) d("callMethod0 " + target.getClass().getName() + "." + methodN); Class params[] = new Class[0]; Method m = findMethod(target.getClass(), methodN, params); if (m == null) throw new NoSuchMethodException(target.getClass().getName() + " " + methodN); return m.invoke(target, emptyArray); }
public static Object callMethod0(Object target, String methodN) throws Exception { if (target == null) { d("Assert: Illegal params " + target); return null; } if (dbg > 0) d("callMethod0 " + target.getClass().getName() + "." + methodN); Class params[] = new Class[0]; Method m = findMethod(target.getClass(), methodN, params); if (m == null) throw new NoSuchMethodException(target.getClass().getName() + " " + methodN); return m.invoke(target, emptyArray); }
public static Object callMethod1(Object target, String methodN, Object param1, String typeParam1, ClassLoader cl) throws Exception { if (target == null || param1 == null) { d("Assert: Illegal params " + target + " " + param1); } if (dbg > 0) d("callMethod1 " + target.getClass().getName() + " " + param1.getClass().getName() + " " + typeParam1); Class params[] = new Class[1]; if (typeParam1 == null) params[0] = param1.getClass(); else params[0] = cl.loadClass(typeParam1); Method m = findMethod(target.getClass(), methodN, params); if (m == null) throw new NoSuchMethodException(target.getClass().getName() + " " + methodN); return m.invoke(target, new Object[] { param1 }); }
public static Object callMethod1(Object target, String methodN, Object param1, String typeParam1, ClassLoader cl) throws Exception { if (target == null || param1 == null) { d("Assert: Illegal params " + target + " " + param1); } if (dbg > 0) d("callMethod1 " + target.getClass().getName() + " " + param1.getClass().getName() + " " + typeParam1); Class<?> params[] = new Class[1]; if (typeParam1 == null) params[0] = param1.getClass(); else params[0] = cl.loadClass(typeParam1); Method m = findMethod(target.getClass(), methodN, params); if (m == null) throw new NoSuchMethodException(target.getClass().getName() + " " + methodN); return m.invoke(target, new Object[] { param1 }); }
public static Object callMethod1(Object target, String methodN, Object param1, String typeParam1, ClassLoader cl) throws Exception { if (target == null || param1 == null) { d("Assert: Illegal params " + target + " " + param1); } if (dbg > 0) d("callMethod1 " + target.getClass().getName() + " " + param1.getClass().getName() + " " + typeParam1); Class params[] = new Class[1]; if (typeParam1 == null) params[0] = param1.getClass(); else params[0] = cl.loadClass(typeParam1); Method m = findMethod(target.getClass(), methodN, params); if (m == null) throw new NoSuchMethodException(target.getClass().getName() + " " + methodN); return m.invoke(target, new Object[] { param1 }); }
public static Object callMethodN(Object target, String methodN, Object params[], Class typeParams[]) throws Exception { Method m = null; m = findMethod(target.getClass(), methodN, typeParams); if (m == null) { d("Can't find method " + methodN + " in " + target + " CLASS " + target.getClass()); return null; } Object o = m.invoke(target, params); if (dbg > 0) { // debug StringBuffer sb = new StringBuffer(); sb.append("" + target.getClass().getName() + "." + methodN + "( "); for (int i = 0; i < params.length; i++) { if (i > 0) sb.append(", "); sb.append(params[i]); } sb.append(")"); d(sb.toString()); } return o; }
public static Object callMethodN(Object target, String methodN, Object params[], Class<?> typeParams[]) throws Exception { Method m = null; m = findMethod(target.getClass(), methodN, typeParams); if (m == null) { d("Can't find method " + methodN + " in " + target + " CLASS " + target.getClass()); return null; } Object o = m.invoke(target, params); if (dbg > 0) { // debug StringBuilder sb = new StringBuilder(); sb.append("" + target.getClass().getName() + "." + methodN + "( "); for (int i = 0; i < params.length; i++) { if (i > 0) sb.append(", "); sb.append(params[i]); } sb.append(")"); d(sb.toString()); } return o; }
public static Object callMethodN(Object target, String methodN, Object params[], Class typeParams[]) throws Exception { Method m = null; m = findMethod(target.getClass(), methodN, typeParams); if (m == null) { d("Can't find method " + methodN + " in " + target + " CLASS " + target.getClass()); return null; } Object o = m.invoke(target, params); if (dbg > 0) { // debug StringBuffer sb = new StringBuffer(); sb.append("" + target.getClass().getName() + "." + methodN + "( "); for (int i = 0; i < params.length; i++) { if (i > 0) sb.append(", "); sb.append(params[i]); } sb.append(")"); d(sb.toString()); } return o; }