Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## flexjson
Interface ObjectFactory

All Known Implementing Classes:
  ArrayObjectFactory, BeanObjectFactory, BooleanObjectFactory, ByteObjectFactory, CharacterObjectFactory, ClassLocatorObjectFactory, DateObjectFactory, DateTransformer, DoubleObjectFactory, EnumObjectFactory, FloatObjectFactory, IntegerObjectFactory, ListObjectFactory, LongObjectFactory, MapObjectFactory, SetObjectFactory, ShortObjectFactory, SortedSetObjectFactory, StringObjectFactory

    public interface ObjectFactory

ObjectFactory allows you to instantiate specific types of objects on path or class types. This interface allows you to override the default rules.

Method Summary
`java.lang.Object` | `instantiate(ObjectBinder context, java.lang.Object value, java.lang.reflect.Type targetType, java.lang.Class targetClass)` This method is called by the deserializer to construct and bind an object.

Method Detail

### instantiate

    java.lang.Object instantiate(ObjectBinder context,
                                 java.lang.Object value,
                                 java.lang.reflect.Type targetType,
                                 java.lang.Class targetClass)

  This method is called by the deserializer to construct and bind an object. At the end of this method the object should be fully constructed. `ObjectBinder` can be used to bind values into the object according to default rules. For simple implementations you won't need to use this, but for more complex or generic objects reusing methods like `ObjectBinder.bind(Object, java.lang.reflect.Type)` and `ObjectBinder.bindIntoCollection(java.util.Collection, java.util.Collection, java.lang.reflect.Type)`.

  Parameters:
    `context` - the object binding context to keep track of where we are in the object graph and used for binding into objects.
    `value` - This is the value from the json object at the current path.
    `targetType` - This is the type pulled from the object introspector. Used for Collections and generic types.
    `targetClass` - concrete class pulled from the configuration of the deserializer.
  Returns:
    the fully bound object. At the end of this method the object should be fully constructed.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD