commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r278592 - in /jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy: ./ factory/cglib/ factory/javassist/ factory/reflect/ factory/util/ handler/ interceptor/ provider/
Date Sun, 04 Sep 2005 13:39:15 GMT
Author: jcarman
Date: Sun Sep  4 06:39:08 2005
New Revision: 278592

URL: http://svn.apache.org/viewcvs?rev=278592&view=rev
Log:
Reformatting 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/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/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/handler/NullInvocationHandler.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/provider/SessionBeanProvider.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=278592&r1=278591&r2=278592&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 06:39:08 2005
@@ -25,9 +25,8 @@
 public interface ObjectProvider
 {
     /**
-     * Returns an object.  Implementing classes should throw a
-     * {@link org.apache.commons.proxy.exception.ObjectProviderException} if any problems
arise while
-     * constructing/finding the object.
+     * Returns an object.  Implementing classes should throw a {@link org.apache.commons.proxy.exception.ObjectProviderException}
+     * if any problems arise while constructing/finding the object.
      *
      * @return the object on which the method should be called
      */

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=278592&r1=278591&r2=278592&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 06:39:08 2005
@@ -25,8 +25,8 @@
 import org.apache.commons.proxy.factory.util.AbstractProxyFactory;
 
 import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Method;
 import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
 
 /**
  * A <a href="http://cglib.sourceforge.net/">CGLIB</a>-based {@link org.apache.commons.proxy.ProxyFactory}
@@ -81,6 +81,7 @@
             return original.invoke( object, method, objects );
         }
     }
+
     private class InterceptorBridge implements net.sf.cglib.proxy.MethodInterceptor
     {
         private final MethodInterceptor inner;

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=278592&r1=278591&r2=278592&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 06:39:08 2005
@@ -36,11 +36,10 @@
 public abstract class JavassistMethodInvocation implements MethodInvocation
 {
     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;

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=278592&r1=278591&r2=278592&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 06:39:08 2005
@@ -27,8 +27,8 @@
 import org.apache.commons.proxy.factory.util.AbstractProxyFactory;
 import org.apache.commons.proxy.factory.util.ProxyClassCache;
 
-import java.lang.reflect.Method;
 import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
 
 /**
  * A <a href="http://www.jboss.org/products/javassist">Javassist</a>-based {@link
org.apache.commons.proxy.ProxyFactory}
@@ -43,7 +43,8 @@
             new DelegatingProxyClassGenerator() );
     private static final ProxyClassCache interceptingProxyClassCache = new ProxyClassCache(
             new InterceptingProxyClassGenerator() );
-    private static final ProxyClassCache invocationHandlerProxyClassCache = new ProxyClassCache(
new InvocationHandlerProxyClassGenerator() );
+    private static final ProxyClassCache invocationHandlerProxyClassCache = new ProxyClassCache(
+            new InvocationHandlerProxyClassGenerator() );
 
     public Object createInterceptingProxy( ClassLoader classLoader, Object target, MethodInterceptor
interceptor,
                                            Class... proxyInterfaces )
@@ -81,10 +82,10 @@
     {
         try
         {
-
             final Class clazz = invocationHandlerProxyClassCache.getProxyClass( classLoader,
proxyInterfaces );
             final Method[] methods = AbstractProxyClassGenerator.getImplementationMethods(
proxyInterfaces );
-            return clazz.getConstructor( Method[].class, InvocationHandler.class ).newInstance(
methods, invocationHandler );
+            return clazz.getConstructor( Method[].class, InvocationHandler.class )
+                    .newInstance( methods, invocationHandler );
         }
         catch( Exception e )
         {
@@ -116,7 +117,8 @@
                                                           methods[i].getName(),
                                                           JavassistUtils.resolve( methods[i].getParameterTypes()
),
                                                           proxyClass );
-                    final String body = "{\n\t return ( $r ) invocationHandler.invoke( this,
methods[" + i + "], $args );\n }";
+                    final String body = "{\n\t return ( $r ) invocationHandler.invoke( this,
methods[" + i +
+                                        "], $args );\n }";
                     method.setBody( body );
                     proxyClass.addMethod( 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=278592&r1=278591&r2=278592&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 06:39:08 2005
@@ -20,8 +20,8 @@
 import org.apache.commons.proxy.ObjectProvider;
 import org.apache.commons.proxy.factory.util.AbstractProxyFactory;
 
-import java.lang.reflect.Proxy;
 import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Proxy;
 
 /**
  * A JDK {@link java.lang.reflect.Proxy Proxy}-based {@link org.apache.commons.proxy.ProxyFactory}
implementation.

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=278592&r1=278591&r2=278592&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 06:39:08 2005
@@ -31,10 +31,10 @@
 public abstract class AbstractProxyClassGenerator implements ProxyClassGenerator
 {
     /**
-     * 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 encountered
-     * first will be returned in the result.
+     * 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
+     * encountered first will be returned in the result.
+     *
      * @param proxyInterfaces the interfaces the proxy class must implement
      * @return all methods that the proxy class must implement
      */

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=278592&r1=278591&r2=278592&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 06:39:08 2005
@@ -17,7 +17,6 @@
 package org.apache.commons.proxy.factory.util;
 
 import org.aopalliance.intercept.MethodInterceptor;
-import org.aopalliance.intercept.MethodInvocation;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.commons.proxy.ObjectProvider;
@@ -45,7 +44,8 @@
         this.log = log;
     }
 
-    public final Object createInterceptingProxy( Object target, MethodInterceptor interceptor,
Class... proxyInterfaces )
+    public final Object createInterceptingProxy( Object target, MethodInterceptor interceptor,
+                                                 Class... proxyInterfaces )
     {
         return createInterceptingProxy( Thread.currentThread().getContextClassLoader(), target,
interceptor,
                                         proxyInterfaces );
@@ -58,6 +58,7 @@
 
     public final Object createInvocationHandlerProxy( InvocationHandler invocationHandler,
Class... proxyInterfaces )
     {
-        return createInvocationHandlerProxy( Thread.currentThread().getContextClassLoader(),
invocationHandler, proxyInterfaces );
+        return createInvocationHandlerProxy( Thread.currentThread().getContextClassLoader(),
invocationHandler,
+                                             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=278592&r1=278591&r2=278592&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 06:39:08 2005
@@ -20,8 +20,8 @@
 import java.lang.reflect.Method;
 
 /**
- * An {@link InvocationHandler} implementation which merely returns null for all method invocations.
 This class
- * is useful for scenarios where the "null object" design pattern is needed.
+ * An {@link InvocationHandler} implementation which merely returns null for all method invocations.
 This class is
+ * useful for scenarios where the "null object" design pattern is needed.
  *
  * @author James Carman
  * @version 1.0

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=278592&r1=278591&r2=278592&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 06:39:08 2005
@@ -38,7 +38,7 @@
     }
 
     public ObjectProvider createProxyProvider( ProxyFactory proxyFactory, ClassLoader classLoader,
Object terminus,
-                                                 Class... proxyInterfaces )
+                                               Class... proxyInterfaces )
     {
         if( proxyInterfaces.length == 0 )
         {

Modified: jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/SessionBeanProvider.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/SessionBeanProvider.java?rev=278592&r1=278591&r2=278592&view=diff
==============================================================================
--- jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/SessionBeanProvider.java
(original)
+++ jakarta/commons/sandbox/proxy/trunk/src/java/org/apache/commons/proxy/provider/SessionBeanProvider.java
Sun Sep  4 06:39:08 2005
@@ -18,15 +18,15 @@
 
 import org.apache.commons.proxy.exception.ObjectProviderException;
 
-import javax.rmi.PortableRemoteObject;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import java.lang.reflect.Method;
+import javax.rmi.PortableRemoteObject;
 import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
 
 /**
- * Provides a reference to a session bean by looking up the home object and calling (via
reflection)
- * the no-argument create() method.  This will work for both local and remote session beans.
+ * Provides a reference to a session bean by looking up the home object and calling (via
reflection) the no-argument
+ * create() method.  This will work for both local and remote session beans.
  *
  * @author James Carman
  * @version 1.0



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