commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r278595 [1/2] - in /jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy: ./ exception/ factory/cglib/ factory/javassist/ factory/reflect/ factory/util/ handler/ interceptor/ interceptor/filter/ provider/ provider/cache/
Date Sun, 04 Sep 2005 14:12:38 GMT
Author: jcarman
Date: Sun Sep  4 07:12:22 2005
New Revision: 278595

URL: http://svn.apache.org/viewcvs?rev=278595&view=rev
Log:
Used IDEA "Rearranger" plugin to reorganize/document code.

Modified:
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ObjectProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/exception/ObjectProviderException.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/exception/ProxyFactoryException.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/cglib/CglibProxyFactory.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistMethodInvocation.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistUtils.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/AbstractInvocationHandler.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/DelegateProviderInvocationHandler.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/DelegatingInvocationHandler.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/MethodInterceptorInvocationHandler.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionMethodInvocation.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionProxyFactory.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyClassGenerator.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/MethodSignature.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassCache.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassGenerator.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/FilteredMethodInterceptor.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodFilter.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodInterceptorChain.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/filter/PatternMethodFilter.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/filter/SimpleMethodFilter.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/AbstractObjectProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/BeanProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/BurlapProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/CachedProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/ConstantProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/HessianProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/JaxRpcProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/NullProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/PooledProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/ProviderDecorator.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/ProviderUtils.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/RmiProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/SessionBeanProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/SingletonProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/SynchronizedProvider.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/cache/AbstractCache.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/cache/Cache.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/cache/CacheEvictionEvent.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/cache/CacheEvictionListener.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/cache/CachedObject.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/cache/SimpleCache.java
    jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/cache/ThreadLocalCache.java

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ObjectProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ObjectProvider.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ObjectProvider.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ObjectProvider.java Sun Sep  4 07:12:22 2005
@@ -24,6 +24,10 @@
  */
 public interface ObjectProvider
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Other Methods
+//----------------------------------------------------------------------------------------------------------------------
+
     /**
      * Returns an object.  Implementing classes should throw a {@link org.apache.commons.proxy.exception.ObjectProviderException}
      * if any problems arise while constructing/finding the object.
@@ -32,3 +36,4 @@
      */
     public Object getObject();
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/ProxyFactory.java Sun Sep  4 07:12:22 2005
@@ -30,31 +30,9 @@
  */
 public interface ProxyFactory
 {
-    /**
-     * Creates a proxy which passes through a {@link org.aopalliance.intercept.MethodInterceptor method interceptor}
-     * before eventually reaching the <code>target</code> object.
-     *
-     * @param classLoader     the class loader to use when generating the proxy
-     * @param target          the target object
-     * @param interceptor     the method interceptor
-     * @param proxyInterfaces the interfaces that the proxy should implement.
-     * @return a proxy which passes through a {@link org.aopalliance.intercept.MethodInterceptor method interceptor}
-     *         before eventually reaching the <code>target</code> object.
-     */
-    public Object createInterceptingProxy( ClassLoader classLoader, Object target, MethodInterceptor interceptor,
-                                           Class... proxyInterfaces );
-
-    /**
-     * Creates a proxy which passes through a {@link MethodInterceptor method interceptor} before eventually reaching
-     * the <code>target</code> object.  The proxy will be generated using the current thread's "context class loader."
-     *
-     * @param target          the target object
-     * @param interceptor     the method interceptor
-     * @param proxyInterfaces the interfaces that the proxy should implement
-     * @return a proxy which passes through a {@link MethodInterceptor method interceptor} before eventually reaching
-     *         the <code>target</code> object.
-     */
-    public Object createInterceptingProxy( Object target, MethodInterceptor interceptor, Class... proxyInterfaces );
+//----------------------------------------------------------------------------------------------------------------------
+// Other Methods
+//----------------------------------------------------------------------------------------------------------------------
 
     /**
      * Creates a proxy which delegates to the object provided by <code>delegateProvider</code>.  The proxy will be
@@ -78,15 +56,29 @@
                                          Class... proxyInterfaces );
 
     /**
-     * Creates a proxy which uses the provided {@link InvocationHandler} to handle all method invocations.
+     * Creates a proxy which passes through a {@link MethodInterceptor method interceptor} before eventually reaching
+     * the <code>target</code> object.  The proxy will be generated using the current thread's "context class loader."
      *
-     * @param classLoader       the class loader to use when generating the proxy
-     * @param invocationHandler the invocation handler
-     * @param proxyInterfaces   the interfaces that the proxy should implement
-     * @return a proxy which uses the provided {@link InvocationHandler} to handle all method invocations
+     * @param target          the target object
+     * @param interceptor     the method interceptor
+     * @param proxyInterfaces the interfaces that the proxy should implement
+     * @return a proxy which passes through a {@link MethodInterceptor method interceptor} before eventually reaching
+     *         the <code>target</code> object.
      */
-    public Object createInvocationHandlerProxy( ClassLoader classLoader, InvocationHandler invocationHandler,
-                                                Class... proxyInterfaces );
+    public Object createInterceptingProxy( Object target, MethodInterceptor interceptor, Class... proxyInterfaces );
+    /**
+     * Creates a proxy which passes through a {@link org.aopalliance.intercept.MethodInterceptor method interceptor}
+     * before eventually reaching the <code>target</code> object.
+     *
+     * @param classLoader     the class loader to use when generating the proxy
+     * @param target          the target object
+     * @param interceptor     the method interceptor
+     * @param proxyInterfaces the interfaces that the proxy should implement.
+     * @return a proxy which passes through a {@link org.aopalliance.intercept.MethodInterceptor method interceptor}
+     *         before eventually reaching the <code>target</code> object.
+     */
+    public Object createInterceptingProxy( ClassLoader classLoader, Object target, MethodInterceptor interceptor,
+                                           Class... proxyInterfaces );
 
     /**
      * Creates a proxy which uses the provided {@link InvocationHandler} to handle all method invocations.  The proxy
@@ -97,4 +89,16 @@
      * @return a proxy which uses the provided {@link InvocationHandler} to handle all method invocations
      */
     public Object createInvocationHandlerProxy( InvocationHandler invocationHandler, Class... proxyInterfaces );
+
+    /**
+     * Creates a proxy which uses the provided {@link InvocationHandler} to handle all method invocations.
+     *
+     * @param classLoader       the class loader to use when generating the proxy
+     * @param invocationHandler the invocation handler
+     * @param proxyInterfaces   the interfaces that the proxy should implement
+     * @return a proxy which uses the provided {@link InvocationHandler} to handle all method invocations
+     */
+    public Object createInvocationHandlerProxy( ClassLoader classLoader, InvocationHandler invocationHandler,
+                                                Class... proxyInterfaces );
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/exception/ObjectProviderException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/exception/ObjectProviderException.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/exception/ObjectProviderException.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/exception/ObjectProviderException.java Sun Sep  4 07:12:22 2005
@@ -25,6 +25,10 @@
  */
 public class ObjectProviderException extends RuntimeException
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public ObjectProviderException()
     {
     }
@@ -34,13 +38,14 @@
         super( message );
     }
 
-    public ObjectProviderException( String message, Throwable cause )
+    public ObjectProviderException( Throwable cause )
     {
-        super( message, cause );
+        super( cause );
     }
 
-    public ObjectProviderException( Throwable cause )
+    public ObjectProviderException( String message, Throwable cause )
     {
-        super( cause );
+        super( message, cause );
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/exception/ProxyFactoryException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/exception/ProxyFactoryException.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/exception/ProxyFactoryException.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/exception/ProxyFactoryException.java Sun Sep  4 07:12:22 2005
@@ -25,6 +25,10 @@
  */
 public class ProxyFactoryException extends RuntimeException
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public ProxyFactoryException()
     {
     }
@@ -34,13 +38,14 @@
         super( message );
     }
 
-    public ProxyFactoryException( String message, Throwable cause )
+    public ProxyFactoryException( Throwable cause )
     {
-        super( message, cause );
+        super( cause );
     }
 
-    public ProxyFactoryException( Throwable cause )
+    public ProxyFactoryException( String message, Throwable cause )
     {
-        super( cause );
+        super( message, cause );
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/cglib/CglibProxyFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/cglib/CglibProxyFactory.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/cglib/CglibProxyFactory.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/cglib/CglibProxyFactory.java Sun Sep  4 07:12:22 2005
@@ -37,23 +37,27 @@
  */
 public class CglibProxyFactory extends AbstractProxyFactory
 {
-    public Object createInterceptingProxy( ClassLoader classLoader, Object target, MethodInterceptor interceptor,
-                                           Class... proxyInterfaces )
+//----------------------------------------------------------------------------------------------------------------------
+// ProxyFactory Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
+    public Object createDelegatingProxy( ClassLoader classLoader, ObjectProvider targetProvider,
+                                         Class... proxyInterfaces )
     {
         final Enhancer enhancer = new Enhancer();
         enhancer.setClassLoader( classLoader );
         enhancer.setInterfaces( proxyInterfaces );
-        enhancer.setCallback( new InterceptorBridge( target, interceptor ) );
+        enhancer.setCallback( new ObjectProviderDispatcher( targetProvider ) );
         return enhancer.create();
     }
 
-    public Object createDelegatingProxy( ClassLoader classLoader, ObjectProvider targetProvider,
-                                         Class... proxyInterfaces )
+    public Object createInterceptingProxy( ClassLoader classLoader, Object target, MethodInterceptor interceptor,
+                                           Class... proxyInterfaces )
     {
         final Enhancer enhancer = new Enhancer();
         enhancer.setClassLoader( classLoader );
         enhancer.setInterfaces( proxyInterfaces );
-        enhancer.setCallback( new ObjectProviderDispatcher( targetProvider ) );
+        enhancer.setCallback( new InterceptorBridge( target, interceptor ) );
         return enhancer.create();
     }
 
@@ -67,6 +71,10 @@
         return enhancer.create();
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// Inner Classes
+//----------------------------------------------------------------------------------------------------------------------
+
     private class InvocationHandlerBridge implements net.sf.cglib.proxy.InvocationHandler
     {
         private final InvocationHandler original;
@@ -154,5 +162,5 @@
             return delegateProvider.getObject();
         }
     }
-
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistMethodInvocation.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistMethodInvocation.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistMethodInvocation.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistMethodInvocation.java Sun Sep  4 07:12:22 2005
@@ -35,53 +35,18 @@
  */
 public abstract class JavassistMethodInvocation implements MethodInvocation
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private static WeakHashMap<ClassLoader, Map<String, WeakReference<Class>>> loaderToClassCache = new WeakHashMap<ClassLoader, Map<String, WeakReference<Class>>>();
     protected final Method method;
     protected final Object target;
     protected final Object[] arguments;
 
-    public JavassistMethodInvocation( Method method, Object target, Object[] arguments )
-    {
-        this.method = method;
-        this.target = target;
-        this.arguments = ( arguments == null || arguments.length == 0 ? null : arguments );
-    }
-
-    public Method getMethod()
-    {
-        return method;
-    }
-
-    public Object[] getArguments()
-    {
-        return arguments;
-    }
-
-    public Object getThis()
-    {
-        return target;
-    }
-
-    public AccessibleObject getStaticPart()
-    {
-        return method;
-    }
-
-    private static Map<String, WeakReference<Class>> getClassCache( ClassLoader classLoader )
-    {
-        Map<String, WeakReference<Class>> cache = loaderToClassCache.get( classLoader );
-        if( cache == null )
-        {
-            cache = new HashMap<String, WeakReference<Class>>();
-            loaderToClassCache.put( classLoader, cache );
-        }
-        return cache;
-    }
-
-    private static String toClassCacheKey( Method method )
-    {
-        return String.valueOf( method );
-    }
+//----------------------------------------------------------------------------------------------------------------------
+// Static Methods
+//----------------------------------------------------------------------------------------------------------------------
 
     public synchronized static Class getMethodInvocationClass( ClassLoader classLoader, Method interfaceMethod )
             throws CannotCompileException
@@ -110,6 +75,22 @@
         return invocationClass;
     }
 
+    private static Map<String, WeakReference<Class>> getClassCache( ClassLoader classLoader )
+    {
+        Map<String, WeakReference<Class>> cache = loaderToClassCache.get( classLoader );
+        if( cache == null )
+        {
+            cache = new HashMap<String, WeakReference<Class>>();
+            loaderToClassCache.put( classLoader, cache );
+        }
+        return cache;
+    }
+
+    private static String toClassCacheKey( Method method )
+    {
+        return String.valueOf( method );
+    }
+
     private static Class createInvocationClass( ClassLoader classLoader, Method interfaceMethod )
             throws CannotCompileException
     {
@@ -162,4 +143,48 @@
         invocationClass = ctClass.toClass( classLoader );
         return invocationClass;
     }
+
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
+    public JavassistMethodInvocation( Method method, Object target, Object[] arguments )
+    {
+        this.method = method;
+        this.target = target;
+        this.arguments = ( arguments == null || arguments.length == 0 ? null : arguments );
+    }
+
+//----------------------------------------------------------------------------------------------------------------------
+// Invocation Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
+    public Object[] getArguments()
+    {
+        return arguments;
+    }
+
+//----------------------------------------------------------------------------------------------------------------------
+// Joinpoint Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
+    public AccessibleObject getStaticPart()
+    {
+        return method;
+    }
+
+    public Object getThis()
+    {
+        return target;
+    }
+
+//----------------------------------------------------------------------------------------------------------------------
+// MethodInvocation Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
+    public Method getMethod()
+    {
+        return method;
+    }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistProxyFactory.java Sun Sep  4 07:12:22 2005
@@ -39,6 +39,10 @@
  */
 public class JavassistProxyFactory extends AbstractProxyFactory
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private static final ProxyClassCache delegatingProxyClassCache = new ProxyClassCache(
             new DelegatingProxyClassGenerator() );
     private static final ProxyClassCache interceptingProxyClassCache = new ProxyClassCache(
@@ -46,34 +50,37 @@
     private static final ProxyClassCache invocationHandlerProxyClassCache = new ProxyClassCache(
             new InvocationHandlerProxyClassGenerator() );
 
-    public Object createInterceptingProxy( ClassLoader classLoader, Object target, MethodInterceptor interceptor,
-                                           Class... proxyInterfaces )
+//----------------------------------------------------------------------------------------------------------------------
+// ProxyFactory Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
+    public Object createDelegatingProxy( ClassLoader classLoader, ObjectProvider targetProvider,
+                                         Class... proxyInterfaces )
     {
         try
         {
-            final Class clazz = interceptingProxyClassCache.getProxyClass( classLoader, proxyInterfaces );
-            final Method[] methods = AbstractProxyClassGenerator.getImplementationMethods( proxyInterfaces );
-            return clazz.getConstructor( Method[].class, Object.class, MethodInterceptor.class )
-                    .newInstance( methods, target, interceptor );
+            final Class clazz = delegatingProxyClassCache.getProxyClass( classLoader, proxyInterfaces );
+            return clazz.getConstructor( ObjectProvider.class ).newInstance( targetProvider );
         }
         catch( Exception e )
         {
-            throw new ProxyFactoryException( "Unable to instantiate proxy class instance.", e );
-
+            throw new ProxyFactoryException( "Unable to instantiate proxy from generated proxy class.", e );
         }
     }
 
-    public Object createDelegatingProxy( ClassLoader classLoader, ObjectProvider targetProvider,
-                                         Class... proxyInterfaces )
+    public Object createInterceptingProxy( ClassLoader classLoader, Object target, MethodInterceptor interceptor,
+                                           Class... proxyInterfaces )
     {
         try
         {
-            final Class clazz = delegatingProxyClassCache.getProxyClass( classLoader, proxyInterfaces );
-            return clazz.getConstructor( ObjectProvider.class ).newInstance( targetProvider );
+            final Class clazz = interceptingProxyClassCache.getProxyClass( classLoader, proxyInterfaces );
+            final Method[] methods = AbstractProxyClassGenerator.getImplementationMethods( proxyInterfaces );
+            return clazz.getConstructor( Method[].class, Object.class, MethodInterceptor.class )
+                    .newInstance( methods, target, interceptor );
         }
         catch( Exception e )
         {
-            throw new ProxyFactoryException( "Unable to instantiate proxy from generated proxy class.", e );
+            throw new ProxyFactoryException( "Unable to instantiate proxy class instance.", e );
         }
     }
 
@@ -93,6 +100,10 @@
         }
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// Inner Classes
+//----------------------------------------------------------------------------------------------------------------------
+
     private static class InvocationHandlerProxyClassGenerator extends AbstractProxyClassGenerator
     {
         public Class generateProxyClass( ClassLoader classLoader, Class... proxyInterfaces )
@@ -208,3 +219,4 @@
         }
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistUtils.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistUtils.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/javassist/JavassistUtils.java Sun Sep  4 07:12:22 2005
@@ -29,24 +29,22 @@
  */
 public class JavassistUtils
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
+    public static final String DEFAULT_BASE_NAME = "JavassistUtilsGenerated";
     private static int classNumber = 0;
     private static final ClassPool classPool = ClassPool.getDefault();
-    public static final String DEFAULT_BASE_NAME = "JavassistUtilsGenerated";
 
-    public static void addInterfaces( CtClass ctClass, Class... proxyInterfaces )
-    {
-        for( int i = 0; i < proxyInterfaces.length; i++ )
-        {
-            Class proxyInterface = proxyInterfaces[i];
-            ctClass.addInterface( resolve( proxyInterface ) );
-        }
-    }
+//----------------------------------------------------------------------------------------------------------------------
+// Static Methods
+//----------------------------------------------------------------------------------------------------------------------
 
     public static void addField( Class fieldType, String fieldName, CtClass enclosingClass ) throws
                                                                                              CannotCompileException
     {
         enclosingClass.addField( new CtField( resolve( fieldType ), fieldName, enclosingClass ) );
-
     }
 
     public static CtClass resolve( Class clazz )
@@ -62,14 +60,22 @@
         }
     }
 
-    public static CtClass[] resolve( Class[] classes )
+    public static String getJavaClassName( Class inputClass )
     {
-        final CtClass[] ctClasses = new CtClass[classes.length];
-        for( int i = 0; i < ctClasses.length; ++i )
+        if( inputClass.isArray() )
         {
-            ctClasses[i] = resolve( classes[i] );
+            return getJavaClassName( inputClass.getComponentType() ) + "[]";
+        }
+        return inputClass.getName();
+    }
+
+    public static void addInterfaces( CtClass ctClass, Class... proxyInterfaces )
+    {
+        for( int i = 0; i < proxyInterfaces.length; i++ )
+        {
+            Class proxyInterface = proxyInterfaces[i];
+            ctClass.addInterface( resolve( proxyInterface ) );
         }
-        return ctClasses;
     }
 
     public static CtClass createClass()
@@ -92,14 +98,14 @@
         return classPool.makeClass( baseName + "_" + classNumber++, resolve( superclass ) );
     }
 
-    public static String getJavaClassName( Class inputClass )
+    public static CtClass[] resolve( Class[] classes )
     {
-        if( inputClass.isArray() )
+        final CtClass[] ctClasses = new CtClass[classes.length];
+        for( int i = 0; i < ctClasses.length; ++i )
         {
-            return getJavaClassName( inputClass.getComponentType() ) + "[]";
+            ctClasses[i] = resolve( classes[i] );
         }
-        return inputClass.getName();
+        return ctClasses;
     }
-
-
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/AbstractInvocationHandler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/AbstractInvocationHandler.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/AbstractInvocationHandler.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/AbstractInvocationHandler.java Sun Sep  4 07:12:22 2005
@@ -27,6 +27,10 @@
  */
 public abstract class AbstractInvocationHandler implements InvocationHandler
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Other Methods
+//----------------------------------------------------------------------------------------------------------------------
+
     /**
      * Creates a proxy object which implements the specified proxy interfaces.
      *

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/DelegateProviderInvocationHandler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/DelegateProviderInvocationHandler.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/DelegateProviderInvocationHandler.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/DelegateProviderInvocationHandler.java Sun Sep  4 07:12:22 2005
@@ -26,15 +26,28 @@
  */
 public class DelegateProviderInvocationHandler extends DelegatingInvocationHandler
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final ObjectProvider delegateProvider;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public DelegateProviderInvocationHandler( ObjectProvider delegateProvider )
     {
         this.delegateProvider = delegateProvider;
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// Other Methods
+//----------------------------------------------------------------------------------------------------------------------
+
     protected Object getDelegate()
     {
         return delegateProvider.getObject();
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/DelegatingInvocationHandler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/DelegatingInvocationHandler.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/DelegatingInvocationHandler.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/DelegatingInvocationHandler.java Sun Sep  4 07:12:22 2005
@@ -27,8 +27,16 @@
  */
 public abstract class DelegatingInvocationHandler extends AbstractInvocationHandler
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Abstract Methods
+//----------------------------------------------------------------------------------------------------------------------
+
     protected abstract Object getDelegate();
 
+//----------------------------------------------------------------------------------------------------------------------
+// InvocationHandler Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public Object invoke( Object proxy, Method method, Object[] args ) throws Throwable
     {
         try
@@ -41,6 +49,10 @@
         }
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// Other Methods
+//----------------------------------------------------------------------------------------------------------------------
+
     /**
      * A simplified proxy creation method which merely creates a proxy which supports all the interfaces implemented by
      * the delegate.
@@ -63,3 +75,4 @@
         return createProxy( classLoader, getDelegate().getClass().getInterfaces() );
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/MethodInterceptorInvocationHandler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/MethodInterceptorInvocationHandler.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/MethodInterceptorInvocationHandler.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/MethodInterceptorInvocationHandler.java Sun Sep  4 07:12:22 2005
@@ -28,14 +28,26 @@
  */
 public class MethodInterceptorInvocationHandler extends AbstractInvocationHandler
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final Object target;
     private final MethodInterceptor methodInterceptor;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public MethodInterceptorInvocationHandler( Object target, MethodInterceptor methodInterceptor )
     {
         this.target = target;
         this.methodInterceptor = methodInterceptor;
     }
+
+//----------------------------------------------------------------------------------------------------------------------
+// InvocationHandler Implementation
+//----------------------------------------------------------------------------------------------------------------------
 
     public Object invoke( Object proxy, Method method, Object[] args ) throws Throwable
     {

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionMethodInvocation.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionMethodInvocation.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionMethodInvocation.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionMethodInvocation.java Sun Sep  4 07:12:22 2005
@@ -30,10 +30,18 @@
  */
 class ReflectionMethodInvocation implements MethodInvocation
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final Method method;
     private final Object[] arguments;
     private final Object target;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public ReflectionMethodInvocation( Object target, Method method, Object[] arguments )
     {
         this.method = method;
@@ -41,16 +49,29 @@
         this.target = target;
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// Invocation Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public Object[] getArguments()
     {
         return arguments;
     }
 
-    public Method getMethod()
+//----------------------------------------------------------------------------------------------------------------------
+// Joinpoint Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
+    public AccessibleObject getStaticPart()
     {
         return method;
     }
 
+    public Object getThis()
+    {
+        return target;
+    }
+
     public Object proceed() throws Throwable
     {
         try
@@ -63,13 +84,13 @@
         }
     }
 
-    public Object getThis()
-    {
-        return target;
-    }
+//----------------------------------------------------------------------------------------------------------------------
+// MethodInvocation Implementation
+//----------------------------------------------------------------------------------------------------------------------
 
-    public AccessibleObject getStaticPart()
+    public Method getMethod()
     {
         return method;
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionProxyFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionProxyFactory.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionProxyFactory.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/reflect/ReflectionProxyFactory.java Sun Sep  4 07:12:22 2005
@@ -31,12 +31,9 @@
  */
 public class ReflectionProxyFactory extends AbstractProxyFactory
 {
-    public Object createInterceptingProxy( ClassLoader classLoader, Object target, MethodInterceptor interceptor,
-                                           Class... proxyInterfaces )
-    {
-        return new MethodInterceptorInvocationHandler( target, interceptor )
-                .createProxy( classLoader, proxyInterfaces );
-    }
+//----------------------------------------------------------------------------------------------------------------------
+// ProxyFactory Implementation
+//----------------------------------------------------------------------------------------------------------------------
 
     public Object createDelegatingProxy( ClassLoader classLoader, ObjectProvider targetProvider,
                                          Class... proxyInterfaces )
@@ -45,9 +42,17 @@
                                        new DelegateProviderInvocationHandler( targetProvider ) );
     }
 
+    public Object createInterceptingProxy( ClassLoader classLoader, Object target, MethodInterceptor interceptor,
+                                           Class... proxyInterfaces )
+    {
+        return new MethodInterceptorInvocationHandler( target, interceptor )
+                .createProxy( classLoader, proxyInterfaces );
+    }
+
     public Object createInvocationHandlerProxy( ClassLoader classLoader, InvocationHandler invocationHandler,
                                                 Class... proxyInterfaces )
     {
         return Proxy.newProxyInstance( classLoader, proxyInterfaces, invocationHandler );
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyClassGenerator.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyClassGenerator.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyClassGenerator.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyClassGenerator.java Sun Sep  4 07:12:22 2005
@@ -30,6 +30,10 @@
  */
 public abstract class AbstractProxyClassGenerator implements ProxyClassGenerator
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Static Methods
+//----------------------------------------------------------------------------------------------------------------------
+
     /**
      * Returns all methods that a proxy class must implement from the proxy interfaces.  This method makes sure there
      * are no method signature clashes. For methods with the same signature (name and parameter types), the one
@@ -60,3 +64,4 @@
         return resultingMethods.toArray( results );
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/AbstractProxyFactory.java Sun Sep  4 07:12:22 2005
@@ -32,8 +32,16 @@
  */
 public abstract class AbstractProxyFactory implements ProxyFactory
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     protected Log log;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     protected AbstractProxyFactory()
     {
         setLog( LogFactory.getLog( getClass() ) );
@@ -44,16 +52,20 @@
         this.log = log;
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// ProxyFactory Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
+    public final Object createDelegatingProxy( ObjectProvider targetProvider, Class... proxyInterfaces )
+    {
+        return createDelegatingProxy( Thread.currentThread().getContextClassLoader(), targetProvider, proxyInterfaces );
+    }
+
     public final Object createInterceptingProxy( Object target, MethodInterceptor interceptor,
                                                  Class... proxyInterfaces )
     {
         return createInterceptingProxy( Thread.currentThread().getContextClassLoader(), target, interceptor,
                                         proxyInterfaces );
-    }
-
-    public final Object createDelegatingProxy( ObjectProvider targetProvider, Class... proxyInterfaces )
-    {
-        return createDelegatingProxy( Thread.currentThread().getContextClassLoader(), targetProvider, proxyInterfaces );
     }
 
     public final Object createInvocationHandlerProxy( InvocationHandler invocationHandler, Class... proxyInterfaces )

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/MethodSignature.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/MethodSignature.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/MethodSignature.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/MethodSignature.java Sun Sep  4 07:12:22 2005
@@ -26,15 +26,27 @@
  */
 public class MethodSignature
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final String name;
     private final List<Class> parameterTypes;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public MethodSignature( Method method )
     {
         this.name = method.getName();
         this.parameterTypes = Arrays.<Class>asList( method.getParameterTypes() );
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// Canonical Methods
+//----------------------------------------------------------------------------------------------------------------------
+
     public boolean equals( Object o )
     {
         if( this == o )
@@ -65,3 +77,4 @@
         return result;
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassCache.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassCache.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassCache.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassCache.java Sun Sep  4 07:12:22 2005
@@ -27,14 +27,26 @@
  */
 public class ProxyClassCache
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final Map<ClassLoader, Map<String, WeakReference<Class>>> loaderToClassCache = new WeakHashMap<ClassLoader, Map<String, WeakReference<Class>>>();
     private final ProxyClassGenerator proxyClassGenerator;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public ProxyClassCache( ProxyClassGenerator proxyClassGenerator )
     {
         this.proxyClassGenerator = proxyClassGenerator;
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// Other Methods
+//----------------------------------------------------------------------------------------------------------------------
+
     public synchronized Class getProxyClass( ClassLoader classLoader, Class... proxyInterfaces )
     {
         final Map<String, WeakReference<Class>> classCache = getClassCache( classLoader );
@@ -61,6 +73,17 @@
         return proxyClass;
     }
 
+    private Map<String, WeakReference<Class>> getClassCache( ClassLoader classLoader )
+    {
+        Map<String, WeakReference<Class>> cache = loaderToClassCache.get( classLoader );
+        if( cache == null )
+        {
+            cache = new HashMap<String, WeakReference<Class>>();
+            loaderToClassCache.put( classLoader, cache );
+        }
+        return cache;
+    }
+
     private String toClassCacheKey( Class... proxyInterfaces )
     {
         final StringBuffer sb = new StringBuffer();
@@ -75,15 +98,5 @@
         }
         return sb.toString();
     }
-
-    private Map<String, WeakReference<Class>> getClassCache( ClassLoader classLoader )
-    {
-        Map<String, WeakReference<Class>> cache = loaderToClassCache.get( classLoader );
-        if( cache == null )
-        {
-            cache = new HashMap<String, WeakReference<Class>>();
-            loaderToClassCache.put( classLoader, cache );
-        }
-        return cache;
-    }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassGenerator.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassGenerator.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassGenerator.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/factory/util/ProxyClassGenerator.java Sun Sep  4 07:12:22 2005
@@ -22,5 +22,10 @@
  */
 public interface ProxyClassGenerator
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Other Methods
+//----------------------------------------------------------------------------------------------------------------------
+
     public Class generateProxyClass( ClassLoader classLoader, Class... proxyInterfaces );
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/handler/NullInvocationHandler.java Sun Sep  4 07:12:22 2005
@@ -28,8 +28,13 @@
  */
 public class NullInvocationHandler implements InvocationHandler
 {
+//----------------------------------------------------------------------------------------------------------------------
+// InvocationHandler Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public Object invoke( Object proxy, Method method, Object[] args ) throws Throwable
     {
         return null;
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/FilteredMethodInterceptor.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/FilteredMethodInterceptor.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/FilteredMethodInterceptor.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/FilteredMethodInterceptor.java Sun Sep  4 07:12:22 2005
@@ -28,15 +28,27 @@
  */
 public class FilteredMethodInterceptor implements MethodInterceptor
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final MethodInterceptor inner;
     private final MethodFilter filter;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public FilteredMethodInterceptor( MethodInterceptor inner, MethodFilter filter )
     {
         this.inner = inner;
         this.filter = filter;
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// MethodInterceptor Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public Object invoke( MethodInvocation methodInvocation ) throws Throwable
     {
         if( filter.accepts( methodInvocation.getMethod() ) )
@@ -49,3 +61,4 @@
         }
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodFilter.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodFilter.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodFilter.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodFilter.java Sun Sep  4 07:12:22 2005
@@ -26,5 +26,10 @@
  */
 public interface MethodFilter
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Other Methods
+//----------------------------------------------------------------------------------------------------------------------
+
     public boolean accepts( Method method );
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodInterceptorChain.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodInterceptorChain.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodInterceptorChain.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/MethodInterceptorChain.java Sun Sep  4 07:12:22 2005
@@ -30,21 +30,35 @@
  */
 public class MethodInterceptorChain
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final MethodInterceptor[] interceptors;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public MethodInterceptorChain( MethodInterceptor... interceptors )
     {
         this.interceptors = interceptors;
     }
 
-    public ObjectProvider createProxyProvider( ProxyFactory proxyFactory, ClassLoader classLoader, Object terminus,
-                                               Class... proxyInterfaces )
+//----------------------------------------------------------------------------------------------------------------------
+// Other Methods
+//----------------------------------------------------------------------------------------------------------------------
+
+    private Object createProxy( ProxyFactory proxyFactory, ClassLoader classLoader, Object terminus,
+                                Class... proxyInterfaces )
     {
-        if( proxyInterfaces.length == 0 )
+        Object currentTarget = terminus;
+        for( int i = interceptors.length - 1; i >= 0; --i )
         {
-            proxyInterfaces = terminus.getClass().getInterfaces();
+            currentTarget = proxyFactory
+                    .createInterceptingProxy( classLoader, currentTarget, interceptors[i], proxyInterfaces );
         }
-        return new ProxyObjectProvider( proxyFactory, classLoader, terminus, proxyInterfaces );
+        return currentTarget;
     }
 
     public ObjectProvider createProxyProvider( ProxyFactory proxyFactory, Object terminus, Class... proxyInterfaces )
@@ -53,18 +67,20 @@
                                     proxyInterfaces );
     }
 
-    private Object createProxy( ProxyFactory proxyFactory, ClassLoader classLoader, Object terminus,
-                                Class... proxyInterfaces )
+    public ObjectProvider createProxyProvider( ProxyFactory proxyFactory, ClassLoader classLoader, Object terminus,
+                                               Class... proxyInterfaces )
     {
-        Object currentTarget = terminus;
-        for( int i = interceptors.length - 1; i >= 0; --i )
+        if( proxyInterfaces.length == 0 )
         {
-            currentTarget = proxyFactory
-                    .createInterceptingProxy( classLoader, currentTarget, interceptors[i], proxyInterfaces );
+            proxyInterfaces = terminus.getClass().getInterfaces();
         }
-        return currentTarget;
+        return new ProxyObjectProvider( proxyFactory, classLoader, terminus, proxyInterfaces );
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// Inner Classes
+//----------------------------------------------------------------------------------------------------------------------
+
     private class ProxyObjectProvider extends AbstractObjectProvider
     {
         private final ClassLoader classLoader;
@@ -87,3 +103,4 @@
         }
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/filter/PatternMethodFilter.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/filter/PatternMethodFilter.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/filter/PatternMethodFilter.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/filter/PatternMethodFilter.java Sun Sep  4 07:12:22 2005
@@ -29,15 +29,28 @@
  */
 public class PatternMethodFilter implements MethodFilter
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final String pattern;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public PatternMethodFilter( String pattern )
     {
         this.pattern = pattern;
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// MethodFilter Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public boolean accepts( Method method )
     {
         return method.getName().matches( pattern );
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/filter/SimpleMethodFilter.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/filter/SimpleMethodFilter.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/filter/SimpleMethodFilter.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/interceptor/filter/SimpleMethodFilter.java Sun Sep  4 07:12:22 2005
@@ -31,15 +31,28 @@
  */
 public class SimpleMethodFilter implements MethodFilter
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final Set<String> methodNames;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public SimpleMethodFilter( String... methodNames )
     {
         this.methodNames = new HashSet<String>( Arrays.asList( methodNames ) );
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// MethodFilter Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public boolean accepts( Method method )
     {
         return methodNames.contains( method.getName() );
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/AbstractObjectProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/AbstractObjectProvider.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/AbstractObjectProvider.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/AbstractObjectProvider.java Sun Sep  4 07:12:22 2005
@@ -26,15 +26,24 @@
  */
 public abstract class AbstractObjectProvider implements ObjectProvider
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     protected Log log = LogFactory.getLog( getClass() );
 
-    public void setLog( Log log )
-    {
-        this.log = log;
-    }
+//----------------------------------------------------------------------------------------------------------------------
+// Getter/Setter Methods
+//----------------------------------------------------------------------------------------------------------------------
 
     public Log getLog()
     {
         return log;
     }
+
+    public void setLog( Log log )
+    {
+        this.log = log;
+    }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/BeanProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/BeanProvider.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/BeanProvider.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/BeanProvider.java Sun Sep  4 07:12:22 2005
@@ -26,13 +26,25 @@
  */
 public class BeanProvider extends AbstractObjectProvider
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final Class beanClass;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public BeanProvider( Class beanClass )
     {
         this.beanClass = beanClass;
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// ObjectProvider Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public Object getObject()
     {
         try
@@ -50,3 +62,4 @@
         }
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/BurlapProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/BurlapProvider.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/BurlapProvider.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/BurlapProvider.java Sun Sep  4 07:12:22 2005
@@ -29,15 +29,27 @@
  */
 public class BurlapProvider extends AbstractObjectProvider
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final Class serviceInterface;
     private final String url;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public BurlapProvider( Class serviceInterface, String url )
     {
         this.serviceInterface = serviceInterface;
         this.url = url;
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// ObjectProvider Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public Object getObject()
     {
         try
@@ -50,3 +62,4 @@
         }
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/CachedProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/CachedProvider.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/CachedProvider.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/CachedProvider.java Sun Sep  4 07:12:22 2005
@@ -25,18 +25,26 @@
  */
 public class CachedProvider<T> extends ProviderDecorator
 {
+
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final Object cacheKey = new Object();
     private Cache cache;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public CachedProvider( ObjectProvider inner )
     {
         super( inner );
     }
 
-    public void setCache( Cache cache )
-    {
-        this.cache = cache;
-    }
+//----------------------------------------------------------------------------------------------------------------------
+// ObjectProvider Implementation
+//----------------------------------------------------------------------------------------------------------------------
 
     public Object getObject()
     {
@@ -47,5 +55,14 @@
             cache.storeObject( cacheKey, object );
         }
         return object;
+    }
+
+//----------------------------------------------------------------------------------------------------------------------
+// Getter/Setter Methods
+//----------------------------------------------------------------------------------------------------------------------
+
+    public void setCache( Cache cache )
+    {
+        this.cache = cache;
     }
 }

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/ConstantProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/ConstantProvider.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/ConstantProvider.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/ConstantProvider.java Sun Sep  4 07:12:22 2005
@@ -24,15 +24,28 @@
  */
 public class ConstantProvider extends AbstractObjectProvider
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final Object constant;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public ConstantProvider( Object constant )
     {
         this.constant = constant;
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// ObjectProvider Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public Object getObject()
     {
         return constant;
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/HessianProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/HessianProvider.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/HessianProvider.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/HessianProvider.java Sun Sep  4 07:12:22 2005
@@ -29,15 +29,27 @@
  */
 public class HessianProvider extends AbstractObjectProvider
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final Class serviceInterface;
     private final String url;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public HessianProvider( Class serviceInterface, String url )
     {
         this.serviceInterface = serviceInterface;
         this.url = url;
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// ObjectProvider Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public Object getObject()
     {
         try
@@ -50,3 +62,4 @@
         }
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/JaxRpcProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/JaxRpcProvider.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/JaxRpcProvider.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/JaxRpcProvider.java Sun Sep  4 07:12:22 2005
@@ -33,6 +33,10 @@
  */
 public class JaxRpcProvider extends AbstractObjectProvider
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final Class serviceInterface;
     private String wsdlUrl;
     private String serviceNamespaceUri;
@@ -42,11 +46,19 @@
     private String portLocalPart;
     private String portPrefix;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public JaxRpcProvider( Class serviceInterface )
     {
         this.serviceInterface = serviceInterface;
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// ObjectProvider Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public Object getObject()
     {
         try
@@ -68,31 +80,13 @@
         }
     }
 
-    private QName getQName( String namespaceUri, String localPart, String prefix )
-    {
-        if( namespaceUri != null && localPart != null && prefix != null )
-        {
-            return new QName( namespaceUri, localPart, prefix );
-        }
-        else if( namespaceUri != null && localPart != null )
-        {
-            return new QName( namespaceUri, localPart );
-        }
-        else if( localPart != null )
-        {
-            return new QName( localPart );
-        }
-        return null;
-    }
+//----------------------------------------------------------------------------------------------------------------------
+// Getter/Setter Methods
+//----------------------------------------------------------------------------------------------------------------------
 
-    private QName getServiceQName()
-    {
-        return getQName( serviceNamespaceUri, serviceLocalPart, servicePrefix );
-    }
-
-    private QName getPortQName()
+    public void setPortLocalPart( String portLocalPart )
     {
-        return getQName( portNamespaceUri, portLocalPart, portPrefix );
+        this.portLocalPart = portLocalPart;
     }
 
     public void setPortNamespaceUri( String portNamespaceUri )
@@ -100,24 +94,19 @@
         this.portNamespaceUri = portNamespaceUri;
     }
 
-    public void setPortLocalPart( String portLocalPart )
-    {
-        this.portLocalPart = portLocalPart;
-    }
-
     public void setPortPrefix( String portPrefix )
     {
         this.portPrefix = portPrefix;
     }
 
-    public void setServiceNamespaceUri( String serviceNamespaceUri )
+    public void setServiceLocalPart( String serviceLocalPart )
     {
-        this.serviceNamespaceUri = serviceNamespaceUri;
+        this.serviceLocalPart = serviceLocalPart;
     }
 
-    public void setServiceLocalPart( String serviceLocalPart )
+    public void setServiceNamespaceUri( String serviceNamespaceUri )
     {
-        this.serviceLocalPart = serviceLocalPart;
+        this.serviceNamespaceUri = serviceNamespaceUri;
     }
 
     public void setServicePrefix( String servicePrefix )
@@ -129,4 +118,36 @@
     {
         this.wsdlUrl = wsdlUrl;
     }
+
+//----------------------------------------------------------------------------------------------------------------------
+// Other Methods
+//----------------------------------------------------------------------------------------------------------------------
+
+    private QName getPortQName()
+    {
+        return getQName( portNamespaceUri, portLocalPart, portPrefix );
+    }
+
+    private QName getQName( String namespaceUri, String localPart, String prefix )
+    {
+        if( namespaceUri != null && localPart != null && prefix != null )
+        {
+            return new QName( namespaceUri, localPart, prefix );
+        }
+        else if( namespaceUri != null && localPart != null )
+        {
+            return new QName( namespaceUri, localPart );
+        }
+        else if( localPart != null )
+        {
+            return new QName( localPart );
+        }
+        return null;
+    }
+
+    private QName getServiceQName()
+    {
+        return getQName( serviceNamespaceUri, serviceLocalPart, servicePrefix );
+    }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/NullProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/NullProvider.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/NullProvider.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/NullProvider.java Sun Sep  4 07:12:22 2005
@@ -24,8 +24,13 @@
  */
 public class NullProvider extends ConstantProvider
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public NullProvider()
     {
         super( null );
     }
 }
+

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/PooledProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/PooledProvider.java?rev=278595&r1=278594&r2=278595&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/PooledProvider.java (original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/PooledProvider.java Sun Sep  4 07:12:22 2005
@@ -30,20 +30,27 @@
  */
 public class PooledProvider extends ProviderDecorator implements CacheEvictionListener
 {
+//----------------------------------------------------------------------------------------------------------------------
+// Fields
+//----------------------------------------------------------------------------------------------------------------------
+
     private final Object cacheKey = new Object();
     private final GenericObjectPool pool;
     private Cache cache;
 
+//----------------------------------------------------------------------------------------------------------------------
+// Constructors
+//----------------------------------------------------------------------------------------------------------------------
+
     public PooledProvider( ObjectProvider inner )
     {
         super( inner );
         pool = new GenericObjectPool( new Factory() );
     }
 
-    public void setCache( Cache cache )
-    {
-        this.cache = cache;
-    }
+//----------------------------------------------------------------------------------------------------------------------
+// CacheEvictionListener Implementation
+//----------------------------------------------------------------------------------------------------------------------
 
     public void objectEvicted( CacheEvictionEvent e )
     {
@@ -58,6 +65,10 @@
         }
     }
 
+//----------------------------------------------------------------------------------------------------------------------
+// ObjectProvider Implementation
+//----------------------------------------------------------------------------------------------------------------------
+
     public Object getObject()
     {
         try
@@ -79,19 +90,22 @@
         }
     }
 
-    public void setMaxActive( int i )
-    {
-        pool.setMaxActive( i );
-    }
+//----------------------------------------------------------------------------------------------------------------------
+// Getter/Setter Methods
+//----------------------------------------------------------------------------------------------------------------------
 
-    public void setWhenExhaustedAction( byte b )
+    public void setCache( Cache cache )
     {
-        pool.setWhenExhaustedAction( b );
+        this.cache = cache;
     }
 
-    public void setMaxWait( long l )
+//----------------------------------------------------------------------------------------------------------------------
+// Other Methods
+//----------------------------------------------------------------------------------------------------------------------
+
+    public void setMaxActive( int i )
     {
-        pool.setMaxWait( l );
+        pool.setMaxActive( i );
     }
 
     public void setMaxIdle( int i )
@@ -99,14 +113,14 @@
         pool.setMaxIdle( i );
     }
 
-    public void setTestOnReturn( boolean b )
+    public void setMaxWait( long l )
     {
-        pool.setTestOnReturn( b );
+        pool.setMaxWait( l );
     }
 
-    public void setTestOnBorrow( boolean b )
+    public void setMinEvictableIdleTimeMillis( long l )
     {
-        pool.setTestOnBorrow( b );
+        pool.setMinEvictableIdleTimeMillis( l );
     }
 
     public void setMinIdle( int i )
@@ -114,19 +128,19 @@
         pool.setMinIdle( i );
     }
 
-    public void setTimeBetweenEvictionRunsMillis( long l )
+    public void setNumTestsPerEvictionRun( int i )
     {
-        pool.setTimeBetweenEvictionRunsMillis( l );
+        pool.setNumTestsPerEvictionRun( i );
     }
 
-    public void setNumTestsPerEvictionRun( int i )
+    public void setTestOnBorrow( boolean b )
     {
-        pool.setNumTestsPerEvictionRun( i );
+        pool.setTestOnBorrow( b );
     }
 
-    public void setMinEvictableIdleTimeMillis( long l )
+    public void setTestOnReturn( boolean b )
     {
-        pool.setMinEvictableIdleTimeMillis( l );
+        pool.setTestOnReturn( b );
     }
 
     public void setTestWhileIdle( boolean b )
@@ -134,6 +148,20 @@
         pool.setTestWhileIdle( b );
     }
 
+    public void setTimeBetweenEvictionRunsMillis( long l )
+    {
+        pool.setTimeBetweenEvictionRunsMillis( l );
+    }
+
+    public void setWhenExhaustedAction( byte b )
+    {
+        pool.setWhenExhaustedAction( b );
+    }
+
+//----------------------------------------------------------------------------------------------------------------------
+// Inner Classes
+//----------------------------------------------------------------------------------------------------------------------
+
     private class Factory extends BasePoolableObjectFactory
     {
         public Object makeObject() throws Exception
@@ -143,3 +171,4 @@
         }
     }
 }
+



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message