Package org.mule.mvel2

Examples of org.mule.mvel2.ImmutableElementException


    public <T> T evaluate(String expression, MuleMessage message, Map<String, Object> vars)
    {
        MVELExpressionLanguageContext context = createExpressionLanguageContext();
        if (vars != null)
        {
            context.setNextFactory(new CachedMapVariableResolverFactory(vars,
                new DelegateVariableResolverFactory(staticContext, new MessageVariableResolverFactory(
                    parserConfiguration, muleContext, message, new DelegateVariableResolverFactory(
                        globalContext, createVariableVariableResolverFactory(message))))));
        }
        else
View Full Code Here


    {
        parserConfig.addImport(String.class);

        MuleBaseVariableResolverFactory resoverFactory = new MVELExpressionLanguageContext(parserConfig,
            muleContext);
        resoverFactory.setNextFactory(new MapVariableResolverFactory(Collections.singletonMap("foo", "val")));

        assertNotNull(resoverFactory.getVariableResolver("foo"));
        assertEquals("val", resoverFactory.getVariableResolver("foo").getValue());
        assertNull(resoverFactory.getVariableResolver("bar"));
    }
View Full Code Here

    @Test
    public void testGetVariableResolver()
    {
        MuleBaseVariableResolverFactory resoverFactory = new MVELExpressionLanguageContext(parserConfig,
            muleContext);
        resoverFactory.addResolver("foo", new SimpleValueResolver("val"));

        assertNotNull(resoverFactory.getVariableResolver("foo"));
        assertEquals("val", resoverFactory.getVariableResolver("foo").getValue());
        assertNull(resoverFactory.getVariableResolver("bar"));
    }
View Full Code Here

      public Object next() {
        return elements[cursor++];
      }

      public void remove() {
        throw new ImmutableElementException("cannot change elements in immutable list");
      }
    };

  }
View Full Code Here

TOP

Related Classes of org.mule.mvel2.ImmutableElementException

Copyright © 2018 www.massapicom. 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.