Convenience method to be invoked by JNI.
341603
static <T extends Enum<T>>
    T get( Class<T> clazz, int v ) {
        return get(clazz).constant(v);
    }
492113
function showInterfaceJavaScriptMethod(intf, method, html) {
    var line = ""

    line += "\n//"
    line += "\n<span class='methodName'>method " + method.name + "</span>(" + getJavaScriptParameterListSimple(method.parameters, method.returns) + ")"
    line += "\n    // callback: function(" + getJavaScriptCallbackParameterListSimple(method.callbackParameters) + ")"
    line += "\n    Weinre.notImplemented(arguments.callee.signature)"
    line += "\n"
    html.push(line)
}
848627
def _invoke(self, arguments, autoescape):
        """"""
        rv = self._func(*arguments)
        if autoescape:
            rv = Markup(rv)
        return rv
369146
@Nonnull
  public JSInvocation invoke (@Nullable final IJSExpression aExpr, @Nonnull @Nonempty final String sMethod)
  {
    final JSInvocation aInvocation = new JSInvocation (aExpr, sMethod);
    return addStatement (aInvocation);
  }
835002
private Object invokeImpl(Object thiz, String name, Object... args)
            throws ScriptException, NoSuchMethodException {
        if (name == null) {
            throw new NullPointerException("method name is null");
        }

        try {
            if (thiz != null) {
                return InvokerHelper.invokeMethod(thiz, name, args);
            } else {
                return callGlobal(name, args);
            }
        } catch (MissingMethodException mme) {
            throw new NoSuchMethodException(mme.getMessage());
        } catch (Exception e) {
            throw new ScriptException(e);
        }
    }
433653
public Object invoke(MethodInvocation mi) throws Throwable {
		if (!Modifier.isPublic(mi.getMethod().getModifiers())) {
			return mi.proceed();
		}

		Method searchMethod = mi.getMethod();
		Object[] args = mi.getArguments();
		String appid = AOPUtils.getFirstArgOfString(args);

		Method superMethod = null;
		Measured measuredAnno = null;

		try {
			superMethod = Search.class.getMethod(searchMethod.getName(), searchMethod.getParameterTypes());
			measuredAnno = superMethod.getAnnotation(Measured.class);
		} catch (Exception e) {
			logger.error("Error in search AOP layer!", e);
		}

		Set<IOListener> ioListeners = Para.getSearchQueryListeners();
		for (IOListener ioListener : ioListeners) {
			ioListener.onPreInvoke(superMethod, args);
			logger.debug("Executed {}.onPreInvoke().", ioListener.getClass().getName());
		}

		Object result = null;
		if (measuredAnno != null) {
			result = invokeTimedSearch(appid, searchMethod, mi);
		} else {
			result = mi.proceed();
		}

		for (IOListener ioListener : ioListeners) {
			ioListener.onPostInvoke(superMethod, result);
			logger.debug("Executed {}.onPostInvoke().", ioListener.getClass().getName());
		}

		return result;
	}
1327226
private Object invokeMethod(final Object obj, final Method method, final Object... args) {
        // turn method to accessible. otherwise, we won't be able to callback to methods
        // on non-public classes.
        boolean accessibility = method.isAccessible();
        method.setAccessible(true);

        try {
            try {
                return method.invoke(obj, args);
            } catch (Exception e) {
                this.log("Error while invoking %s with %s: %s", method, Arrays.toString(args), Throwables.getStackTraceAsString(e));
                throw e;
            }
        } catch (InvocationTargetException e) {
            throw new JsiiException(e.getTargetException());
        } catch (IllegalAccessException e) {
            throw new JsiiException(e);
        } finally {
            // revert accessibility.
            method.setAccessible(accessibility);
        }
    }
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;
                    }
                }
            }
        }
    }
601034
public Object invoke(Object target, Method method, Object[] args) throws Throwable {

        PooledMethodInvocation invocation = getInvocation(target, method, args, next);

        try {
            // JIT hint
            if (next instanceof MethodInterceptorContext) {
                return next.proceed(invocation);
            }
            return next.proceed(invocation);
        } finally {
            invocation.clear();
        }
    }
972144
private static Object invokeJavaOptionalOf(Object o) {
    try {
      return JAVA_OPTIONAL_OF_METHOD.invoke(null, o);
    } catch (IllegalAccessException e) {
      throw new SecurityException(e);
    } catch (IllegalArgumentException e) {
      throw new IllegalStateException(e);
    } catch (InvocationTargetException e) {
      throw Throwables.propagate(e.getCause());
    }
  }
1063965
public static void println(PrintWriter self, Object value) {
        self.println(InvokerHelper.toString(value));
    }
953748
private void handleMainMethodIfPresent(List methods) {
        boolean found = false;
        for (Iterator iter = methods.iterator(); iter.hasNext();) {
            MethodNode node = (MethodNode) iter.next();
            if(node.getName().equals("main")) {
                if (node.isStatic() && node.getParameters().length == 1) {
                    boolean retTypeMatches, argTypeMatches;
                    ClassNode argType = node.getParameters()[0].getType();
                    ClassNode retType = node.getReturnType();

                    argTypeMatches = (argType.equals(ClassHelper.OBJECT_TYPE) || argType.getName().contains("String[]"));
                    retTypeMatches = (retType == ClassHelper.VOID_TYPE || retType == ClassHelper.OBJECT_TYPE);
                    
                    if(retTypeMatches && argTypeMatches) {
                        if(found) {
                            throw new RuntimeException("Repetitive main method found.");
                        } else {
                            found = true;
                        }
                        // if script has both loose statements as well as main(), then main() is ignored
                        if(statementBlock.isEmpty()) {
                            addStatement(node.getCode());
                        }
                        iter.remove();
                    }
                }
            }
        }
    }
303703
public void invoke(String serviceName, String methodName, Object[] args, String id, Transport transport)
            throws IOException, WsonrpcException {
        if (methodName == null) {
            throw new NullPointerException("methodName");
        }

        String method;
        if (serviceName == null) {
            method = methodName;
        } else {
            method = serviceName + "." + methodName;
        }
        Node[] params = null;
        if (args != null) {
            params = new Node[args.length];
            for (int i = 0; i < args.length; i++) {
                params[i] = jsonImpl.convert(args[i]);
            }
        }

        transmit(transport, new JsonRpcRequest(id, method, params));
    }
1011490
def _RunMethod(dev, args, extra):
    """"""
    logging.info('%s(%s)', args.method.__name__, ', '.join(args.positional))
    result = args.method(dev, *args.positional, **extra)
    if result is not None:
        if isinstance(result, io.StringIO):
            sys.stdout.write(result.getvalue())
        elif isinstance(result, (list, types.GeneratorType)):
            r = ''
            for r in result:
                r = str(r)
                sys.stdout.write(r)
            if not r.endswith('\n'):
                sys.stdout.write('\n')
        else:
            result = str(result)
            sys.stdout.write(result)
            if not result.endswith('\n'):
                sys.stdout.write('\n')
    return 0
624766
@Override
	public final void invoke() {
		if (index < inters.length)
			inters[index++].intercept(this);
		else if (index++ == inters.length)
			invocation.invoke();
	}
1027712
@Nonnull
  public JSInvocation invoke (@Nullable final IJSExpression aExpr, @Nonnull final JSMethod aMethod)
  {
    final JSInvocation aInvocation = new JSInvocation (aExpr, aMethod);
    return addStatement (aInvocation);
  }
839905
private Object handleInvocation(ManagedBeanInvocation mbeanInvocation) {
        Message response = endpointAdapter.handleMessage(endpointConfiguration.getMessageConverter()
                .convertInbound(mbeanInvocation, endpointConfiguration, null));

        ManagedBeanResult serviceResult = null;
        if (response != null && response.getPayload() != null) {
            if (response.getPayload() instanceof ManagedBeanResult) {
                serviceResult = (ManagedBeanResult) response.getPayload();
            } else if (response.getPayload() instanceof String) {
                serviceResult = (ManagedBeanResult) endpointConfiguration.getMarshaller().unmarshal(response.getPayload(Source.class));
            }
        }

        if (serviceResult != null) {
            return serviceResult.getResultObject(endpointConfiguration.getApplicationContext());
        } else {
            return null;
        }
    }