Package org.apache.hivemind.service

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


        createInfrastructure(stack, classFab);

        addServiceMethods(stack, classFab, parameters);

        return classFab.createClass();
    }

    private void createInfrastructure(InterceptorStack stack, ClassFab classFab)
    {
        Class topClass = ClassFabUtils.getInstanceClass(stack.peek(), stack.getServiceInterface());
View Full Code Here


        verifyControls();

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

        fab.createClass();
        fabc.setReturnValue(BaseComponent.class);

        spec.getLocation();
        specc.setReturnValue(null);
View Full Code Here

        verifyControls();

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

        fab.createClass();
        fabc.setReturnValue(BaseComponent.class);

        spec.getLocation();
        specc.setReturnValue(null);
View Full Code Here

                Modifier.PUBLIC,
                sig,
                "{\n  super.cleanupAfterRender($$);\n  some-code();\n}\n");
        fabc.setReturnValue(null);

        fab.createClass();
        fabc.setReturnValue(BaseComponent.class);

        spec.getLocation();
        specc.setReturnValue(null);
View Full Code Here

        verifyControls();

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

        fab.createClass();
        fabc.setReturnValue(BaseComponent.class);

        spec.getLocation();
        specc.setReturnValue(null);
View Full Code Here

        MockControl control = newControl(ClassFab.class);
        ClassFab classFab = (ClassFab) control.getMock();

        Throwable t = new RuntimeException("Inconceivable!");

        classFab.createClass();
        control.setThrowable(t);

        ClassFactory cf = newClassFactory(ServiceLink.class, classFab);

        replayControls();
View Full Code Here

        MethodSignature getStringValue =
            new MethodSignature(String.class, "getStringValue", null, null);

        cf.addMethod(Modifier.PUBLIC, getStringValue, "return _stringValue;");

        Class targetClass = cf.createClass();

        Object targetBean = targetClass.newInstance();

        PropertyUtils.write(targetBean, "stringValue", "Fred");
View Full Code Here

        MethodSignature getStringValue =
            new MethodSignature(String.class, "getStringValue", null, null);

        cf.addMethod(Modifier.PUBLIC, getStringValue, "return _stringValue;");

        Class targetClass = cf.createClass();

        try
        {
            targetClass.newInstance();
            unreachable();
View Full Code Here

        cf.addMethod(
            Modifier.PUBLIC,
            new MethodSignature(int.class, "getIntValue", null, null),
            "return _intValue;");

        Class targetClass = cf.createClass();
        Constructor c = targetClass.getConstructors()[0];

        AbstractIntWrapper targetBean =
            (AbstractIntWrapper) c.newInstance(new Object[] { new Integer(137)});
View Full Code Here

    {
        ClassFab cf = newClassFab("InvalidSuperClass", List.class);

        try
        {
            cf.createClass();
            unreachable();
        }
        catch (ApplicationRuntimeException ex)
        {
            assertExceptionSubstring(ex, "Unable to create class InvalidSuperClass");
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.