Package org.codehaus.janino

Examples of org.codehaus.janino.ClassBodyEvaluator.cook()


      InvocationTargetException {

    ClassBodyEvaluator cbe = new ClassBodyEvaluator();
    cbe.setImplementedTypes(new Class[] { Condition.class });
    cbe.setExtendedType(MapWrapperForScripts.class);
    cbe.cook(SCRIPT_PREFIX + script + SCRIPT_SUFFIX);

    Class<?> clazz = cbe.getClazz();
    Condition instance = (Condition) clazz.newInstance();
    Method setMapMethod = clazz.getMethod("setMap", Map.class);
    setMapMethod.invoke(instance, context.getCopyOfPropertyMap());
View Full Code Here


          InvocationTargetException {

    ClassBodyEvaluator cbe = new ClassBodyEvaluator();
    cbe.setImplementedInterfaces(new Class[]{Condition.class});
    cbe.setExtendedClass(PropertyWrapperForScripts.class);
    cbe.cook(SCRIPT_PREFIX + script + SCRIPT_SUFFIX);

    Class<?> clazz = cbe.getClazz();
    Condition instance = (Condition) clazz.newInstance();
    Method setMapMethod = clazz.getMethod("setPropertyContainers", PropertyContainer.class, PropertyContainer.class);
    setMapMethod.invoke(instance, localPropContainer, context);
View Full Code Here

          InvocationTargetException {

    ClassBodyEvaluator cbe = new ClassBodyEvaluator();
    cbe.setImplementedInterfaces(new Class[]{Condition.class});
    cbe.setExtendedClass(PropertyWrapperForScripts.class);
    cbe.cook(SCRIPT_PREFIX + script + SCRIPT_SUFFIX);

    Class<?> clazz = cbe.getClazz();
    Condition instance = (Condition) clazz.newInstance();
    Method setMapMethod = clazz.getMethod("setPropertyContainers", PropertyContainer.class, PropertyContainer.class);
    setMapMethod.invoke(instance, localPropContainer, context);
View Full Code Here

    ClassBodyEvaluator cbe = new ClassBodyEvaluator();
    cbe.setImplementedInterfaces(new Class[]{Condition.class});
    cbe.setExtendedClass(PropertyWrapperForScripts.class);
    cbe.setParentClassLoader(ClassBodyEvaluator.class.getClassLoader());
    cbe.cook(SCRIPT_PREFIX + script + SCRIPT_SUFFIX);

    Class<?> clazz = cbe.getClazz();
    Condition instance = (Condition) clazz.newInstance();
    Method setMapMethod = clazz.getMethod("setPropertyContainers", PropertyContainer.class, PropertyContainer.class);
    setMapMethod.invoke(instance, localPropContainer, context);
View Full Code Here

          InvocationTargetException {

    ClassBodyEvaluator cbe = new ClassBodyEvaluator();
    cbe.setImplementedTypes(new Class[]{Condition.class});
    cbe.setExtendedType(PropertyWrapperForScripts.class);
    cbe.cook(SCRIPT_PREFIX + script + SCRIPT_SUFFIX);

    Class<?> clazz = cbe.getClazz();
    Condition instance = (Condition) clazz.newInstance();
    Method setMapMethod = clazz.getMethod("setPropertyContainers", PropertyContainer.class, PropertyContainer.class);
    setMapMethod.invoke(instance, localPropContainer, context);
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.