[Python]MySQLdbをインストール
- April 28th, 2010
Archive for ‘ April, 2010 ’
忘れないようにメモ.
public static Object invoke(final Object target, final String methodName, final Object... params) throws Exception {
List<Class<?>> parameterTypes = new ArrayList<Class<?>>();
for (Object o : params) {
parameterTypes.add(o.getClass());
}
Class<?> targetClass = target.getClass();
Method method = targetClass.getMethod(methodName, parameterTypes
.toArray((new Class<?>[] {})));
return method.invoke(target, params);
}
Popularity: 8% [?]