Skip to content
Permalink
Browse files
renaming packages
  • Loading branch information
jwcarman committed Jul 17, 2010
1 parent 5e59b11 commit 9b5866e50d495bf6c3fd6378092e9581b6eea848
Show file tree
Hide file tree
Showing 76 changed files with 416 additions and 361 deletions.
@@ -14,6 +14,7 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<html>
<head>
<title>Proposal for Proxy Package</title>
@@ -15,21 +15,21 @@
* limitations under the License.
*/

package org.apache.commons.proxy.cglib;
package org.apache.commons.proxy2.cglib;

import net.sf.cglib.proxy.Callback;
import net.sf.cglib.proxy.CallbackFilter;
import net.sf.cglib.proxy.Dispatcher;
import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;
import org.apache.commons.proxy.Interceptor;
import org.apache.commons.proxy.Invocation;
import org.apache.commons.proxy.Invoker;
import org.apache.commons.proxy.ObjectProvider;
import org.apache.commons.proxy.ProxyFactory;
import org.apache.commons.proxy.ProxyUtils;
import org.apache.commons.proxy.impl.AbstractSubclassingProxyFactory;
import org.apache.commons.proxy2.Interceptor;
import org.apache.commons.proxy2.Invocation;
import org.apache.commons.proxy2.Invoker;
import org.apache.commons.proxy2.ObjectProvider;
import org.apache.commons.proxy2.ProxyFactory;
import org.apache.commons.proxy2.ProxyUtils;
import org.apache.commons.proxy2.impl.AbstractSubclassingProxyFactory;

import java.io.Serializable;
import java.lang.reflect.Method;
@@ -1 +1,17 @@
org.apache.commons.proxy.cglib.CglibProxyFactory
#
# 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.
#
org.apache.commons.proxy2.cglib.CglibProxyFactory
@@ -15,9 +15,9 @@
* limitations under the License.
*/

package org.apache.commons.proxy.cglib;
package org.apache.commons.proxy2.cglib;

import org.apache.commons.proxy.AbstractSubclassingProxyFactoryTestCase;
import org.apache.commons.proxy2.AbstractSubclassingProxyFactoryTestCase;

public class TestCglibProxyFactory extends AbstractSubclassingProxyFactoryTestCase
{
@@ -1,4 +1,5 @@
<?xml version="1.0"?>

<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
@@ -19,7 +20,7 @@
"-//Puppy Crawl//DTD Check Configuration 1.1//EN"
"http://www.puppycrawl.com/dtds/configuration_1_1.dtd">

<!-- commons proxy customization of default Checkstyle behavior -->
<!-- commons proxy2 customization of default Checkstyle behavior -->
<module name="Checker">
<property name="localeLanguage" value="en"/>

@@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.commons.proxy;
package org.apache.commons.proxy2;

import java.io.Serializable;

@@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.commons.proxy;
package org.apache.commons.proxy2;

import java.lang.reflect.Method;

@@ -47,9 +47,9 @@
public Method getMethod();

/**
* Returns the proxy object on which this invocation was invoked.
* Returns the proxy2 object on which this invocation was invoked.
*
* @return the proxy object on which this invocation was invoked
* @return the proxy2 object on which this invocation was invoked
*/
public Object getProxy();

@@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.commons.proxy;
package org.apache.commons.proxy2;

import java.io.Serializable;
import java.lang.reflect.Method;
@@ -33,10 +33,10 @@ public interface Invoker extends Serializable
//**********************************************************************************************************************

/**
* "Invokes" the method. Implementation should throw a {@link org.apache.commons.proxy.exception.InvokerException}
* "Invokes" the method. Implementation should throw a {@link org.apache.commons.proxy2.exception.InvokerException}
* if problems arise while trying to invoke the method.
*
* @param proxy the proxy object
* @param proxy the proxy2 object
* @param method the method being invoked
* @param arguments the arguments
* @return the return value
@@ -15,10 +15,10 @@
* limitations under the License.
*/

package org.apache.commons.proxy;
package org.apache.commons.proxy2;

/**
* Provides an object to a delegating proxy.
* Provides an object to a delegating proxy2.
*
* @author James Carman
* @since 1.0
@@ -31,7 +31,7 @@

/**
* Returns an object. Implementing classes should throw a
* {@link org.apache.commons.proxy.exception.ObjectProviderException} if any problems arise while
* {@link org.apache.commons.proxy2.exception.ObjectProviderException} if any problems arise while
* constructing/finding the object.
*
* @return the object on which the method should be called
@@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.commons.proxy;
package org.apache.commons.proxy2;

/**
* ProxyFactory interface.
@@ -28,38 +28,38 @@
//**********************************************************************************************************************

/**
* Creates a proxy which delegates to the object provided by <code>delegateProvider</code>.
* Creates a proxy2 which delegates to the object provided by <code>delegateProvider</code>.
*
* @param classLoader the class loader to use when generating the proxy
* @param classLoader the class loader to use when generating the proxy2
* @param delegateProvider the delegate provider
* @param proxyClass the class/interface that the proxy should implement
* @return a proxy which delegates to the object provided by the target <code>delegateProvider>
* @param proxyClass the class/interface that the proxy2 should implement
* @return a proxy2 which delegates to the object provided by the target <code>delegateProvider>
*/
public <T> T createDelegatorProxy( ClassLoader classLoader, ObjectProvider<T> delegateProvider,
Class<T> proxyClass );

/**
* Creates a proxy which passes through a {@link Interceptor interceptor} before eventually reaching the
* <code>target</code> object. The proxy will be generated using the current thread's "context class loader."
* Creates a proxy2 which passes through a {@link Interceptor interceptor} before eventually reaching the
* <code>target</code> object. The proxy2 will be generated using the current thread's "context class loader."
*
* @param target the target object
* @param interceptor the method interceptor
* @param proxyClass the class/interface that the proxy should implement
* @return a proxy which passes through a {@link Interceptor interceptor} before eventually reaching the
* @param proxyClass the class/interface that the proxy2 should implement
* @return a proxy2 which passes through a {@link Interceptor interceptor} before eventually reaching the
* <code>target</code> object.
*/
public <T> T createInterceptorProxy( Object target, Interceptor interceptor,
Class<T> proxyClass );

/**
* Creates a proxy which passes through a {@link Interceptor interceptor} before eventually reaching the
* Creates a proxy2 which passes through a {@link Interceptor interceptor} before eventually reaching the
* <code>target</code> object.
*
* @param classLoader the class loader to use when generating the proxy
* @param classLoader the class loader to use when generating the proxy2
* @param target the target object
* @param interceptor the method interceptor
* @param proxyClass the class/interface that the proxy should implement.
* @return a proxy which passes through a {@link Interceptor interceptor} before eventually reaching the
* @param proxyClass the class/interface that the proxy2 should implement.
* @return a proxy2 which passes through a {@link Interceptor interceptor} before eventually reaching the
* <code>target</code> object.
*/
public <T> T createInterceptorProxy( ClassLoader classLoader,
@@ -68,109 +68,109 @@ public <T> T createInterceptorProxy( ClassLoader classLoader,
Class<T> proxyClass );

/**
* Creates a proxy which uses the provided {@link Invoker} to handle all method invocations. The proxy will be
* Creates a proxy2 which uses the provided {@link Invoker} to handle all method invocations. The proxy2 will be
* generated using the current thread's "context class loader."
*
* @param invoker the invoker
* @param proxyClass the class/interface that the proxy should implement
* @return a proxy which uses the provided {@link Invoker} to handle all method invocations
* @param proxyClass the class/interface that the proxy2 should implement
* @return a proxy2 which uses the provided {@link Invoker} to handle all method invocations
*/
public <T> T createInvokerProxy( Invoker invoker, Class<T> proxyClass );

/**
* Creates a proxy which uses the provided {@link Invoker} to handle all method invocations.
* Creates a proxy2 which uses the provided {@link Invoker} to handle all method invocations.
*
* @param classLoader the class loader to use when generating the proxy
* @param classLoader the class loader to use when generating the proxy2
* @param invoker the invoker
* @param proxyClass the class/interface that the proxy should implement
* @return a proxy which uses the provided {@link Invoker} to handle all method invocations
* @param proxyClass the class/interface that the proxy2 should implement
* @return a proxy2 which uses the provided {@link Invoker} to handle all method invocations
*/
public <T> T createInvokerProxy( ClassLoader classLoader, Invoker invoker,
Class<T> proxyClass );

/**
* Creates a proxy which delegates to the object provided by <code>delegateProvider</code>. The proxy will be
* Creates a proxy2 which delegates to the object provided by <code>delegateProvider</code>. The proxy2 will be
* generated using the current thread's "context class loader."
*
* @param delegateProvider the delegate provider
* @param proxyClass the class/interface that the proxy should implement
* @return a proxy which delegates to the object provided by the target object provider
* @param proxyClass the class/interface that the proxy2 should implement
* @return a proxy2 which delegates to the object provided by the target object provider
*/
public <T> T createDelegatorProxy( ObjectProvider<T> delegateProvider, Class<T> proxyClass );

/**
* Learn whether this {@link ProxyFactory} is capable of creating a proxy for the specified set of classes.
* Learn whether this {@link ProxyFactory} is capable of creating a proxy2 for the specified set of classes.
*
* @param proxyClasses the proxy classes
* @param proxyClasses the proxy2 classes
* @return boolean
*/
public boolean canProxy( Class<?>... proxyClasses );

/**
* Creates a proxy which delegates to the object provided by <code>delegateProvider</code>. The proxy will be
* Creates a proxy2 which delegates to the object provided by <code>delegateProvider</code>. The proxy2 will be
* generated using the current thread's "context class loader."
*
* @param delegateProvider the delegate provider
* @param proxyClasses the interfaces that the proxy should implement
* @return a proxy which delegates to the object provided by the target object provider
* @param proxyClasses the interfaces that the proxy2 should implement
* @return a proxy2 which delegates to the object provided by the target object provider
*/
public Object createDelegatorProxy( ObjectProvider<?> delegateProvider, Class<?>... proxyClasses );

/**
* Creates a proxy which delegates to the object provided by <code>delegateProvider</code>.
* Creates a proxy2 which delegates to the object provided by <code>delegateProvider</code>.
*
* @param classLoader the class loader to use when generating the proxy
* @param classLoader the class loader to use when generating the proxy2
* @param delegateProvider the delegate provider
* @param proxyClasses the interfaces that the proxy should implement
* @return a proxy which delegates to the object provided by the target <code>delegateProvider>
* @param proxyClasses the interfaces that the proxy2 should implement
* @return a proxy2 which delegates to the object provided by the target <code>delegateProvider>
*/
public Object createDelegatorProxy( ClassLoader classLoader, ObjectProvider<?> delegateProvider,
Class<?>... proxyClasses );

/**
* Creates a proxy which passes through a {@link Interceptor interceptor} before eventually reaching the
* <code>target</code> object. The proxy will be generated using the current thread's "context class loader."
* Creates a proxy2 which passes through a {@link Interceptor interceptor} before eventually reaching the
* <code>target</code> object. The proxy2 will be generated using the current thread's "context class loader."
*
* @param target the target object
* @param interceptor the method interceptor
* @param proxyClasses the interfaces that the proxy should implement
* @return a proxy which passes through a {@link Interceptor interceptor} before eventually reaching the
* @param proxyClasses the interfaces that the proxy2 should implement
* @return a proxy2 which passes through a {@link Interceptor interceptor} before eventually reaching the
* <code>target</code> object.
*/
public Object createInterceptorProxy( Object target, Interceptor interceptor,
Class<?>... proxyClasses );

/**
* Creates a proxy which passes through a {@link Interceptor interceptor} before eventually reaching the
* Creates a proxy2 which passes through a {@link Interceptor interceptor} before eventually reaching the
* <code>target</code> object.
*
* @param classLoader the class loader to use when generating the proxy
* @param classLoader the class loader to use when generating the proxy2
* @param target the target object
* @param interceptor the method interceptor
* @param proxyClasses the interfaces that the proxy should implement.
* @return a proxy which passes through a {@link Interceptor interceptor} before eventually reaching the
* @param proxyClasses the interfaces that the proxy2 should implement.
* @return a proxy2 which passes through a {@link Interceptor interceptor} before eventually reaching the
* <code>target</code> object.
*/
public Object createInterceptorProxy( ClassLoader classLoader, Object target, Interceptor interceptor,
Class<?>... proxyClasses );

/**
* Creates a proxy which uses the provided {@link Invoker} to handle all method invocations. The proxy will be
* Creates a proxy2 which uses the provided {@link Invoker} to handle all method invocations. The proxy2 will be
* generated using the current thread's "context class loader."
*
* @param invoker the invoker
* @param proxyClasses the interfaces that the proxy should implement
* @return a proxy which uses the provided {@link Invoker} to handle all method invocations
* @param proxyClasses the interfaces that the proxy2 should implement
* @return a proxy2 which uses the provided {@link Invoker} to handle all method invocations
*/
public Object createInvokerProxy( Invoker invoker, Class<?>... proxyClasses );

/**
* Creates a proxy which uses the provided {@link Invoker} to handle all method invocations.
* Creates a proxy2 which uses the provided {@link Invoker} to handle all method invocations.
*
* @param classLoader the class loader to use when generating the proxy
* @param classLoader the class loader to use when generating the proxy2
* @param invoker the invoker
* @param proxyClasses the interfaces that the proxy should implement
* @return a proxy which uses the provided {@link Invoker} to handle all method invocations
* @param proxyClasses the interfaces that the proxy2 should implement
* @return a proxy2 which uses the provided {@link Invoker} to handle all method invocations
*/
public Object createInvokerProxy( ClassLoader classLoader, Invoker invoker,
Class<?>... proxyClasses );

0 comments on commit 9b5866e

Please sign in to comment.