Package gri.tasks.java

Examples of gri.tasks.java.ObjectInvocationConfig


    FunctionDescription funcInfo = null;
    if (infoElem != null)
      funcInfo = parseFunctionDescription(infoElem);

    //parse invocation:
    ObjectInvocationConfig config = parseInvocationConfig(elem);

    return new FunctionEntry(config, funcInfo);
  }
View Full Code Here


    // parse properties here because we need the class object:
    Element propertyElem = elem.getChild("properties");
    PropertyBindingDef propertyDef = propertyElem == null ?
        null : parseProperties(propertyElem, klass);

    ObjectInvocationConfig config = new ObjectInvocationConfig(
        klass,
        constructor, method,
        constructorDef, methodDef, propertyDef);

    config.setIsStatic(methodType.toLowerCase().equals("static"));

    return config;
  }
View Full Code Here

                ParameterUtil.getSetter(targetClass, "suffix", String.class));
        propertyDef.setOutput(new ParameterDef("value", Types.STRING),
                ParameterUtil.getGetter(targetClass, "value", String.class));
       
        //execute:
        ObjectInvocationConfig config = new ObjectInvocationConfig(
                targetClass, constructor, targetMethod,
                constructorDef, targetMethodDef,
                propertyDef
                );
       
        Map inputs = new HashMap();
        inputs.put("message", "yo dude");
        inputs.put("prefix", "lalala");
        inputs.put("suffix", "xoxoxo");
       
        Task task = config.createTask();
        Map outputs = task.execute(inputs);
       
        System.out.println(outputs.get("output"));
        System.out.println(outputs.get("value"));
    }
View Full Code Here

TOP

Related Classes of gri.tasks.java.ObjectInvocationConfig

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.