public class Proxies extends Object
| Constructor and Description |
|---|
Proxies() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areEquivalent(Object proxiedObj,
Object anotherProxiedObj)
This method tests if two proxied objects are equivalent.
|
static <T> T |
enhance(Class<T> type,
ForgeProxy handler)
Create a proxy for the given
Class type. |
static <T> T |
enhance(ClassLoader loader,
Object instance,
ForgeProxy handler)
Create a proxy for the given
Class type. |
static boolean |
isForgeProxy(Object object)
Returns true if the given object was created via
Proxies. |
static boolean |
isInstance(Class<?> type,
Object proxiedObject)
Checks if a proxied object is an instance of the specified
Class |
static boolean |
isInstantiable(Class<?> type)
Determine whether or not a given
Class type is instantiable. |
static boolean |
isLanguageType(Class<?> type) |
static boolean |
isPassthroughType(Class<?> type)
Determine if the given
Class type does not require ClassLoader proxying. |
static boolean |
isProxyType(Class<?> type) |
static <T> T |
unwrap(Object object)
Returns the delegate object, if the given object was created via
Proxies, otherwise it returns the given
object, unchanged. |
static <T> T |
unwrapOnce(Object object) |
static String |
unwrapProxyClassName(Class<?> type)
Unwraps the proxy type if javassist or CGLib is used
|
static Class<?> |
unwrapProxyTypes(Class<?> type,
ClassLoader... loaders) |
public static <T> T enhance(ClassLoader loader, Object instance, ForgeProxy handler)
Class type.public static <T> T enhance(Class<T> type, ForgeProxy handler)
Class type.public static boolean isProxyType(Class<?> type)
public static <T> T unwrap(Object object)
Proxies, otherwise it returns the given
object, unchanged.public static <T> T unwrapOnce(Object object)
public static boolean isForgeProxy(Object object)
Proxies.public static Class<?> unwrapProxyTypes(Class<?> type, ClassLoader... loaders)
public static String unwrapProxyClassName(Class<?> type)
type - the class typepublic static boolean areEquivalent(Object proxiedObj, Object anotherProxiedObj)
public static boolean isInstance(Class<?> type, Object proxiedObject)
Classpublic static boolean isInstantiable(Class<?> type)
Class type is instantiable.public static boolean isPassthroughType(Class<?> type)
Class type does not require ClassLoader proxying.public static boolean isLanguageType(Class<?> type)
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.