Invokes all methods in the list on the target.
@param target
the target on which the methods should be ivoked
@param methods
the methods to be invoked in order of priority
@param <T>
420325
private <T> void preFlightCheckMethods(final T target, final List<Method> methods) {

        methods.forEach(m -> {m.setAccessible(true);
            try {
                m.invoke(target);
            } catch (IllegalAccessException | InvocationTargetException e) {
                throw new RuntimeException(e);
            }
        });
    }
495322
public void setTargetGroups(java.util.Collection<TargetGroup> targetGroups) {
        if (targetGroups == null) {
            this.targetGroups = null;
            return;
        }

        this.targetGroups = new java.util.ArrayList<TargetGroup>(targetGroups);
    }
534029
public void removeTarget(T target) {
    for (MethodlessRouter<T> r : routers.values()) r.removeTarget(target);
    anyMethodRouter.removeTarget(target);
  }
405962
public void setTargets(java.util.Collection<Target> targets) {
        if (targets == null) {
            this.targets = null;
            return;
        }

        this.targets = new java.util.ArrayList<Target>(targets);
    }
180587
function(method) {
		 	if(typeof method === "function") {
				var args = [];
								
				for(var x = 1; x <= arguments.length; x++) {
					if(arguments[x]) {
						args.push(arguments[x]);
					}
				}
				
				method.apply(this, args);
			}
		}
1375045
static List<EventMethod> getMethodsForTarget(@NonNull Object target) {
        if (target instanceof Class) {
            return getMethodsFromClass((Class<?>) target, true);
        } else {
            return getMethodsFromClass(target.getClass(), false);
        }
    }
230411
private <T> void preFlightCheck(final T target) {
        if(target == null) {
            return;
        }
        preFlightCheckFields(target);
        final List<Method> methods = getPostInjectMethods(target);
        preFlightCheckMethods(target, methods);
    }
709809
function setTarget(target) {
        var targetMethods = {};
        for (var name in methods) {
            targetMethods[name] = wrapMethod(target, methods[name]);
        }
        return targetMethods;
    }
727061
@SuppressWarnings("unchecked")
    public static <T> T execMethod(Method method, Object target, Object... params) {
        allowAccess(method);
        try {
            return (T) method.invoke(target, params);
        } catch (Throwable e) {
            throw new ReflectException(e);
        }
    }
763146
public void add(T method)
    {
        // check for overridden method
        if (isOverrideMethod(method)) {
            return;
        }

        // Add to the list of managed methods
        _methods.put(method.getName() + method.getArgTypes(), method);

        // Ensure that all added methods have a unique index
        Object nameValue = _nameMap.get(method.getName());
        if (nameValue == null)
        {
            // first method with this name, considered unique (for now)
            _nameMap.put(method.getName(), method);
        }
        else
        {
            int nextIndex;
            if (nameValue instanceof AptMethod)
            {
                // 2nd method with this name, add index to original and start indexing
                ((AptMethod)nameValue).setIndex(0);
                nextIndex = 1;
            }
            else
            {
                // 3rd (or later) method with this name, continue indexing
                nextIndex = ((Integer)nameValue).intValue();
            }

            method.setIndex(nextIndex++);
            _nameMap.put(method.getName(), nextIndex);
        }
    }
916565
public void setActions(java.util.Collection<String> actions) {
        if (actions == null) {
            this.actions = null;
            return;
        }

        this.actions = new java.util.ArrayList<String>(actions);
    }
1259303
public void setTargetImplements(Class<?>[] implementsClasses)
    {
        targetImplements = implementsClasses == null ? null : (Class[])implementsClasses.clone();
    }
165782
private void processMethodCall() {
        if ("invoke".equals(getNameConstantOperand()) && "java/lang/reflect/Method".equals(getClassConstantOperand())) {
            return;
        }
        String sig = getSigConstantOperand();
        List<String> args = SignatureUtils.getParameterSignatures(sig);
        if (stack.getStackDepth() >= args.size()) {
            for (int i = 0; i < args.size(); i++) {
                String argSig = args.get(i);
                if (argSig.startsWith(Values.SIG_ARRAY_PREFIX)) {
                    OpcodeStack.Item itm = stack.getStackItem(args.size() - i - 1);
                    int arrayReg = itm.getRegisterNumber();
                    WrapperInfo wi = wrappers.get(Integer.valueOf(arrayReg));
                    if (wi != null) {
                        wi.wasArg = true;
                    }
                }
            }
        }
    }
1101079
public static void unbindActionListeners(IActionTarget target, List<ActionListener> actionListeners) {
        if (actionListeners != null) {
            for (ActionListener listener : actionListeners) {
                listener.unbind(target);
            }
        }
    }
187865
private void registerMethod(Method method) {
    Type genericType = method.getGenericParameterTypes()[0];
    Class<?> argumentType = resolveArgument(genericType);
    if (argumentType != null && Operation.class.isAssignableFrom(argumentType)) {
      registerMethod(argumentType, method);
    }
  }
1334250
public void setTargetMaps(java.util.Collection<java.util.Map<String, java.util.List<String>>> targetMaps) {
        if (targetMaps == null) {
            this.targetMaps = null;
            return;
        }

        this.targetMaps = new com.amazonaws.internal.SdkInternalList<java.util.Map<String, java.util.List<String>>>(targetMaps);
    }
1369234
public static <T> T invokeMethodByName(final Object target, final String name, final Object[] parameterValues) {
		Method method = getAccessibleMethodByName(target, name);
		if (method == null) {
			throw new IllegalArgumentException("Could not find method [" + name + "] on target [" + target + ']');
		}

		try {
			return (T) method.invoke(target, parameterValues);
		} catch (ReflectiveOperationException e) {
			throw new ReflectionRuntimeException(e);
		}
	}