Package org.apache.hivemind.service

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


        addServiceMethods(classFab, serviceInterface, factoryParameters.getServiceId(), jndiName);

        addConstructor(classFab);

        Class proxyClass = classFab.createClass();

        return invokeConstructor(proxyClass, proxyParameters.getNameLookup(_nameLookup));
    }

    private void addClearCachedMethod(ClassFab classFab)
View Full Code Here


                null);
        if (!classFab.containsMethod(toStringSignature)) {
            classFab.addMethod(Modifier.PUBLIC, toStringSignature, builder.toString());
        }

        return classFab.createClass();
    }

    private Class createInnerProxyClass(Class deferredProxyClass)
    {
        ProxyBuilder builder = new ProxyBuilder("InnerProxy", getModule(), getConfigurationType(),
View Full Code Here

        classFab.addMethod(Modifier.PUBLIC | Modifier.FINAL, new MethodSignature(void.class,
                "_instantiateServiceImplementation", null, null), body.toString());

        classFab.addInterface(SingletonInnerProxy.class);

        return classFab.createClass();
    }

}
View Full Code Here

        createInfrastructure(stack, classFab);

        addServiceMethods(stack, classFab, parameters);

        return classFab.createClass();
    }

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

        ClassFabUtils.addToStringMethod(cf, StrategyMessages.toString(
                "foo.Bar",
                ToStringStrategy.class));
        cfc.setReturnValue(mf);

        cf.createClass();
        cfc.setReturnValue(String.class);

        replayControls();

        StrategyFactory f = new StrategyFactory();
View Full Code Here

        fpc.setReturnValue("foo.Bar");

        ClassFabUtils.addToStringMethod(cf, StrategyMessages.toString("foo.Bar", Runnable.class));
        cfc.setReturnValue(mf);

        cf.createClass();

        cfc.setReturnValue(String.class);

        replayControls();
View Full Code Here

        ClassFabUtils.addToStringMethod(cf, StrategyMessages.toString(
                "foo.Bar",
                ToStringStrategy.class));
        cfc.setReturnValue(mf);

        cf.createClass();
        cfc.setReturnValue(String.class);

        replayControls();

        StrategyFactory f = new StrategyFactory();
View Full Code Here

        fpc.setReturnValue("foo.Bar");

        ClassFabUtils.addToStringMethod(cf, StrategyMessages.toString("foo.Bar", Runnable.class));
        cfc.setReturnValue(mf);

        cf.createClass();

        cfc.setReturnValue(String.class);

        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

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.