/** * Invoke the specified {@link Method} against the supplied target object with no Args. The target object can * be <code>null</code> when invoking a static {@link Method}. * * @param method the method to invoke * @param target the target object to invoke the method on * @return the invocation result, if any * @see #invokeMethod(java.lang.reflect.Method, Object, Object[]) */ public static Object invokeMethod(Method method, Object target) { return invokeMethod(method, target, Arrays2.EMPTY_OBJECT_ARRAY); }
protected static String doGetPath(Object resource) { return (String) Reflection.invokeMethod(VIRTUAL_FILE_METHOD_GET_PATH_NAME, resource); } }
protected Resource resolveRootDirResource(Resource original) throws IOException { if (equinoxResolveMethod != null) { URL url = original.getURL(); if (url.getProtocol().startsWith("bundle")) { return new UrlResource((URL)Reflection.invokeMethod(equinoxResolveMethod, null, url)); } } return original; }
@Override public List<DbCommand> getSchemaChangeCommands(SchemaChange change, SchemaChangeContext context) { List<DbCommand> commands = new ArrayList<>(); Method method = schemaChangeMethods.get(change.getClass()); if (null == method) { method = Reflection.findMethod(this.getClass(), "createSchemaChangeCommands", SchemaChangeContext.class, change.getClass(), List.class); if (null == method) { throw new UnsupportedChangeException("Unsupported change '" + change.getClass().getSimpleName() + "'", change); } schemaChangeMethods.put(change.getClass(), method); } Reflection.invokeMethod(method, this, context, change, commands); return commands; }
if(null != destroyMethod) { try { Reflection.invokeMethod(destroyMethod, bean); } catch (Throwable e) { log.warn("Error destroy bean '{}' : {}", null == bd ? bean : bd, e.getMessage(), e);
Reflection.invokeMethod(initMethod,null); } catch (Exception e) { throw new BeanException("Error invoking the init method '" + initMethodName + "' in class '" + initClassName + "', source : " + init.getSource());
Reflection.invokeMethod(bd.getInitMethod(), bean); init = true;