commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r631743 - in /commons/proper/proxy/trunk/src: main/java/org/apache/commons/proxy/ main/java/org/apache/commons/proxy/exception/ main/java/org/apache/commons/proxy/factory/cglib/ main/java/org/apache/commons/proxy/factory/javassist/ main/jav...
Date Wed, 27 Feb 2008 21:57:32 GMT
Author: jcarman
Date: Wed Feb 27 13:57:28 2008
New Revision: 631743

URL: http://svn.apache.org/viewvc?rev=631743&view=rev
Log:
Fixing eol-style

Modified:
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/exception/package.html   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/cglib/package.html   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/javassist/package.html   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/util/package.html   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/filter/package.html   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/AbstractLoggingInterceptor.java   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/CommonsLoggingInterceptor.java   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/JdkLoggingInterceptor.java   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/Slf4jInterceptor.java   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/package.html   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/DuckTypingInvoker.java   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/package.html   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/package.html   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/package.html   (contents, props changed)
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/package.html   (contents, props changed)
    commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/invoker/TestDuckTypingInvoker.java   (contents, props changed)
    commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/util/AbstractTestCase.java   (contents, props changed)

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/exception/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/exception/package.html?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/exception/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/exception/package.html Wed Feb 27 13:57:28 2008
@@ -1,23 +1,23 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<html>
-<body>
-<p>
-    This package contains the exception classes used by the primary API.
-</p>
-</body>
-</html>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<html>
+<body>
+<p>
+    This package contains the exception classes used by the primary API.
+</p>
+</body>
+</html>

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/exception/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/cglib/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/cglib/package.html?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/cglib/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/cglib/package.html Wed Feb 27 13:57:28 2008
@@ -1,24 +1,24 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<html>
-<body>
-<p>
-    This package contains the <a href="http://cglib.sourceforge.net/">CGLIB</a>-based
-    <a href="../../ProxyFactory.html">ProxyFactory</a> implementation.
-</p>
-</body>
-</html>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<html>
+<body>
+<p>
+    This package contains the <a href="http://cglib.sourceforge.net/">CGLIB</a>-based
+    <a href="../../ProxyFactory.html">ProxyFactory</a> implementation.
+</p>
+</body>
+</html>

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/cglib/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/javassist/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/javassist/package.html?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/javassist/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/javassist/package.html Wed Feb 27 13:57:28 2008
@@ -1,25 +1,25 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<html>
-<body>
-<p>
-    This package contains the <a href="http://www.jboss.org/products/javassist">Javassist</a>-based
-    <a href="../../ProxyFactory.html">ProxyFactory</a> implementation.
-</p>
-</body>
-</html>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<html>
+<body>
+<p>
+    This package contains the <a href="http://www.jboss.org/products/javassist">Javassist</a>-based
+    <a href="../../ProxyFactory.html">ProxyFactory</a> implementation.
+</p>
+</body>
+</html>

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/javassist/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/util/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/util/package.html?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/util/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/util/package.html Wed Feb 27 13:57:28 2008
@@ -1,25 +1,25 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<html>
-<body>
-<p>
-    This package contains some classes useful for writing your own <a href="../../ProxyFactory.html">ProxyFactory</a>
-    implementation.
-</p>
-</body>
-</html>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<html>
+<body>
+<p>
+    This package contains some classes useful for writing your own <a href="../../ProxyFactory.html">ProxyFactory</a>
+    implementation.
+</p>
+</body>
+</html>

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/factory/util/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/filter/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/filter/package.html?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/filter/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/filter/package.html Wed Feb 27 13:57:28 2008
@@ -1,24 +1,24 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<html>
-<body>
-<p>
-    This package contains some useful <a href="../MethodFilter.html">MethodFilter</a> implementations.
-</p>
-</body>
-</html>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<html>
+<body>
+<p>
+    This package contains some useful <a href="../MethodFilter.html">MethodFilter</a> implementations.
+</p>
+</body>
+</html>

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/filter/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/AbstractLoggingInterceptor.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/AbstractLoggingInterceptor.java?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/AbstractLoggingInterceptor.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/AbstractLoggingInterceptor.java Wed Feb 27 13:57:28 2008
@@ -1,159 +1,159 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.proxy.interceptor.logging;
-
-import org.apache.commons.proxy.Interceptor;
-import org.apache.commons.proxy.Invocation;
-import org.apache.commons.proxy.ProxyUtils;
-
-import java.lang.reflect.Method;
-
-/**
- * @auothor James Carman
- * @since 1.1
- */
-public abstract class AbstractLoggingInterceptor implements Interceptor
-{
-//**********************************************************************************************************************
-// Fields
-//**********************************************************************************************************************
-
-    private static final int BUFFER_SIZE = 100;
-
-//**********************************************************************************************************************
-// Abstract Methods
-//**********************************************************************************************************************
-
-    protected abstract boolean isLoggingEnabled();
-
-    protected abstract void logMessage( String message );
-
-    protected abstract void logMessage( String message, Throwable t );
-
-//**********************************************************************************************************************
-// Interceptor Implementation
-//**********************************************************************************************************************
-
-    public Object intercept( Invocation invocation ) throws Throwable
-    {
-        if( isLoggingEnabled() )
-        {
-            final Method method = invocation.getMethod();
-            entering(method, invocation.getArguments());
-            try
-            {
-                Object result = invocation.proceed();
-                exiting(method, result);
-                return result;
-            }
-            catch( Throwable t )
-            {
-                throwing(method, t);
-                throw t;
-            }
-        }
-        else
-        {
-            return invocation.proceed();
-        }
-    }
-
-//**********************************************************************************************************************
-// Other Methods
-//**********************************************************************************************************************
-
-    protected void entering( Method method, Object[] args )
-    {
-        StringBuffer buffer = new StringBuffer(BUFFER_SIZE);
-        buffer.append("BEGIN ");
-        buffer.append(method.getName());
-        buffer.append("(");
-        int count = args.length;
-        for( int i = 0; i < count; i++ )
-        {
-            Object arg = args[i];
-            if( i > 0 )
-            {
-                buffer.append(", ");
-            }
-            convert(buffer, arg);
-        }
-        buffer.append(")");
-        logMessage(buffer.toString());
-    }
-
-    protected void convert( StringBuffer buffer, Object input )
-    {
-        if( input == null )
-        {
-            buffer.append("<null>");
-            return;
-        }
-
-        // Primitive types, and non-object arrays
-        // use toString().  Less than ideal for int[], etc., but
-        // that's a lot of work for a rare case.
-        if( !( input instanceof Object[] ) )
-        {
-            buffer.append(input.toString());
-            return;
-        }
-        buffer.append("(");
-        buffer.append(ProxyUtils.getJavaClassName(input.getClass()));
-        buffer.append("){");
-        Object[] array = ( Object[] ) input;
-        int count = array.length;
-        for( int i = 0; i < count; i++ )
-        {
-            if( i > 0 )
-            {
-                buffer.append(", ");
-            }
-
-            // We use convert() again, because it could be a multi-dimensional array
-            // (god help us) where each element must be converted.
-            convert(buffer, array[i]);
-        }
-        buffer.append("}");
-    }
-
-    protected void exiting( Method method, Object result )
-    {
-        StringBuffer buffer = new StringBuffer(BUFFER_SIZE);
-        buffer.append("END ");
-        buffer.append(method.getName());
-        buffer.append("()");
-        if( !Void.TYPE.equals(method.getReturnType()) )
-        {
-            buffer.append(" [");
-            convert(buffer, result);
-            buffer.append("]");
-        }
-        logMessage(buffer.toString());
-    }
-
-    protected void throwing( Method method, Throwable t )
-    {
-        StringBuffer buffer = new StringBuffer(BUFFER_SIZE);
-        buffer.append("EXCEPTION ");
-        buffer.append(method);
-        buffer.append("() -- ");
-        buffer.append(t.getClass().getName());
-        logMessage(buffer.toString(), t);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.proxy.interceptor.logging;
+
+import org.apache.commons.proxy.Interceptor;
+import org.apache.commons.proxy.Invocation;
+import org.apache.commons.proxy.ProxyUtils;
+
+import java.lang.reflect.Method;
+
+/**
+ * @auothor James Carman
+ * @since 1.1
+ */
+public abstract class AbstractLoggingInterceptor implements Interceptor
+{
+//**********************************************************************************************************************
+// Fields
+//**********************************************************************************************************************
+
+    private static final int BUFFER_SIZE = 100;
+
+//**********************************************************************************************************************
+// Abstract Methods
+//**********************************************************************************************************************
+
+    protected abstract boolean isLoggingEnabled();
+
+    protected abstract void logMessage( String message );
+
+    protected abstract void logMessage( String message, Throwable t );
+
+//**********************************************************************************************************************
+// Interceptor Implementation
+//**********************************************************************************************************************
+
+    public Object intercept( Invocation invocation ) throws Throwable
+    {
+        if( isLoggingEnabled() )
+        {
+            final Method method = invocation.getMethod();
+            entering(method, invocation.getArguments());
+            try
+            {
+                Object result = invocation.proceed();
+                exiting(method, result);
+                return result;
+            }
+            catch( Throwable t )
+            {
+                throwing(method, t);
+                throw t;
+            }
+        }
+        else
+        {
+            return invocation.proceed();
+        }
+    }
+
+//**********************************************************************************************************************
+// Other Methods
+//**********************************************************************************************************************
+
+    protected void entering( Method method, Object[] args )
+    {
+        StringBuffer buffer = new StringBuffer(BUFFER_SIZE);
+        buffer.append("BEGIN ");
+        buffer.append(method.getName());
+        buffer.append("(");
+        int count = args.length;
+        for( int i = 0; i < count; i++ )
+        {
+            Object arg = args[i];
+            if( i > 0 )
+            {
+                buffer.append(", ");
+            }
+            convert(buffer, arg);
+        }
+        buffer.append(")");
+        logMessage(buffer.toString());
+    }
+
+    protected void convert( StringBuffer buffer, Object input )
+    {
+        if( input == null )
+        {
+            buffer.append("<null>");
+            return;
+        }
+
+        // Primitive types, and non-object arrays
+        // use toString().  Less than ideal for int[], etc., but
+        // that's a lot of work for a rare case.
+        if( !( input instanceof Object[] ) )
+        {
+            buffer.append(input.toString());
+            return;
+        }
+        buffer.append("(");
+        buffer.append(ProxyUtils.getJavaClassName(input.getClass()));
+        buffer.append("){");
+        Object[] array = ( Object[] ) input;
+        int count = array.length;
+        for( int i = 0; i < count; i++ )
+        {
+            if( i > 0 )
+            {
+                buffer.append(", ");
+            }
+
+            // We use convert() again, because it could be a multi-dimensional array
+            // (god help us) where each element must be converted.
+            convert(buffer, array[i]);
+        }
+        buffer.append("}");
+    }
+
+    protected void exiting( Method method, Object result )
+    {
+        StringBuffer buffer = new StringBuffer(BUFFER_SIZE);
+        buffer.append("END ");
+        buffer.append(method.getName());
+        buffer.append("()");
+        if( !Void.TYPE.equals(method.getReturnType()) )
+        {
+            buffer.append(" [");
+            convert(buffer, result);
+            buffer.append("]");
+        }
+        logMessage(buffer.toString());
+    }
+
+    protected void throwing( Method method, Throwable t )
+    {
+        StringBuffer buffer = new StringBuffer(BUFFER_SIZE);
+        buffer.append("EXCEPTION ");
+        buffer.append(method);
+        buffer.append("() -- ");
+        buffer.append(t.getClass().getName());
+        logMessage(buffer.toString(), t);
+    }
+}

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/AbstractLoggingInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/CommonsLoggingInterceptor.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/CommonsLoggingInterceptor.java?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/CommonsLoggingInterceptor.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/CommonsLoggingInterceptor.java Wed Feb 27 13:57:28 2008
@@ -1,75 +1,75 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.proxy.interceptor.logging;
-
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
-
-/**
- * An interceptor which logs method invocations using an <a href="http://commons.apache.org/logging">Apache Commons
- * Logging</a> {@link Log} object at the "trace" level.
- * 
- * @auothor James Carman
- * @since 1.1
- */
-public class CommonsLoggingInterceptor extends AbstractLoggingInterceptor
-{
-//**********************************************************************************************************************
-// Fields
-//**********************************************************************************************************************
-
-    private final String logName;
-
-//**********************************************************************************************************************
-// Constructors
-//**********************************************************************************************************************
-
-    public CommonsLoggingInterceptor( String logName )
-    {
-        this.logName = logName;
-    }
-
-    public CommonsLoggingInterceptor(Class clazz)
-    {
-        this(clazz.getName());
-    }
-
-//**********************************************************************************************************************
-// Other Methods
-//**********************************************************************************************************************
-
-    private Log getLog()
-    {
-        return LogFactory.getLog(logName);
-    }
-
-    protected boolean isLoggingEnabled()
-    {
-        return getLog().isTraceEnabled();
-    }
-
-    protected void logMessage( String message )
-    {
-        getLog().trace(message);
-    }
-
-    protected void logMessage( String message, Throwable t )
-    {
-        getLog().trace(message, t);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.proxy.interceptor.logging;
+
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.logging.Log;
+
+/**
+ * An interceptor which logs method invocations using an <a href="http://commons.apache.org/logging">Apache Commons
+ * Logging</a> {@link Log} object at the "trace" level.
+ * 
+ * @auothor James Carman
+ * @since 1.1
+ */
+public class CommonsLoggingInterceptor extends AbstractLoggingInterceptor
+{
+//**********************************************************************************************************************
+// Fields
+//**********************************************************************************************************************
+
+    private final String logName;
+
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
+    public CommonsLoggingInterceptor( String logName )
+    {
+        this.logName = logName;
+    }
+
+    public CommonsLoggingInterceptor(Class clazz)
+    {
+        this(clazz.getName());
+    }
+
+//**********************************************************************************************************************
+// Other Methods
+//**********************************************************************************************************************
+
+    private Log getLog()
+    {
+        return LogFactory.getLog(logName);
+    }
+
+    protected boolean isLoggingEnabled()
+    {
+        return getLog().isTraceEnabled();
+    }
+
+    protected void logMessage( String message )
+    {
+        getLog().trace(message);
+    }
+
+    protected void logMessage( String message, Throwable t )
+    {
+        getLog().trace(message, t);
+    }
+}

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/CommonsLoggingInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/JdkLoggingInterceptor.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/JdkLoggingInterceptor.java?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/JdkLoggingInterceptor.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/JdkLoggingInterceptor.java Wed Feb 27 13:57:28 2008
@@ -1,90 +1,90 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.proxy.interceptor.logging;
-
-import java.lang.reflect.Method;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * An interceptor which logs method invocations using a {@link Logger JDK logger} using the "finer" logging level.
- * 
- * @auothor James Carman
- * @since 1.1
- */
-public class JdkLoggingInterceptor extends AbstractLoggingInterceptor
-{
-//**********************************************************************************************************************
-// Fields
-//**********************************************************************************************************************
-
-    private final String loggerName;
-
-//**********************************************************************************************************************
-// Constructors
-//**********************************************************************************************************************
-
-    public JdkLoggingInterceptor( Class clazz )
-    {
-        this(clazz.getName());
-    }
-
-    public JdkLoggingInterceptor( String loggerName )
-    {
-        this.loggerName = loggerName;
-    }
-
-//**********************************************************************************************************************
-// Other Methods
-//**********************************************************************************************************************
-
-    private Logger getLogger()
-    {
-        return Logger.getLogger(loggerName);
-    }
-
-    protected void entering( Method method, Object[] args )
-    {
-        getLogger().entering(method.getDeclaringClass().getName(), method.getName(), args);
-    }
-
-    protected void exiting( Method method, Object result )
-    {
-        getLogger().exiting(method.getDeclaringClass().getName(), method.getName(), result);
-    }
-
-    protected boolean isLoggingEnabled()
-    {
-        return getLogger().isLoggable(Level.FINER);
-    }
-
-    protected void logMessage( String message )
-    {
-        // Do nothing!
-    }
-
-    protected void logMessage( String message, Throwable t )
-    {
-        // Do nothing!
-    }
-
-    protected void throwing( Method method, Throwable t )
-    {
-        getLogger().throwing(method.getDeclaringClass().getName(), method.getName(), t);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.proxy.interceptor.logging;
+
+import java.lang.reflect.Method;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * An interceptor which logs method invocations using a {@link Logger JDK logger} using the "finer" logging level.
+ * 
+ * @auothor James Carman
+ * @since 1.1
+ */
+public class JdkLoggingInterceptor extends AbstractLoggingInterceptor
+{
+//**********************************************************************************************************************
+// Fields
+//**********************************************************************************************************************
+
+    private final String loggerName;
+
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
+    public JdkLoggingInterceptor( Class clazz )
+    {
+        this(clazz.getName());
+    }
+
+    public JdkLoggingInterceptor( String loggerName )
+    {
+        this.loggerName = loggerName;
+    }
+
+//**********************************************************************************************************************
+// Other Methods
+//**********************************************************************************************************************
+
+    private Logger getLogger()
+    {
+        return Logger.getLogger(loggerName);
+    }
+
+    protected void entering( Method method, Object[] args )
+    {
+        getLogger().entering(method.getDeclaringClass().getName(), method.getName(), args);
+    }
+
+    protected void exiting( Method method, Object result )
+    {
+        getLogger().exiting(method.getDeclaringClass().getName(), method.getName(), result);
+    }
+
+    protected boolean isLoggingEnabled()
+    {
+        return getLogger().isLoggable(Level.FINER);
+    }
+
+    protected void logMessage( String message )
+    {
+        // Do nothing!
+    }
+
+    protected void logMessage( String message, Throwable t )
+    {
+        // Do nothing!
+    }
+
+    protected void throwing( Method method, Throwable t )
+    {
+        getLogger().throwing(method.getDeclaringClass().getName(), method.getName(), t);
+    }
+}

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/JdkLoggingInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/Slf4jInterceptor.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/Slf4jInterceptor.java?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/Slf4jInterceptor.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/Slf4jInterceptor.java Wed Feb 27 13:57:28 2008
@@ -1,75 +1,75 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.proxy.interceptor.logging;
-
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-
-/**
- * An interceptor which logs method invocations using an <a href="http://www.slf4j.org/">SLF4J</a> {@link Logger} at the
- * "trace" logging level.
- * 
- * @auothor James Carman
- * @since 1.1
- */
-public class Slf4jInterceptor extends AbstractLoggingInterceptor
-{
-//**********************************************************************************************************************
-// Fields
-//**********************************************************************************************************************
-
-    private final String loggerName;
-
-//**********************************************************************************************************************
-// Constructors
-//**********************************************************************************************************************
-
-    public Slf4jInterceptor( Class clazz )
-    {
-        this(clazz.getName());
-    }
-
-    public Slf4jInterceptor( String loggerName )
-    {
-        this.loggerName = loggerName;
-    }
-
-//**********************************************************************************************************************
-// Other Methods
-//**********************************************************************************************************************
-
-    private Logger getLogger()
-    {
-        return LoggerFactory.getLogger(loggerName);
-    }
-
-    protected boolean isLoggingEnabled()
-    {
-        return getLogger().isTraceEnabled();
-    }
-
-    protected void logMessage( String message )
-    {
-        getLogger().debug(message);
-    }
-
-    protected void logMessage( String message, Throwable t )
-    {
-        getLogger().debug(message, t);
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.proxy.interceptor.logging;
+
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+
+/**
+ * An interceptor which logs method invocations using an <a href="http://www.slf4j.org/">SLF4J</a> {@link Logger} at the
+ * "trace" logging level.
+ * 
+ * @auothor James Carman
+ * @since 1.1
+ */
+public class Slf4jInterceptor extends AbstractLoggingInterceptor
+{
+//**********************************************************************************************************************
+// Fields
+//**********************************************************************************************************************
+
+    private final String loggerName;
+
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
+    public Slf4jInterceptor( Class clazz )
+    {
+        this(clazz.getName());
+    }
+
+    public Slf4jInterceptor( String loggerName )
+    {
+        this.loggerName = loggerName;
+    }
+
+//**********************************************************************************************************************
+// Other Methods
+//**********************************************************************************************************************
+
+    private Logger getLogger()
+    {
+        return LoggerFactory.getLogger(loggerName);
+    }
+
+    protected boolean isLoggingEnabled()
+    {
+        return getLogger().isTraceEnabled();
+    }
+
+    protected void logMessage( String message )
+    {
+        getLogger().debug(message);
+    }
+
+    protected void logMessage( String message, Throwable t )
+    {
+        getLogger().debug(message, t);
+    }
+}

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/logging/Slf4jInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/package.html?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/package.html Wed Feb 27 13:57:28 2008
@@ -1,24 +1,24 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<html>
-<body>
-<p>
-    This package contains some useful <a href="../Interceptor.html">Interceptor</a> implementations.
-</p>
-</body>
-</html>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<html>
+<body>
+<p>
+    This package contains some useful <a href="../Interceptor.html">Interceptor</a> implementations.
+</p>
+</body>
+</html>

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/interceptor/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/DuckTypingInvoker.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/DuckTypingInvoker.java?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/DuckTypingInvoker.java (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/DuckTypingInvoker.java Wed Feb 27 13:57:28 2008
@@ -1,94 +1,94 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.proxy.invoker;
-
-import org.apache.commons.proxy.Invoker;
-import org.apache.commons.proxy.ObjectProvider;
-
-import java.lang.reflect.Method;
-
-/**
- * An invoker which supports <a href="http://en.wikipedia.org/wiki/Duck_typing">&quot;duck typing&quot;</a>, meaning
- * that it finds a matching method on the object returned from the target provider and invokes it.  This class is
- * useful for adapting an existing class to an interface it does not implement.
- * <p>
- * <b>Example:</b>
- * </p>
- * <p>
- * <pre>
- * public class LegacyDuck // Does not implement interface!
- * {
- *   public void quack()
- *   {
- *     // Quacking logic...
- *   }
- * }
- * <p/>
- * public interface Duck
- * {
- *   public void quack();
- * }
- * <p/>
- * ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck()); // Always returns a "legacy" duck
- * DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
- * Duck duck = ( Duck )proxyFactory.createInvokerProxy( invoker, new Class[] { Duck.class } );
- * </pre>
- * </p>
- */
-public class DuckTypingInvoker implements Invoker
-{
-//**********************************************************************************************************************
-// Fields
-//**********************************************************************************************************************
-
-    private final ObjectProvider targetProvider;
-
-//**********************************************************************************************************************
-// Constructors
-//**********************************************************************************************************************
-
-    public DuckTypingInvoker( final ObjectProvider targetProvider )
-    {
-        this.targetProvider = targetProvider;
-    }
-
-//**********************************************************************************************************************
-// Invoker Implementation
-//**********************************************************************************************************************
-
-    public Object invoke( final Object proxy, final Method method, final Object[] arguments ) throws Throwable
-    {
-        final Object target = targetProvider.getObject();
-        final Class targetClass = target.getClass();
-        try
-        {
-            final Method targetMethod = targetClass.getMethod(method.getName(), method.getParameterTypes());
-            if( method.getReturnType().isAssignableFrom(targetMethod.getReturnType()) )
-            {
-                return targetMethod.invoke(target, arguments);
-            }
-            throw new UnsupportedOperationException(
-                    "Target type " + targetClass.getName() + " method has incompatible return type.");
-        }
-        catch( NoSuchMethodException e )
-        {
-            throw new UnsupportedOperationException(
-                    "Target type " + targetClass.getName() + " does not have a method matching " + method + ".");
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.proxy.invoker;
+
+import org.apache.commons.proxy.Invoker;
+import org.apache.commons.proxy.ObjectProvider;
+
+import java.lang.reflect.Method;
+
+/**
+ * An invoker which supports <a href="http://en.wikipedia.org/wiki/Duck_typing">&quot;duck typing&quot;</a>, meaning
+ * that it finds a matching method on the object returned from the target provider and invokes it.  This class is
+ * useful for adapting an existing class to an interface it does not implement.
+ * <p>
+ * <b>Example:</b>
+ * </p>
+ * <p>
+ * <pre>
+ * public class LegacyDuck // Does not implement interface!
+ * {
+ *   public void quack()
+ *   {
+ *     // Quacking logic...
+ *   }
+ * }
+ * <p/>
+ * public interface Duck
+ * {
+ *   public void quack();
+ * }
+ * <p/>
+ * ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck()); // Always returns a "legacy" duck
+ * DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
+ * Duck duck = ( Duck )proxyFactory.createInvokerProxy( invoker, new Class[] { Duck.class } );
+ * </pre>
+ * </p>
+ */
+public class DuckTypingInvoker implements Invoker
+{
+//**********************************************************************************************************************
+// Fields
+//**********************************************************************************************************************
+
+    private final ObjectProvider targetProvider;
+
+//**********************************************************************************************************************
+// Constructors
+//**********************************************************************************************************************
+
+    public DuckTypingInvoker( final ObjectProvider targetProvider )
+    {
+        this.targetProvider = targetProvider;
+    }
+
+//**********************************************************************************************************************
+// Invoker Implementation
+//**********************************************************************************************************************
+
+    public Object invoke( final Object proxy, final Method method, final Object[] arguments ) throws Throwable
+    {
+        final Object target = targetProvider.getObject();
+        final Class targetClass = target.getClass();
+        try
+        {
+            final Method targetMethod = targetClass.getMethod(method.getName(), method.getParameterTypes());
+            if( method.getReturnType().isAssignableFrom(targetMethod.getReturnType()) )
+            {
+                return targetMethod.invoke(target, arguments);
+            }
+            throw new UnsupportedOperationException(
+                    "Target type " + targetClass.getName() + " method has incompatible return type.");
+        }
+        catch( NoSuchMethodException e )
+        {
+            throw new UnsupportedOperationException(
+                    "Target type " + targetClass.getName() + " does not have a method matching " + method + ".");
+        }
+    }
+}

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/DuckTypingInvoker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/package.html?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/package.html Wed Feb 27 13:57:28 2008
@@ -1,24 +1,24 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<html>
-<body>
-<p>
-    This package contains some useful <a href="../Invoker.html">Invoker</a> implementations.
-</p>
-</body>
-</html>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<html>
+<body>
+<p>
+    This package contains some useful <a href="../Invoker.html">Invoker</a> implementations.
+</p>
+</body>
+</html>

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/invoker/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/package.html?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/package.html Wed Feb 27 13:57:28 2008
@@ -1,22 +1,22 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<body>
-<p>
-    This package contains the primary API.
-</p>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<body>
+<p>
+    This package contains the primary API.
+</p>
 </body>

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/package.html?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/package.html Wed Feb 27 13:57:28 2008
@@ -1,24 +1,24 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<html>
-<body>
-<p>
-    This package contains some general-use <a href="../ObjectProvider.html">ObjectProvider</a> implementations.
-</p>
-</body>
-</html>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<html>
+<body>
+<p>
+    This package contains some general-use <a href="../ObjectProvider.html">ObjectProvider</a> implementations.
+</p>
+</body>
+</html>

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/package.html
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/package.html?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/package.html (original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/package.html Wed Feb 27 13:57:28 2008
@@ -1,25 +1,25 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<html>
-<body>
-<p>
-    This package contains some useful <a href="../../ObjectProvider.html">ObjectProvider</a> implementations for use
-    in remoting situations (EJB, RMI, Burlap, Hessian, JAX-RPC, etc).
-</p>
-</body>
-</html>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<html>
+<body>
+<p>
+    This package contains some useful <a href="../../ObjectProvider.html">ObjectProvider</a> implementations for use
+    in remoting situations (EJB, RMI, Burlap, Hessian, JAX-RPC, etc).
+</p>
+</body>
+</html>

Propchange: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/remoting/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/invoker/TestDuckTypingInvoker.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/invoker/TestDuckTypingInvoker.java?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/invoker/TestDuckTypingInvoker.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/invoker/TestDuckTypingInvoker.java Wed Feb 27 13:57:28 2008
@@ -1,146 +1,146 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.proxy.invoker;
-
-import org.apache.commons.proxy.ObjectProvider;
-import org.apache.commons.proxy.ProxyFactory;
-import org.apache.commons.proxy.provider.ConstantProvider;
-import org.apache.commons.proxy.util.AbstractTestCase;
-
-import java.io.Serializable;
-
-/**
- *
- */
-public class TestDuckTypingInvoker extends AbstractTestCase
-{
-//**********************************************************************************************************************
-// Other Methods
-//**********************************************************************************************************************
-
-    public void testExactSignatureMatch()
-    {
-        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
-        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
-        final Duck duck = ( Duck ) new ProxyFactory().createInvokerProxy(invoker, new Class[] {Duck.class});
-        assertEquals("Quack!", duck.sayQuack());
-    }
-
-    public void testMismatchingParameterType()
-    {
-        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
-        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
-        final ParameterizedDuck parameterizedDuck = ( ParameterizedDuck ) new ProxyFactory()
-                .createInvokerProxy(invoker, new Class[] {ParameterizedDuck.class});
-        try
-        {
-            parameterizedDuck.sayQuack("Elmer");
-            fail("No matching method should be found.");
-        }
-        catch( UnsupportedOperationException e )
-        {
-            // Do nothing, expected behavior!
-        }
-    }
-
-    public void testMismatchingReturnType()
-    {
-        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
-        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
-        final VoidReturnDuck voidDuck = ( VoidReturnDuck ) new ProxyFactory().createInvokerProxy(invoker, new Class[] {
-                VoidReturnDuck.class});
-        try
-        {
-            voidDuck.sayQuack();
-            fail("No matching method should be found.");
-        }
-        catch( UnsupportedOperationException e )
-        {
-            // Do nothing, expected behavior!
-        }
-    }
-
-    public void testNoMatchingMethod()
-    {
-        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
-        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
-        final Goose goose = ( Goose ) new ProxyFactory().createInvokerProxy(invoker, new Class[] {Goose.class});
-        try
-        {
-            goose.sayHonk();
-            fail("No matching method should be found.");
-        }
-        catch( UnsupportedOperationException e )
-        {
-            // Do nothing, expected behavior!
-        }
-    }
-
-    public void testSerialization()
-    {
-        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
-        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
-        assertSerializable(invoker);
-    }
-
-    public void testTargetHasCompatibleReturnType()
-    {
-        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
-        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
-        final SerializableDuck duck = ( SerializableDuck ) new ProxyFactory().createInvokerProxy(invoker, new Class[] {
-                SerializableDuck.class});
-        assertEquals("Quack!", duck.sayQuack());
-    }
-
-//**********************************************************************************************************************
-// Inner Classes
-//**********************************************************************************************************************
-
-    public interface Duck
-    {
-        public String sayQuack();
-    }
-
-    public interface Goose
-    {
-        public void sayHonk();
-    }
-
-    public static class LegacyDuck implements Serializable
-    {
-        public String sayQuack()
-        {
-            return "Quack!";
-        }
-    }
-
-    public interface ParameterizedDuck
-    {
-        public String sayQuack( String recipient );
-    }
-
-    public interface SerializableDuck
-    {
-        public Serializable sayQuack();
-    }
-
-    public interface VoidReturnDuck
-    {
-        public void sayQuack();
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.proxy.invoker;
+
+import org.apache.commons.proxy.ObjectProvider;
+import org.apache.commons.proxy.ProxyFactory;
+import org.apache.commons.proxy.provider.ConstantProvider;
+import org.apache.commons.proxy.util.AbstractTestCase;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public class TestDuckTypingInvoker extends AbstractTestCase
+{
+//**********************************************************************************************************************
+// Other Methods
+//**********************************************************************************************************************
+
+    public void testExactSignatureMatch()
+    {
+        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
+        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
+        final Duck duck = ( Duck ) new ProxyFactory().createInvokerProxy(invoker, new Class[] {Duck.class});
+        assertEquals("Quack!", duck.sayQuack());
+    }
+
+    public void testMismatchingParameterType()
+    {
+        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
+        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
+        final ParameterizedDuck parameterizedDuck = ( ParameterizedDuck ) new ProxyFactory()
+                .createInvokerProxy(invoker, new Class[] {ParameterizedDuck.class});
+        try
+        {
+            parameterizedDuck.sayQuack("Elmer");
+            fail("No matching method should be found.");
+        }
+        catch( UnsupportedOperationException e )
+        {
+            // Do nothing, expected behavior!
+        }
+    }
+
+    public void testMismatchingReturnType()
+    {
+        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
+        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
+        final VoidReturnDuck voidDuck = ( VoidReturnDuck ) new ProxyFactory().createInvokerProxy(invoker, new Class[] {
+                VoidReturnDuck.class});
+        try
+        {
+            voidDuck.sayQuack();
+            fail("No matching method should be found.");
+        }
+        catch( UnsupportedOperationException e )
+        {
+            // Do nothing, expected behavior!
+        }
+    }
+
+    public void testNoMatchingMethod()
+    {
+        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
+        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
+        final Goose goose = ( Goose ) new ProxyFactory().createInvokerProxy(invoker, new Class[] {Goose.class});
+        try
+        {
+            goose.sayHonk();
+            fail("No matching method should be found.");
+        }
+        catch( UnsupportedOperationException e )
+        {
+            // Do nothing, expected behavior!
+        }
+    }
+
+    public void testSerialization()
+    {
+        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
+        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
+        assertSerializable(invoker);
+    }
+
+    public void testTargetHasCompatibleReturnType()
+    {
+        final ObjectProvider targetProvider = new ConstantProvider(new LegacyDuck());
+        final DuckTypingInvoker invoker = new DuckTypingInvoker(targetProvider);
+        final SerializableDuck duck = ( SerializableDuck ) new ProxyFactory().createInvokerProxy(invoker, new Class[] {
+                SerializableDuck.class});
+        assertEquals("Quack!", duck.sayQuack());
+    }
+
+//**********************************************************************************************************************
+// Inner Classes
+//**********************************************************************************************************************
+
+    public interface Duck
+    {
+        public String sayQuack();
+    }
+
+    public interface Goose
+    {
+        public void sayHonk();
+    }
+
+    public static class LegacyDuck implements Serializable
+    {
+        public String sayQuack()
+        {
+            return "Quack!";
+        }
+    }
+
+    public interface ParameterizedDuck
+    {
+        public String sayQuack( String recipient );
+    }
+
+    public interface SerializableDuck
+    {
+        public Serializable sayQuack();
+    }
+
+    public interface VoidReturnDuck
+    {
+        public void sayQuack();
+    }
+}

Propchange: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/invoker/TestDuckTypingInvoker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/util/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/util/AbstractTestCase.java?rev=631743&r1=631742&r2=631743&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/util/AbstractTestCase.java (original)
+++ commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/util/AbstractTestCase.java Wed Feb 27 13:57:28 2008
@@ -1,23 +1,23 @@
-package org.apache.commons.proxy.util;
-
-import junit.framework.TestCase;
-import org.apache.commons.lang.SerializationUtils;
-
-import java.io.Serializable;
-
-/**
- * @auothor James Carman
- * @since 1.1
- */
-public abstract class AbstractTestCase extends TestCase
-{
-//**********************************************************************************************************************
-// Other Methods
-//**********************************************************************************************************************
-
-    protected void assertSerializable( Object o )
-    {
-        assertTrue(o instanceof Serializable);
-        SerializationUtils.clone(( Serializable ) o);
-    }
-}
+package org.apache.commons.proxy.util;
+
+import junit.framework.TestCase;
+import org.apache.commons.lang.SerializationUtils;
+
+import java.io.Serializable;
+
+/**
+ * @auothor James Carman
+ * @since 1.1
+ */
+public abstract class AbstractTestCase extends TestCase
+{
+//**********************************************************************************************************************
+// Other Methods
+//**********************************************************************************************************************
+
+    protected void assertSerializable( Object o )
+    {
+        assertTrue(o instanceof Serializable);
+        SerializationUtils.clone(( Serializable ) o);
+    }
+}

Propchange: commons/proper/proxy/trunk/src/test/java/org/apache/commons/proxy/util/AbstractTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message