Groovy Documentation

## org.codehaus.groovy.runtime
[Java] Class ConvertedMap

    java.lang.Object
      org.codehaus.groovy.runtime.ConversionHandler
          org.codehaus.groovy.runtime.ConvertedMap

    public class ConvertedMap
    extends ConversionHandler

This class is a general adapter to adapt a map of closures to any Java interface.

Authors:
  Jochen Theodorou

Constructor Summary
`protected ConvertedMap(java.util.Map closures)` to create a ConvertedMap object.

Method Summary
`protected boolean` | `checkMethod(java.lang.reflect.Method method)`
`java.lang.Object` | `invokeCustom(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)`
`static boolean` | `isCoreObjectMethod(java.lang.reflect.Method method)` Checks whether a method is a core method from java.lang.Object.
`java.lang.String` | `toString()`

Methods inherited from class ConversionHandler
checkMethod, equals, getDelegate, hashCode, invoke, invokeCustom, isCoreObjectMethod, toString

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### ConvertedMap

    protected ConvertedMap(java.util.Map closures)

  to create a ConvertedMap object.
  Parameters:
    `closures` - the map of closures

Method Detail

### checkMethod

    protected boolean checkMethod(java.lang.reflect.Method method)

### invokeCustom

    public java.lang.Object invokeCustom(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)

### isCoreObjectMethod

    public static boolean isCoreObjectMethod(java.lang.reflect.Method method)

  Checks 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

### toString

    public java.lang.String toString()

Groovy Documentation