Package org.apache.hivemind.service

Examples of org.apache.hivemind.service.ClassFab.addMethod()


        eo.extendMethodImplementation(PageDetachListener.class, sig, "some-code();");

        verifyControls();

        fab.addMethod(Modifier.PUBLIC, sig, "{\n  some-code();\n}\n");
        fabc.setReturnValue(null);

        fab.createClass();
        fabc.setReturnValue(BaseComponent.class);
View Full Code Here


                return;
            }

            try {

                classFab.addMethod(Modifier.PUBLIC, valueGetter, getBody);

            } catch (Throwable t) {

                _log.error("Error generating OGNL getter for expression " + expression + " with root " + root + " and body:\n" + getBody, t);
View Full Code Here

                setBody = generateOgnlSetter(classFab, valueSetter);

                if (!classFab.containsMethod(expressionSetter)) {

                    classFab.addField("_node", Node.class);
                    classFab.addMethod(Modifier.PUBLIC, expressionSetter, "{ _node = $1; }");
                }
            }

            try {
View Full Code Here

                    setBody = generateOgnlSetter(classFab, valueSetter);

                    if (!classFab.containsMethod(expressionSetter)) {

                        classFab.addField("_node", Node.class);
                        classFab.addMethod(Modifier.PUBLIC, expressionSetter, "{ _node = $1; }");
                    }
                }

                if (setBody != null)
                    classFab.addMethod(Modifier.PUBLIC, valueSetter, setBody);
View Full Code Here

                        classFab.addMethod(Modifier.PUBLIC, expressionSetter, "{ _node = $1; }");
                    }
                }

                if (setBody != null)
                    classFab.addMethod(Modifier.PUBLIC, valueSetter, setBody);

                classFab.addConstructor(new Class[0], new Class[0], "{}");

                Class clazz = ((AbstractFab) classFab).createClass(true);
View Full Code Here

            MethodSignature expressionSetter = new MethodSignature(void.class, "setExpression", new Class[]{Node.class}, null);

            if (!classFab.containsMethod(expressionSetter)) {

                classFab.addField("_node", Node.class);
                classFab.addMethod(Modifier.PUBLIC, expressionSetter, "{ _node = $1; }");
            }

            classFab.addMethod(Modifier.PUBLIC, valueGetter, generateOgnlGetter(classFab, valueGetter));
            classFab.addMethod(Modifier.PUBLIC, valueSetter, generateOgnlSetter(classFab, valueSetter));
           
View Full Code Here

                classFab.addField("_node", Node.class);
                classFab.addMethod(Modifier.PUBLIC, expressionSetter, "{ _node = $1; }");
            }

            classFab.addMethod(Modifier.PUBLIC, valueGetter, generateOgnlGetter(classFab, valueGetter));
            classFab.addMethod(Modifier.PUBLIC, valueSetter, generateOgnlSetter(classFab, valueSetter));
           
            classFab.addConstructor(new Class[0], new Class[0], "{}");

            Class clazz = ((AbstractFab) classFab).createClass(true);
View Full Code Here

                classFab.addField("_node", Node.class);
                classFab.addMethod(Modifier.PUBLIC, expressionSetter, "{ _node = $1; }");
            }

            classFab.addMethod(Modifier.PUBLIC, valueGetter, generateOgnlGetter(classFab, valueGetter));
            classFab.addMethod(Modifier.PUBLIC, valueSetter, generateOgnlSetter(classFab, valueSetter));
           
            classFab.addConstructor(new Class[0], new Class[0], "{}");

            Class clazz = ((AbstractFab) classFab).createClass(true);
View Full Code Here

        cf.newClass("$Insert_97", baseClass);

        cfc.setReturnValue(fab);

        fab.addMethod(Modifier.PUBLIC, sig, "method body");
        fabc.setReturnValue(null);

        replayControls();

        EnhancementOperation eo = new EnhancementOperationImpl(new DefaultClassResolver(), spec,
View Full Code Here

        eo.extendMethodImplementation(PageDetachListener.class, sig, "more-code();");

        verifyControls();

        fab.addMethod(Modifier.PUBLIC, sig, "{\n  some-code();\n  more-code();\n}\n");
        fabc.setReturnValue(null);

        fab.createClass();
        fabc.setReturnValue(BaseComponent.class);
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.