protected static class DefaultJsonGenerator.ClosureConverter
A converter that handles converting a given type using a closure.
| Modifiers | Name | Description | 
|---|---|---|
protected Closure<?>  | 
                            closure | 
                            |
protected int  | 
                            paramCount | 
                            |
protected Class<?>  | 
                            type | 
                            
| Constructor and description | 
|---|
                                protected DefaultJsonGenerator.ClosureConverter
                                (Class<?> type, Closure<?> closure) | 
                        
| Type Params | Return Type | Name 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() | 
                        
Converts a given value.
value -  the object to convertkey -  the key name for the value, may be nullAny two Converter instances registered for the same type are considered to be equal. This comparison makes managing instances in a Set easier; since there is no chaining of Converters it makes sense to only allow one per type.
o -  the object with which to compare.true if this object contains the same class; false otherwise. Returns true if this converter can handle conversions
 of the given type.
         
type -  the type of the object to convertCopyright © 2003-2021 The Apache Software Foundation. All rights reserved.