flexjson
Class ObjectBinder

java.lang.Object
  extended by flexjson.ObjectBinder

public class ObjectBinder
extends java.lang.Object


Constructor Summary
ObjectBinder()
           
 
Method Summary
 java.lang.Object bind(java.lang.Object input)
           
 java.lang.Object bind(java.lang.Object input, java.lang.reflect.Type targetType)
           
<T extends java.util.Collection<java.lang.Object>>
T
bindIntoCollection(java.util.Collection value, T target, java.lang.reflect.Type targetType)
           
 java.lang.Object bindIntoMap(java.util.Map input, java.util.Map<java.lang.Object,java.lang.Object> result, java.lang.reflect.Type keyType, java.lang.reflect.Type valueType)
           
 java.lang.Object bindIntoObject(java.util.Map jsonOwner, java.lang.Object target, java.lang.reflect.Type targetType)
           
 JSONException cannotConvertValueToTargetType(java.lang.Object value, java.lang.Class targetType)
           
protected  java.lang.Class findClassInMap(java.util.Map map, java.lang.Class override)
           
 java.lang.Class findClassName(java.util.Map map, java.lang.Class targetType)
           
 Path getCurrentPath()
           
protected  java.lang.Object instantiate(java.lang.Class clazz)
           
 ObjectBinder use(java.lang.Class clazz, ObjectFactory factory)
           
 ObjectBinder use(Path path, ObjectFactory factory)
           
protected  java.lang.Class useMostSpecific(java.lang.Class classFromTarget, java.lang.Class typeFound)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectBinder

public ObjectBinder()
Method Detail

use

public ObjectBinder use(Path path,
                        ObjectFactory factory)

use

public ObjectBinder use(java.lang.Class clazz,
                        ObjectFactory factory)

getCurrentPath

public Path getCurrentPath()

bind

public java.lang.Object bind(java.lang.Object input)

bind

public java.lang.Object bind(java.lang.Object input,
                             java.lang.reflect.Type targetType)

bindIntoCollection

public <T extends java.util.Collection<java.lang.Object>> T bindIntoCollection(java.util.Collection value,
                                                                               T target,
                                                                               java.lang.reflect.Type targetType)

bindIntoMap

public java.lang.Object bindIntoMap(java.util.Map input,
                                    java.util.Map<java.lang.Object,java.lang.Object> result,
                                    java.lang.reflect.Type keyType,
                                    java.lang.reflect.Type valueType)

cannotConvertValueToTargetType

public JSONException cannotConvertValueToTargetType(java.lang.Object value,
                                                    java.lang.Class targetType)

bindIntoObject

public java.lang.Object bindIntoObject(java.util.Map jsonOwner,
                                       java.lang.Object target,
                                       java.lang.reflect.Type targetType)

findClassName

public java.lang.Class findClassName(java.util.Map map,
                                     java.lang.Class targetType)
                              throws JSONException
Throws:
JSONException

useMostSpecific

protected java.lang.Class useMostSpecific(java.lang.Class classFromTarget,
                                          java.lang.Class typeFound)

findClassInMap

protected java.lang.Class findClassInMap(java.util.Map map,
                                         java.lang.Class override)

instantiate

protected java.lang.Object instantiate(java.lang.Class clazz)