protected static class DefaultJsonGenerator.ClosureConverter extends Object implements JsonGenerator.Converter
| Modifier and Type | Field and Description | 
|---|---|
protected Closure<?> | 
closure  | 
protected int | 
paramCount  | 
protected Class<?> | 
type  | 
| Modifier | Constructor and Description | 
|---|---|
protected  | 
ClosureConverter(Class<?> type,
                Closure<?> closure)  | 
| Modifier and Type | Method and Description | 
|---|---|
Object | 
convert(Object value,
       String key)
Converts a given value. 
 | 
boolean | 
equals(Object o)
Any two Converter instances registered for the same type are considered
 to be equal. 
 | 
boolean | 
handles(Class<?> type)
Returns  
true if this converter can handle conversions
 of the given type. | 
int | 
hashCode()  | 
String | 
toString()  | 
protected final Class<?> type
protected final Closure<?> closure
protected final int paramCount
public boolean handles(Class<?> type)
true if this converter can handle conversions
 of the given type.handles in interface JsonGenerator.Convertertype - the type of the object to convertpublic Object convert(Object value, String key)
convert in interface JsonGenerator.Convertervalue - the object to convertkey - the key name for the value, may be nullpublic boolean equals(Object o)