Package org.codehaus.groovy.runtime
Class ConvertedMap
java.lang.Object
org.codehaus.groovy.runtime.ConversionHandler
org.codehaus.groovy.runtime.ConvertedMap
- All Implemented Interfaces:
- Serializable,- InvocationHandler
This class is a general adapter to adapt a map of closures to
 any Java interface.
- See Also:
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConvertedMap(Map closures) to create a ConvertedMap object.
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleancheckMethod(Method method) invokeCustom(Object proxy, Method method, Object[] args) This method is called for all Methods not defined on Object.static booleanisCoreObjectMethod(Method method) Checks whether a method is a core method from java.lang.Object.toString()Returns a String version of the delegate.Methods inherited from class org.codehaus.groovy.runtime.ConversionHandlerequals, getDelegate, hashCode, invoke, isDefaultMethod
- 
Constructor Details- 
ConvertedMapto create a ConvertedMap object.- Parameters:
- closures- the map of closures
 
 
- 
- 
Method Details- 
invokeCustomDescription copied from class:ConversionHandlerThis method is called for all Methods not defined on Object. The delegate should be called here.- Specified by:
- invokeCustomin class- ConversionHandler
- Parameters:
- proxy- the proxy
- method- the method
- args- the arguments
- Returns:
- the result of the invocation of the delegate
- Throws:
- Throwable- any exception causes by the delegate
- See Also:
 
- 
toStringDescription copied from class:ConversionHandlerReturns a String version of the delegate.- Overrides:
- toStringin class- ConversionHandler
- See Also:
 
- 
checkMethod- Overrides:
- checkMethodin class- ConversionHandler
 
- 
isCoreObjectMethodChecks whether a method is a core method from java.lang.Object. Such methods often receive special treatment because they are deemed fundamental enough to not be tampered with. call toString() is an exception to allow overriding toString() by a closure specified in the map- Parameters:
- method- the method to check
- Returns:
- true if the method is deemed to be a core method
 
 
-