|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.runtime.ConversionHandler
public abstract class ConversionHandler
This class is a general adapter to map a call to an Java interface to a given delegate.
Field Summary | |
---|---|
private java.lang.Object |
delegate
|
Constructor Summary | |
---|---|
ConversionHandler(java.lang.Object delegate)
Creates a ConversionHandler with an deleagte. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
java.lang.Object |
getDelegate()
gets the delegate. |
int |
hashCode()
Returns a hash code value for the delegate. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
This method is a default implementation for the invoke method given in Invocationhandler. |
abstract java.lang.Object |
invokeCustom(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
This method is called for all Methods not defined on Object. |
private static boolean |
isObjectMethod(java.lang.reflect.Method mtd)
|
java.lang.String |
toString()
Returns a String version of the delegate. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.Object delegate
Constructor Detail |
---|
public ConversionHandler(java.lang.Object delegate)
delegate
- the delegate
java.lang.IllegalArgumentException
- if the given delegate is nullMethod Detail |
---|
public java.lang.Object getDelegate()
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
proxy
- the proxymethod
- the methodargs
- the arguments
java.lang.Throwable
- any exception caused by the delegate or the methodinvokeCustom(Object, Method, Object[])
,
InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
public abstract java.lang.Object invokeCustom(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
proxy
- the proxymethod
- the methodargs
- the arguments
java.lang.Throwable
- any exception causes by the delegateinvoke(Object, Method, Object[])
,
InvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
private static boolean isObjectMethod(java.lang.reflect.Method mtd)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |