Package groovy.lang

Examples of groovy.lang.GroovyObject.invokeMethod()


*/
public class NodePrinterTest extends TestSupport {

    public void testTree() throws Exception {
        GroovyObject object = compile("src/test/groovy/tree/TreeTest.groovy");
        object.invokeMethod("testTree", null);
    }

    public void testVerboseTree() throws Exception {
        GroovyObject object = compile("src/test/groovy/tree/VerboseTreeTest.groovy");
        object.invokeMethod("testTree", null);
View Full Code Here


        object.invokeMethod("testTree", null);
    }

    public void testVerboseTree() throws Exception {
        GroovyObject object = compile("src/test/groovy/tree/VerboseTreeTest.groovy");
        object.invokeMethod("testTree", null);
    }

    public void testSmallTree() throws Exception {
        GroovyObject object = compile("src/test/groovy/tree/SmallTreeTest.groovy");
        object.invokeMethod("testTree", null);
View Full Code Here

        object.invokeMethod("testTree", null);
    }

    public void testSmallTree() throws Exception {
        GroovyObject object = compile("src/test/groovy/tree/SmallTreeTest.groovy");
        object.invokeMethod("testTree", null);
    }

    public void testLittleClosure() throws Exception {
        GroovyObject object = compile("src/test/groovy/LittleClosureTest.groovy");
        object.invokeMethod("testClosure", null);
View Full Code Here

        object.invokeMethod("testTree", null);
    }

    public void testLittleClosure() throws Exception {
        GroovyObject object = compile("src/test/groovy/LittleClosureTest.groovy");
        object.invokeMethod("testClosure", null);
    }

    public void testNestedClosureBug() throws Exception {
        GroovyObject object = compile("src/test/groovy/tree/NestedClosureBugTest.groovy");
        object.invokeMethod("testNestedClosureBug", null);
View Full Code Here

        object.invokeMethod("testClosure", null);
    }

    public void testNestedClosureBug() throws Exception {
        GroovyObject object = compile("src/test/groovy/tree/NestedClosureBugTest.groovy");
        object.invokeMethod("testNestedClosureBug", null);
    }

    public void testClosureClassLoaderBug() throws Exception {
        GroovyObject object = compile("src/test/groovy/tree/ClosureClassLoaderBug.groovy");
        object.invokeMethod("testTree", null);
View Full Code Here

        object.invokeMethod("testNestedClosureBug", null);
    }

    public void testClosureClassLoaderBug() throws Exception {
        GroovyObject object = compile("src/test/groovy/tree/ClosureClassLoaderBug.groovy");
        object.invokeMethod("testTree", null);
    }

    public void testLogging() {
        Logger log = Logger.getLogger(getClass().getName());
        log.info("Logging using JDK 1.4 logging");
View Full Code Here

            GroovyObject script = (GroovyObject)refreshableBean;
            MetaMethod onCall = script.getMetaClass().pickMethod("onCall", MULE_EVENT_CONTEXT);

            if (onCall != null)
            {
                return script.invokeMethod(ON_CALL, eventContext);
            }
            else
            {
                if (StringUtils.isEmpty(methodName))
                {
View Full Code Here

                if (StringUtils.isEmpty(methodName))
                {
                    throw new DefaultMuleException(CoreMessages.propertiesNotSet("methodName"));
                }
               
                return script.invokeMethod(methodName, eventContext.getMessage().getPayload());
            }
           
        }
       
        throw new Exception(new DefaultMuleException("script engine not supported"));
View Full Code Here

                GroovyClassLoader loader = new GroovyClassLoader();
                Class groovyClass = loader.parseClass(groovyFileStream);
                GroovyObject groovyObject =
                    (GroovyObject) groovyClass.newInstance();
                Object[] arg = { in };
                Object obj = groovyObject.invokeMethod(methodName, arg);
                if (obj == null) {
                    throw new AxisFault(Messages.getMessage("groovyNoanswer"));
                }
               
                SOAPFactory fac = null;
View Full Code Here

public class GroovyParserTest extends TestCase {

  public void testParse() {
    GroovyObject go = GroovyParser.parse("class Test { \n String doStuff() { return \"Do stuff\" } }");
    String result = (String) go.invokeMethod("doStuff", null);
    assertEquals("Do stuff", result);
   
    //GroovyEngine ge = new GroovyEngine();
    GroovyShell sh = new GroovyShell();
    List<?> evaluate = (List<?>) sh.evaluate("[1, 2, 3]");
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.