Skip to content
Permalink
Browse files
Add missing method @OVERRIDES (Java 5)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/proxy/trunk@1582286 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
sebbASF committed Mar 27, 2014
1 parent 911978f commit 58e68e0340ee7675580e497b8a1b10409803e7fe
Showing 9 changed files with 28 additions and 0 deletions.
@@ -346,6 +346,7 @@ protected DelegatorInvoker(ObjectProvider<?> delegateProvider)
this.delegateProvider = delegateProvider;
}

@Override
public Object invokeImpl(Object proxy, Method method, Object[] args) throws Throwable
{
try
@@ -371,6 +372,7 @@ public InterceptorInvoker(Object target, Interceptor methodInterceptor)
this.methodInterceptor = methodInterceptor;
}

@Override
public Object invokeImpl(Object proxy, Method method, Object[] args) throws Throwable
{
final ReflectionInvocation invocation = new ReflectionInvocation(target, proxy, method, args);
@@ -407,6 +409,7 @@ public InvokerInvoker(Invoker invoker)
this.invoker = invoker;
}

@Override
public Object invokeImpl(Object proxy, Method method, Object[] args) throws Throwable
{
return invoker.invoke(proxy, method, args);
@@ -41,6 +41,7 @@ public abstract class AbstractSubclassingProxyFactory extends AbstractProxyFacto
* the proxy classes
* @return true if a suitable superclass can be found, given the desired <code>proxyClasses</code>
*/
@Override
public boolean canProxy(Class<?>... proxyClasses)
{
try
@@ -233,6 +233,7 @@ public Method toMethod(Class<?> type)
/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object o)
{
if (o == null)
@@ -254,6 +255,7 @@ public boolean equals(Object o)
/**
* {@inheritDoc}
*/
@Override
public int hashCode()
{
return new HashCodeBuilder().append(internal).build();
@@ -262,6 +264,7 @@ public int hashCode()
/**
* {@inheritDoc}
*/
@Override
public String toString()
{
return internal;
@@ -73,6 +73,7 @@ public Method getInvokedMethod()
/**
* {@inheritDoc}
*/
@Override
public String toString()
{
StringBuilder buffer = new StringBuilder();
@@ -55,6 +55,7 @@ public SingletonProvider(ObjectProvider<? extends T> inner)
/**
* {@inheritDoc}
*/
@Override
public T getObject()
{
synchronized (this)
@@ -48,6 +48,7 @@ public abstract class AbstractSubclassingProxyFactoryTestCase extends AbstractPr
// Other Methods
//----------------------------------------------------------------------------------------------------------------------

@Override
@Test
public void testCanProxy()
{
@@ -61,6 +62,7 @@ public void testCanProxy()
assertFalse(factory.canProxy(new Class[] { Echo.class, EchoImpl.class, String.class }));
}

@Override
@Test
public void testDelegatorEquals() throws Exception
{
@@ -89,6 +91,7 @@ public void testDelegatorWithSuperclass()
assertTrue(echo instanceof EchoImpl);
}

@Override
@Test
public void testInterceptorEquals()
{
@@ -123,6 +126,7 @@ public void testInvocationHandlerWithMultipleSuperclasses()
factory.createInvokerProxy(new NullInvoker(), new Class[] { EchoImpl.class, String.class });
}

@Override
@Test
public void testInvokerEquals() throws Exception
{
@@ -189,6 +193,7 @@ public static final class FinalEcho extends EchoImpl

public static class FinalMethodEcho extends EchoImpl
{
@Override
public final String echoBack(String message)
{
return "final";
@@ -88,6 +88,7 @@ public void testWithProtectedCloneMethod()

public static class ExceptionCloneable implements Cloneable
{
@Override
public Object clone()
{
throw new RuntimeException("No clone for you!");
@@ -100,6 +101,7 @@ public static class InvalidCloneable implements Cloneable

public static class ProtectedCloneable implements Cloneable
{
@Override
protected Object clone()
{
return this;
@@ -44,6 +44,7 @@ public CountingProvider(ObjectProvider<? extends T> inner)
// ObjectProvider Implementation
//**********************************************************************************************************************

@Override
public synchronized T getObject()
{
count++;
@@ -52,6 +52,7 @@ public class JdkProxyFactory extends AbstractProxyFactory
* the interfaces that the proxy2 should implement
* @return a proxy2 which delegates to the object provided by the target <code>delegateProvider>
*/
@Override
@SuppressWarnings("unchecked")
public <T> T createDelegatorProxy(ClassLoader classLoader, ObjectProvider<?> delegateProvider,
Class<?>... proxyClasses)
@@ -74,6 +75,7 @@ public <T> T createDelegatorProxy(ClassLoader classLoader, ObjectProvider<?> del
* @return a proxy2 which passes through a {@link Interceptor interceptor} before eventually reaching the
* <code>target</code> object.
*/
@Override
@SuppressWarnings("unchecked")
public <T> T createInterceptorProxy(ClassLoader classLoader, Object target, Interceptor interceptor,
Class<?>... proxyClasses)
@@ -93,6 +95,7 @@ public <T> T createInterceptorProxy(ClassLoader classLoader, Object target, Inte
* the interfaces that the proxy2 should implement
* @return a proxy2 which uses the provided {@link Invoker} to handle all method invocations
*/
@Override
@SuppressWarnings("unchecked")
public <T> T createInvokerProxy(ClassLoader classLoader, Invoker invoker, Class<?>... proxyClasses)
{
@@ -108,6 +111,7 @@ private abstract static class AbstractInvocationHandler implements InvocationHan
/** Serialization version */
private static final long serialVersionUID = 1L;

@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
{
if (ProxyUtils.isHashCode(method))
@@ -139,6 +143,7 @@ protected DelegatorInvocationHandler(ObjectProvider<?> delegateProvider)
this.delegateProvider = delegateProvider;
}

@Override
public Object invokeImpl(Object proxy, Method method, Object[] args) throws Throwable
{
try
@@ -166,6 +171,7 @@ public InterceptorInvocationHandler(Object target, Interceptor methodInterceptor
this.methodInterceptor = methodInterceptor;
}

@Override
public Object invokeImpl(Object proxy, Method method, Object[] args) throws Throwable
{
final ReflectionInvocation invocation = new ReflectionInvocation(proxy, target, method, args);
@@ -185,6 +191,7 @@ public InvokerInvocationHandler(Invoker invoker)
this.invoker = invoker;
}

@Override
public Object invokeImpl(Object proxy, Method method, Object[] args) throws Throwable
{
return invoker.invoke(proxy, method, args);
@@ -206,21 +213,25 @@ public ReflectionInvocation(Object proxy, Object target, Method method, Object[]
this.arguments = ObjectUtils.defaultIfNull(ArrayUtils.clone(arguments), ProxyUtils.EMPTY_ARGUMENTS);
}

@Override
public Object[] getArguments()
{
return arguments;
}

@Override
public Method getMethod()
{
return method;
}

@Override
public Object getProxy()
{
return proxy;
}

@Override
public Object proceed() throws Throwable
{
try

0 comments on commit 58e68e0

Please sign in to comment.