|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.proxy.ProxyUtils
public class ProxyUtils
Provides some helpful proxy utility methods.
Field Summary | |
---|---|
static Class[] |
EMPTY_ARGUMENT_TYPES
|
static Object[] |
EMPTY_ARGUMENTS
|
Constructor Summary | |
---|---|
ProxyUtils()
|
Method Summary | |
---|---|
static Object |
createNullObject(ProxyFactory proxyFactory,
Class[] proxyClasses)
Creates a "null object" which implements the proxyClasses . |
static Object |
createNullObject(ProxyFactory proxyFactory,
ClassLoader classLoader,
Class[] proxyClasses)
Creates a "null object" which implements the proxyClasses . |
static Class[] |
getAllInterfaces(Class cls)
Gets an array of Class objects representing all interfaces implemented by the given class and its
superclasses. |
static String |
getJavaClassName(Class clazz)
Returns the class name as you would expect to see it in Java code. |
static Class |
getWrapperClass(Class primitiveType)
Returns the wrapper class for the given primitive type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object[] EMPTY_ARGUMENTS
public static final Class[] EMPTY_ARGUMENT_TYPES
Constructor Detail |
---|
public ProxyUtils()
Method Detail |
---|
public static Object createNullObject(ProxyFactory proxyFactory, Class[] proxyClasses)
proxyClasses
.
proxyFactory
- the proxy factory to be used to create the proxy objectproxyClasses
- the proxy interfaces
proxyClasses
.public static Object createNullObject(ProxyFactory proxyFactory, ClassLoader classLoader, Class[] proxyClasses)
proxyClasses
.
proxyFactory
- the proxy factory to be used to create the proxy objectclassLoader
- the class loader to be used by the proxy factory to create the proxy objectproxyClasses
- the proxy interfaces
proxyClasses
.public static Class[] getAllInterfaces(Class cls)
Gets an array of Class
objects representing all interfaces implemented by the given class and its
superclasses.
The order is determined by looking through each interface in turn as declared in the source file and following its hierarchy up. Then each superclass is considered in the same way. Later duplicates are ignored, so the order is maintained.
Note: Implementation of this method was "borrowed" from Apache Commons Lang to avoid a dependency.
cls
- the class to look up, may be null
Class
objects representing all interfaces implemented by the given class and its
superclasses or null
if input class is null.public static String getJavaClassName(Class clazz)
Examples:
clazz
- the class
public static Class getWrapperClass(Class primitiveType)
primitiveType
- the primitive type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |