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.locators
Class TypeLocator<T>

    java.lang.Object
      flexjson.locators.TypeLocator<T>

All Implemented Interfaces:
  ClassLocator

    public class TypeLocator<T>

extends java.lang.Object
implements ClassLocator

This implementation uses a single field out of the object as the type discriminator. Each unique value of the type field is mapped to a java class using the `add(Object, Class)` method.

Constructor Summary
`TypeLocator(java.lang.String fieldname)`

Method Summary
`TypeLocator` | `add(T value, java.lang.Class type)`
`java.lang.Class` | `locate(java.util.Map map, Path currentPath)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TypeLocator

    public TypeLocator(java.lang.String fieldname)

Method Detail

### add

    public TypeLocator add(T value,
                           java.lang.Class type)

### locate

    public java.lang.Class locate(java.util.Map map,
                                  Path currentPath)
                           throws java.lang.ClassNotFoundException

  Specified by:
    `locate` in interface `ClassLocator`
  Throws:
    `java.lang.ClassNotFoundException`

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