Invoke a super.method() style superclass method on an object instance.
This is not a normal function of the Java reflection API and is
provided by generated class accessor methods.
199048
public Object invokeSuperclassMethod(BshClassManager bcm, Object instance, String methodName, Object[] args) throws UtilEvalError, ReflectError, InvocationTargetException {
        // Delegate to the static method
        return invokeSuperclassMethodImpl(bcm, instance, methodName, args);
    }
870042
public static Object invokeMethod(Class<?> type,Object instance,String methodName,Class<?>[] inputTypes,Object[] input)
    {
        Method method=null;
        try
        {
            //get method
            method=type.getDeclaredMethod(methodName,inputTypes);
        }
        catch(Exception exception)
        {
            throw new FaxException("Unable to extract method: "+methodName+" from type: "+type,exception);
        }

        //set accessible
        method.setAccessible(true);

        Object output=null;
        try
        {
            //invoke method
            output=method.invoke(instance,input);
        }
        catch(Exception exception)
        {
            throw new FaxException("Unable to invoke method: "+methodName+" of type: "+type,exception);
        }
        
        return output;
    }
1020184
public static <T> T invokeMethod(Object obj, String methodName, Object... args) {
		Object[] theArgs = ArrayUtils.nullToEmpty(args);
		final Class<?>[] parameterTypes = ClassUtils.toClass(theArgs);
		return invokeMethod(obj, methodName, theArgs, parameterTypes);
	}
1291701
public Object invokeMethod(String name, Object args) {
        try {
            return super.invokeMethod(name, args);
        }
        // if the method was not found in the current scope (the script's methods)
        // let's try to see if there's a method closure with the same name in the binding
        catch (MissingMethodException mme) {
            try {
                if (name.equals(mme.getMethod())) {
                    Object boundClosure = getProperty(name);
                    if (boundClosure != null && boundClosure instanceof Closure) {
                        return ((Closure) boundClosure).call((Object[])args);
                    } else {
                        throw mme;
                    }
                } else {
                    throw mme;
                }
            } catch (MissingPropertyException mpe) {
                throw mme;
            }
        }
    }
1164407
function (method, methodName) {
        if (new RegExp("\\.\\$super\\b").exec(method)) {
            return this._createSuperified(method, methodName, _gpfClassMethodExtractSuperMembers(method));
        }
        return method;
    }
637508
private boolean overridesSuperclassMethod(JavaClass javaClass, Method method) {
        if (method.isStatic()) {
            return false;
        }

        try {
            JavaClass[] superclassList = javaClass.getSuperClasses();
            if (superclassList != null) {
                JavaClassAndMethod match = Hierarchy.findMethod(superclassList, method.getName(), method.getSignature(),
                        Hierarchy.INSTANCE_METHOD);
                if (match != null) {
                    return true;
                }
            }

            JavaClass[] interfaceList = javaClass.getAllInterfaces();
            if (interfaceList != null) {
                JavaClassAndMethod match = Hierarchy.findMethod(interfaceList, method.getName(), method.getSignature(),
                        Hierarchy.INSTANCE_METHOD);
                if (match != null) {
                    return true;
                }
            }

            return false;
        } catch (ClassNotFoundException e) {
            return true;
        }
    }
1297878
public static <T> T invoke(String className, String methodName, boolean isSingleton, Object... args) {
		Class<Object> clazz = loadClass(className);
		try {
			final Method method = getDeclaredMethod(clazz, methodName, getClasses(args));
			if (null == method) {
				throw new NoSuchMethodException(StrUtil.format("No such method: [{}]", methodName));
			}
			if (isStatic(method)) {
				return ReflectUtil.invoke(null, method, args);
			} else {
				return ReflectUtil.invoke(isSingleton ? Singleton.get(clazz) : clazz.newInstance(), method, args);
			}
		} catch (Exception e) {
			throw new UtilException(e);
		}
	}
549684
public static Object invokeMethod(Object object, String methodName, Object[] parameters) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        return invokeMethod(object, methodName, getTypes(parameters), parameters);
    }
1321585
@Override
	public Object invokeMethod(Object... args) {
		Assert.state(this.parameterTypes.length == args.length,
				"Wrong number of arguments, expected no more than: ["
						+ this.parameterTypes.length + "]");

		try {
			// Extract the target from an Advised as late as possible
			// in case it contains a lazy initialization
			Object target = extractTarget(this.object, this.method);
			return method.invoke(target, args);
		}
		catch (Exception e) {
			throw new IllegalArgumentException("Unable to invoke method: [" + this.method
					+ "] on object: [" + this.object + "] with arguments: ["
					+ Arrays.toString(args) + "]", e);
		}
	}
1159586
public Object invoke(TargetMetaRequest targetMetaRequest, Method method, Object[] args) throws Throwable {
		targetMetaRequestsHolder.setTargetMetaRequest(targetMetaRequest);
		Debug.logVerbose(
				"[JdonFramework] enter AOP invoker2 for:" + targetMetaRequest.getTargetMetaDef().getClassName() + " method:" + method.getName(),
				module);

		Object result = null;
		MethodInvocation methodInvocation = null;
		try {
			List<MethodInterceptor> chain = advisorChainFactory.create(targetMetaRequest.getTargetMetaDef());
			methodInvocation = new ProxyMethodInvocation(chain, targetMetaRequestsHolder, targetServiceFactory, method, args);
			Debug.logVerbose("[JdonFramework] MethodInvocation will proceed ... ", module);
			result = methodInvocation.proceed();
		} catch (Exception ex) {
			Debug.logError(ex, module);
			throw new Exception(ex);
		} catch (Throwable ex) {
			throw new Throwable(ex);
		} finally {
			targetMetaRequestsHolder.clear();
		}
		return result;

	}
1303255
function _super(methodName, args) {
	// Keep track of how far up the prototype chain we have traversed,
	// in order to handle nested calls to _super.
	if (this._superCallObjects === undefined) { this._superCallObjects = {}; }
	var oldSuperCallback = this._superCallObjects[methodName],
		currentObject = oldSuperCallback || this,
		parentObject  = findSuper(methodName, currentObject),
		result;
	this._superCallObjects[methodName] = parentObject;

	try {
		result = parentObject[methodName].apply(this, args || []);
	} finally {
		if (oldSuperCallback) {
			this._superCallObjects[methodName] = oldSuperCallback;
		} else {
			delete this._superCallObjects[methodName];
		}
	}
	return result;
}
757520
private <T> void invoke(Map<Object, Set<Method>> methods, T instance) {
        for (Map.Entry<Object, Set<Method>> entry : methods.entrySet()) {
            Object listener = entry.getKey();
            Set<Method> listenerMethods = entry.getValue();
            if (listenerMethods != null) {
                for (Method method : listenerMethods) {
                    Class<?> parameterType = method.getParameterTypes()[0];
                    if (parameterType.isAssignableFrom(instance.getClass())) {
                        try {
                            method.invoke(listener, instance);
                        } catch (IllegalAccessException e) {
                            throw new XOException("Cannot access instance listener method " + method.toGenericString(), e);
                        } catch (InvocationTargetException e) {
                            throw new XOException("Cannot invoke instance listener method " + method.toGenericString(), e);
                        }
                    }
                }
            }
        }
    }
124449
public static <T> T invokeMethod(final Object obj, Method method, Object... args) {
		try {
			return (T) method.invoke(obj, args);
		} catch (Exception e) {
			throw ExceptionUtil.unwrapAndUnchecked(e);
		}
	}
416590
public static Object invoke(Object instance, Method method, Object... args) throws IllegalAccessException, InvocationTargetException {
        if (method.isVarArgs()) {
            args = fixVarArgs(method.getParameterTypes(), args);
        }
        return method.invoke(instance, args);
    }
1216171
@Override
    public Object invokeMethod(String name, Object args) {
        try {
            return super.invokeMethod(name, args);
        } catch (MissingMethodException e) {
            // lets try invoke the method on the real String
            return InvokerHelper.invokeMethod(toString(), name, args);
        }
    }
410456
public Object invokeMethod(String name, Object args) {
        try {
            return getMetaClass().invokeMethod(this, name, args);
        } catch (MissingMethodException e) {
            // let's apply the method to each item in the collection
            List answer = new ArrayList(size());
            for (Object element : this) {
                Object value = InvokerHelper.invokeMethod(element, name, args);
                answer.add(value);
            }
            return answer;
        }
    }
363614
public final Invokable<T, Object> method(Method method) {
    checkArgument(of(method.getDeclaringClass()).isAssignableFrom(this),
        "%s not declared by %s", method, this);
    return new Invokable.MethodInvokable<T>(method) {
      @Override Type getGenericReturnType() {
        return resolveType(super.getGenericReturnType()).getType();
      }
      @Override Type[] getGenericParameterTypes() {
        return resolveInPlace(super.getGenericParameterTypes());
      }
      @Override Type[] getGenericExceptionTypes() {
        return resolveInPlace(super.getGenericExceptionTypes());
      }
      @Override public TypeToken<T> getOwnerType() {
        return TypeToken.this;
      }
      @Override public String toString() {
        return getOwnerType() + "." + super.toString();
      }
    };
  }