public class GCUBEProxyFactory extends Object
GCUBEProxyContexts.| Modifier and Type | Class and Description |
|---|---|
static class |
GCUBEProxyFactory.FlexEnhancer |
| Modifier and Type | Field and Description |
|---|---|
protected static Map<Class<? extends Annotation>,Class<? extends GCUBEProxyContext<?>>> |
proxyClasses
Registered
GCUBEProxyContext classes, indexed by the associated annotation classes. |
| Constructor and Description |
|---|
GCUBEProxyFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected static <ANNOTATION extends Annotation> |
getProxy(Class<? extends ANNOTATION> annotationClass)
Returns an instance of a registered
GCUBEProxyContext form the class of its associated annotation. |
static <TYPE> TYPE |
getProxy(GCUBEProxyContext<?> context,
TYPE proxied,
Class<?>... optionalInterface)
Given an arbitrary object, returns a proxy associated with a given
GCUBEProxyContext for that object. |
static <TYPE> TYPE |
getProxy(TYPE proxied,
Class<?>... optionalInterface)
Given an arbitrary object, returns a proxy associated with
ForwardProxyContext for that object. |
static void |
registerContexts(Class<? extends GCUBEProxyContext<?>>... contextClasses)
Registers one or more
GCUBEProxyContext classes. |
protected static Map<Class<? extends Annotation>,Class<? extends GCUBEProxyContext<?>>> proxyClasses
GCUBEProxyContext classes, indexed by the associated annotation classes.public static void registerContexts(Class<? extends GCUBEProxyContext<?>>... contextClasses) throws Exception
GCUBEProxyContext classes.contextClasses - the classes.Exception - if one of the classes could not be registered.protected static <ANNOTATION extends Annotation> GCUBEProxyContext<ANNOTATION> getProxy(Class<? extends ANNOTATION> annotationClass) throws Exception
GCUBEProxyContext form the class of its associated annotation.ANNOTATION - the type of the annotation.annotationClass - the annotation class.null if the context was not previously registered.Exception - if the context was found but could not be instantiated.public static <TYPE> TYPE getProxy(TYPE proxied,
Class<?>... optionalInterface)
throws Exception
ForwardProxyContext for that object.TYPE - the object's type.proxied - the object.optionalInterface - (optional) an optional interface which the proxy should implement.Exception - if the object could not be proxied.public static <TYPE> TYPE getProxy(GCUBEProxyContext<?> context, TYPE proxied, Class<?>... optionalInterface) throws Exception
GCUBEProxyContext for that object.TYPE - the object's type.context - the context.proxied - the object.optionalInterface - (optional) an optional interface which the proxy should implement.Exception - if the object could not be proxied.Copyright © 2015. All Rights Reserved.