|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.util.InterfaceWrapper
public class InterfaceWrapper
provides methods to generate special proxy objects that observe calls to specified interfaces
InterfaceMonitor,
PerformanceMonitor,
Proxy| Method Summary | ||
|---|---|---|
static
|
wrap(ClassLoader cl,
Object object,
T implementation,
Class<T> type)
the returned object additionally implements the Wrapped interface |
|
static
|
wrap(Object object,
T implementation,
Class<T> type)
|
|
static Object |
wrapObject(ClassLoader cl,
Object object,
InterfaceMonitor monitor,
boolean wrapReturnValues,
Class<?>... interfacesToObserve)
returns an object that - apart from implementing the given interfaces - monitors each call to the object through the interfaces. |
|
static Object |
wrapObject(ClassLoader cl,
Object object,
InterfaceMonitor monitor,
Class<?>... interfacesToObserve)
|
|
static Object |
wrapObject(ClassLoader cl,
Object object,
InterfaceMonitor monitor,
Filter<? super Method> wrapReturnValuesFilter,
Class<?>... interfacesToObserve)
returns an object that - apart from implementing the given interfaces - monitors each call to the object through the interfaces. |
|
static Object |
wrapObject(Object obj,
InterfaceMonitor mon,
boolean wrapReturnValues,
Class<?>... interfacesToObserve)
uses the ClassLoader from the given object (first parameter) |
|
static Object |
wrapObject(Object obj,
InterfaceMonitor mon,
Class<?>... interfacesToObserve)
calls wrapObject(ClassLoader, Object, InterfaceMonitor, boolean, Class...) with false |
|
static Object |
wrapObject(Object obj,
InterfaceMonitor mon,
Filter<? super Method> wrapReturnValuesFilter,
Class<?>... interfacesToObserve)
uses the ClassLoader from the given object (first parameter) |
|
static
|
wrapObject(T obj,
InterfaceMonitor mon,
boolean wrapReturnValues,
Class<T> interfaceToObserve)
convenience method |
|
static
|
wrapObject(T obj,
InterfaceMonitor mon,
Class<T> interfaceToObserve)
convenience method |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> T wrapObject(T obj,
InterfaceMonitor mon,
Class<T> interfaceToObserve)
public static <T> T wrapObject(T obj,
InterfaceMonitor mon,
boolean wrapReturnValues,
Class<T> interfaceToObserve)
public static Object wrapObject(Object obj,
InterfaceMonitor mon,
Class<?>... interfacesToObserve)
throws IllegalArgumentException
wrapObject(ClassLoader, Object, InterfaceMonitor, boolean, Class...) with false
IllegalArgumentException
public static Object wrapObject(Object obj,
InterfaceMonitor mon,
boolean wrapReturnValues,
Class<?>... interfacesToObserve)
throws IllegalArgumentException
IllegalArgumentExceptionwrapObject(ClassLoader, Object, InterfaceMonitor, Class...)
public static Object wrapObject(Object obj,
InterfaceMonitor mon,
Filter<? super Method> wrapReturnValuesFilter,
Class<?>... interfacesToObserve)
throws IllegalArgumentException
IllegalArgumentExceptionwrapObject(ClassLoader, Object, InterfaceMonitor, Class...)
public static Object wrapObject(ClassLoader cl,
Object object,
InterfaceMonitor monitor,
Class<?>... interfacesToObserve)
throws IllegalArgumentException
IllegalArgumentExceptionwrapObject(ClassLoader, Object, InterfaceMonitor, boolean, Class...)
public static Object wrapObject(ClassLoader cl,
Object object,
InterfaceMonitor monitor,
boolean wrapReturnValues,
Class<?>... interfacesToObserve)
throws IllegalArgumentException
wrapReturnValues - if true, return values of methods with an interface as a return type
are also recursively wrapped
IllegalArgumentException
public static Object wrapObject(ClassLoader cl,
Object object,
InterfaceMonitor monitor,
Filter<? super Method> wrapReturnValuesFilter,
Class<?>... interfacesToObserve)
throws IllegalArgumentException
wrapReturnValuesFilter - determines whether return values of methods
with an interface as a return type are also recursively wrapped
IllegalArgumentException
public static <T> T wrap(Object object,
T implementation,
Class<T> type)
wrap(ClassLoader, Object, Object, Class)
public static <T> T wrap(ClassLoader cl,
Object object,
T implementation,
Class<T> type)
throws IllegalArgumentException
Wrapped interface
IllegalArgumentExceptionMisc.unwrap(Object, Class)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||