public class ProxyUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Class[] |
EMPTY_ARGUMENT_TYPES |
static Object[] |
EMPTY_ARGUMENTS |
| Constructor and Description |
|---|
ProxyUtils() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final Object[] EMPTY_ARGUMENTS
public static final Class[] EMPTY_ARGUMENT_TYPES
public static Object createNullObject(ProxyFactory proxyFactory, Class[] proxyClasses)
proxyClasses.proxyFactory - the proxy factory to be used to create the proxy objectproxyClasses - the proxy interfacesproxyClasses.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 interfacesproxyClasses.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 nullClass 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)
clazz - the classCopyright © 2005-2013 Apache Software Foundation. All Rights Reserved.