|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.utils.proxies.GCUBEProxyFactory
public class GCUBEProxyFactory
Factory of proxies associated with GCUBEProxyContexts.
| Nested Class Summary | |
|---|---|
static class |
GCUBEProxyFactory.FlexEnhancer
|
| Field Summary | |
|---|---|
protected static Map<Class<? extends Annotation>,Class<? extends GCUBEProxyContext<?>>> |
proxyClasses
Registered GCUBEProxyContext classes, indexed by the associated annotation classes. |
| Constructor Summary | |
|---|---|
GCUBEProxyFactory()
|
|
| Method Summary | ||
|---|---|---|
protected static
|
getProxy(Class<? extends ANNOTATION> annotationClass)
Returns an instance of a registered GCUBEProxyContext form the class of its associated annotation. |
|
static
|
getProxy(GCUBEProxyContext<?> context,
TYPE proxied,
Class<?>... optionalInterface)
Given an arbitrary object, returns a proxy associated with a given GCUBEProxyContext for that object. |
|
static
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Map<Class<? extends Annotation>,Class<? extends GCUBEProxyContext<?>>> proxyClasses
GCUBEProxyContext classes, indexed by the associated annotation classes.
| Constructor Detail |
|---|
public GCUBEProxyFactory()
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||