Examples of proxyMethodsToDelegate()


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

        addDelegateGetter(cf, serviceInterface, serviceId);

        addShutdownListenerMethod(cf);

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

        // For eager load services, add an eagerLoadService() method that calls _delegate(), to
        // force the creation of the service.

        if (eagerLoad)
View Full Code Here

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

        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.tapestry.ioc.services.ClassFab.proxyMethodsToDelegate()

        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.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.tapestry.ioc.services.ClassFab.proxyMethodsToDelegate()

        { Environment.class, Class.class }, null, "{ _environment = $1; _serviceType = $2; }");

        classFab.addMethod(Modifier.PRIVATE, new MethodSignature(serviceType, "_delegate", null,
                null), "return ($r) _environment.peekRequired(_serviceType); ");

        classFab.proxyMethodsToDelegate(serviceType, "_delegate()", format(
                "<EnvironmentalProxy for %s>",
                serviceType.getName()));

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

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

                                "{ _environment = $1; _serviceType = $2; }");

        classFab.addMethod(Modifier.PRIVATE, new MethodSignature(serviceType, "_delegate", null, null),
                           "return ($r) _environment.peekRequired(_serviceType); ");

        classFab.proxyMethodsToDelegate(serviceType, "_delegate()",
                                        format("<EnvironmentalProxy for %s>", serviceType.getName()));

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

Examples of org.apache.tapestry.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.tapestry.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.tapestry.ioc.services.ClassFab.proxyMethodsToDelegate()

        addDelegateGetter(cf, serviceInterface, serviceId);

        addShutdownListenerMethod(cf);

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

        // For eager load services, add an eagerLoadService() method that calls _delegate(), to
        // force the creation of the service.

        if (eagerLoad)
View Full Code Here

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

        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
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.