Examples of proxyMethodsToDelegate()


Examples of org.apache.tapestry.ioc.services.ClassFab.proxyMethodsToDelegate()

        String toString = format(
                "<PerThread Proxy for %s(%s)>",
                resources.getServiceId(),
                serviceInterface.getName());

        cf.proxyMethodsToDelegate(serviceInterface, PER_THREAD_METHOD_NAME + "()", toString);

        return cf.createClass();
    }
}
View Full Code Here

Examples of org.apache.tapestry.ioc.services.ClassFab.proxyMethodsToDelegate()

        cf.addConstructor(new Class[]
        { ObjectCreator.class }, null, "_creator = $1;");

        addDelegateGetter(cf, serviceInterface, serviceId);

        cf.proxyMethodsToDelegate(serviceInterface, "_delegate()", proxyDescription);

        return cf.createClass();
    }

    private void addDelegateGetter(ClassFab cf, Class serviceInterface, String serviceId)
View Full Code Here

Examples of org.apache.tapestry5.ioc.services.ClassFab.proxyMethodsToDelegate()

        final ClassFab cf = newClassFab("AnnotatedClass", Object.class);

        cf.addField("_delegate", AnnotatedService.class);
        cf.addConstructor(new Class[] { AnnotatedService.class }, null, "_delegate = $1;");

        cf.proxyMethodsToDelegate(AnnotatedService.class, "_delegate", "Bla bla");
        cf.copyClassAnnotationsFromDelegate(AnnotatedServiceImpl.class);
        cf.copyMethodAnnotationsFromDelegate(AnnotatedService.class, AnnotatedServiceImpl.class);

        final Class targetClass = cf.createClass();
View Full Code Here

Examples of org.apache.tapestry5.ioc.services.ClassFab.proxyMethodsToDelegate()

        ClassFab cf = newClassFab("Delegator", Object.class);

        cf.addField("_delegate", SampleService.class);
        cf.addConstructor(new Class[] { SampleService.class }, null, "_delegate = $1;");

        cf.proxyMethodsToDelegate(SampleService.class, "_delegate", "<Delegator>");

        SampleService delegate = newMock(SampleService.class);

        Class clazz = cf.createClass();
View Full Code Here

Examples of org.apache.tapestry5.ioc.services.ClassFab.proxyMethodsToDelegate()

        ClassFab cf = newClassFab("ToStringDelegator", Object.class);

        cf.addField("_delegate", ToStringService.class);
        cf.addConstructor(new Class[] { ToStringService.class }, null, "_delegate = $1;");

        cf.proxyMethodsToDelegate(ToStringService.class, "_delegate", "<ToStringDelegator>");

        ToStringService delegate = new ToStringService()
        {
            @Override
            public String toString()
View Full Code Here

Examples of org.apache.tapestry5.ioc.services.ClassFab.proxyMethodsToDelegate()

        MethodSignature sig = new MethodSignature(serviceInterface, "delegate", null, null);

        classFab.addMethod(Modifier.PRIVATE, sig, body);

        classFab.proxyMethodsToDelegate(serviceInterface, "delegate()", description);

        if (serviceImplementation != null)
        {
            classFab.copyClassAnnotationsFromDelegate(serviceImplementation);
View Full Code Here

Examples of org.apache.tapestry5.ioc.services.ClassFab.proxyMethodsToDelegate()

        MethodSignature sig = new MethodSignature(serviceInterface, "delegate", null, null);

        classFab.addMethod(Modifier.PRIVATE, sig, body);

        classFab.proxyMethodsToDelegate(serviceInterface, "delegate()", description);

        if (serviceImplementation != null)
        {
            classFab.copyClassAnnotationsFromDelegate(serviceImplementation);
View Full Code Here

Examples of org.apache.tapestry5.ioc.services.ClassFab.proxyMethodsToDelegate()

        MethodSignature sig = new MethodSignature(proxyInterface, "_delegate", null, null);

        classFab.addMethod(Modifier.PRIVATE, sig, body);
       
        classFab.proxyMethodsToDelegate(proxyInterface, "_delegate()", description);
       
        if(delegateClass != null)
        {
            classFab.copyClassAnnotationsFromDelegate(delegateClass);
           
View Full Code Here

Examples of org.apache.tapestry5.ioc.services.ClassFab.proxyMethodsToDelegate()

        ClassFab cf = newClassFab("Delegator", Object.class);

        cf.addField("_delegate", SampleService.class);
        cf.addConstructor(new Class[] { SampleService.class }, null, "_delegate = $1;");

        cf.proxyMethodsToDelegate(SampleService.class, "_delegate", "<Delegator>");

        SampleService delegate = newMock(SampleService.class);

        Class clazz = cf.createClass();
View Full Code Here

Examples of org.apache.tapestry5.ioc.services.ClassFab.proxyMethodsToDelegate()

        ClassFab cf = newClassFab("ToStringDelegator", Object.class);

        cf.addField("_delegate", ToStringService.class);
        cf.addConstructor(new Class[] { ToStringService.class }, null, "_delegate = $1;");

        cf.proxyMethodsToDelegate(ToStringService.class, "_delegate", "<ToStringDelegator>");

        ToStringService delegate = new ToStringService()
        {
            @Override
            public String toString()
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.