flexjson.locators
Class TypeLocator<T>
java.lang.Object
flexjson.locators.TypeLocator<T>
- All Implemented Interfaces:
- ClassLocator
public class TypeLocator<T>
- extends 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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeLocator
public TypeLocator(String fieldname)
add
public TypeLocator add(T value,
Class type)
locate
public Class locate(ObjectBinder context,
Path currentPath)
throws ClassNotFoundException
- Specified by:
locate
in interface ClassLocator
- Throws:
ClassNotFoundException
Copyright © 2014. All Rights Reserved.