|
|||||||||
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.
Constructor Summary | |
---|---|
ConversionHandler(Object delegate)
Creates a ConversionHandler with an deleagte. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
Object |
getDelegate()
gets the delegate. |
int |
hashCode()
Returns a hash code value for the delegate. |
Object |
invoke(Object proxy,
Method method,
Object[] args)
This method is a default implementation for the invoke method given in Invocationhandler. |
abstract Object |
invokeCustom(Object proxy,
Method method,
Object[] args)
This method is called for all Methods not defined on Object. |
String |
toString()
Returns a String version of the delegate. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConversionHandler(Object delegate)
delegate
- the delegate
IllegalArgumentException
- if the given delegate is nullMethod Detail |
---|
public Object getDelegate()
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
proxy
- the proxymethod
- the methodargs
- the arguments
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 Object invokeCustom(Object proxy, Method method, Object[] args) throws Throwable
proxy
- the proxymethod
- the methodargs
- the arguments
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(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in class Object
Object.toString()
|
Copyright © 2003-2008 The Codehaus. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |