public abstract class AbstractSubclassingProxyFactory extends AbstractProxyFactory
AbstractProxyFactory
for implementations that permit the generation of proxies with a specific
inheritance hierarchy.Constructor and Description |
---|
AbstractSubclassingProxyFactory() |
Modifier and Type | Method and Description |
---|---|
boolean |
canProxy(Class<?>... proxyClasses)
Returns true if a suitable superclass can be found, given the desired
proxyClasses . |
static Class<?> |
getSuperclass(Class<?>[] proxyClasses)
Returns either
Object if all of the proxyClasses are interfaces or the single non-interface
class from proxyClasses . |
protected static Class<?>[] |
toInterfaces(Class<?>[] proxyClasses)
Returns the
proxyClasses transformed into an array of only the interface classes. |
createDelegatorProxy, createInterceptorProxy, createInvokerProxy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDelegatorProxy, createInterceptorProxy, createInvokerProxy
public AbstractSubclassingProxyFactory()
public boolean canProxy(Class<?>... proxyClasses)
proxyClasses
.canProxy
in interface ProxyFactory
canProxy
in class AbstractProxyFactory
proxyClasses
- the proxy classesproxyClasses
protected static Class<?>[] toInterfaces(Class<?>[] proxyClasses)
proxyClasses
transformed into an array of only the interface classes.
Note: This class will append Serializable
to the end of the list if it's not found!proxyClasses
- the proxy classesproxyClasses
transformed into an array of only the interface classespublic static Class<?> getSuperclass(Class<?>[] proxyClasses)
Object
if all of the proxyClasses
are interfaces or the single non-interface
class from proxyClasses
.proxyClasses
- the proxy classesObject
if all of the proxyClasses
are interfaces or the single non-interface
class from proxyClasses
ProxyFactoryException
- if multiple non-interface classes are contained in proxyClasses
or any of the
non-interface classes are finalCopyright © 2005–2014 The Apache Software Foundation. All rights reserved.