Examples of ConstantProvider


Examples of org.apache.commons.proxy.provider.ConstantProvider

    }

    public void testDelegatorWithSuperclass()
    {
        final Echo echo = ( Echo ) factory
                .createDelegatorProxy( new ConstantProvider( new EchoImpl() )new Class[] { Echo.class, EchoImpl.class } );
        assertTrue( echo instanceof EchoImpl );
    }
View Full Code Here

Examples of org.apache.commons.proxy.provider.ConstantProvider

    }

    public void testProxiesWithClashingFinalMethodInSuperclass()
    {
        final Class[] proxyClasses = new Class[]{Echo.class, FinalMethodEcho.class};
        Echo proxy = ( Echo )factory.createDelegatorProxy( new ConstantProvider( new EchoImpl() ), proxyClasses );
        assertEquals( "final", proxy.echoBack("echo") );

        proxy = ( Echo )factory.createInterceptorProxy( new EchoImpl(), new NoOpMethodInterceptor(), proxyClasses );
        assertEquals( "final", proxy.echoBack("echo") );
View Full Code Here

Examples of org.apache.commons.proxy.provider.ConstantProvider

    public void testDelegatorWithMultipleSuperclasses()
    {
        try
        {
            factory.createDelegatorProxy( new ConstantProvider( new EchoImpl() ),
                                           new Class[] { EchoImpl.class, String.class } );
            fail();
        }
        catch( ProxyFactoryException e )
        {
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.