Examples of FunctionInstance


Examples of org.mule.mvel2.ast.FunctionInstance

        {
            addAlias(alias.getKey(), alias.getValue());
        }
        for (Entry<String, Function> function : functions.entrySet())
        {
            addFinalVariable(function.getKey(), new FunctionInstance(function.getValue()));
        }
    }
View Full Code Here

Examples of org.mule.mvel2.ast.FunctionInstance

    @Override
    public void declareFunction(String name, ExpressionLanguageFunction function)
    {
        try
        {
            addFinalVariable(name, new FunctionInstance(new MVELFunctionAdaptor(name, function,
                    new ParserContext(parserConfiguration))));
        }
        finally
        {
            // Clear AbstractParser.parserContext ThreadLocal once Function has been created.
View Full Code Here

Examples of org.mvel2.ast.FunctionInstance

      else if (ptr instanceof MethodStub) {
        ctx = ((MethodStub) ptr).getClassReference();
        name = ((MethodStub) ptr).getMethodName();
      }
      else if (ptr instanceof FunctionInstance) {
        FunctionInstance func = (FunctionInstance) ptr;
        if (!name.equals(func.getFunction().getName())) {
          getBeanProperty(ctx, name);
          addAccessorNode(new DynamicFunctionAccessor(es));
        }
        else {
          addAccessorNode(new FunctionAccessor(func, es));
        }
        return func.call(ctx, thisRef, variableFactory, args);
      }
      else {
        throw new OptimizationFailure("attempt to optimize a method call for a reference that does not point to a method: "
            + name + " (reference is type: " + (ctx != null ? ctx.getClass().getName() : null) + ")");
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.