|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.util.AdapterInvocationHandler
public class AdapterInvocationHandler
Adapts and interface or set of interfaces directly to another object that implements compatible methods. Basically, it's an easy way to make an object that conforms to an interface's methods actually implement that interface. In the future, it may also support mapping of similarly typed methods with different names, method names based on class, etc..
Method Summary | |
---|---|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
|
static boolean |
isConformingClass(java.lang.Class[] interfaces,
java.lang.Class objClass)
Returns true if the specified class has method signatures that match the method signatures found in the interfaces specified. |
static void |
main(java.lang.String[] args)
|
static java.lang.Object |
newAdapterProxy(java.lang.Class[] interfaces,
java.lang.Object target)
Creates a new dynamic proxy the implements the specified interfaces and passes the method calls directly through to the specified object. |
static java.lang.Object |
newAdapterProxy(java.lang.ClassLoader loader,
java.lang.Class[] interfaces,
java.lang.Object target)
Creates a new dynamic proxy the implements the specified interfaces and passes the method calls directly through to the specified object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.Object newAdapterProxy(java.lang.Class[] interfaces, java.lang.Object target)
public static java.lang.Object newAdapterProxy(java.lang.ClassLoader loader, java.lang.Class[] interfaces, java.lang.Object target)
public static boolean isConformingClass(java.lang.Class[] interfaces, java.lang.Class objClass)
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |