org.elkoserver.foundation.json
Interface TypeResolver

All Known Subinterfaces:
ObjDB
All Known Implementing Classes:
ObjDBLocal, ObjDBRemote, StaticTypeResolver

public interface TypeResolver

A mapping from JSON type tag strings to Java classes. This interface only specifies the lookup operation. It is up to the implementor as to how the mapping is established and maintained.


Method Summary
 Class<?> resolveType(Class<?> baseType, String typeName)
          Determine the Java class associated with a given JSON type tag string.
 

Method Detail

resolveType

Class<?> resolveType(Class<?> baseType,
                     String typeName)
Determine the Java class associated with a given JSON type tag string.

Parameters:
baseType - Base class from which result class must be derived.
typeName - JSON type tag identifying the desired class.
Returns:
a class named by 'typeName' suitable for assignment to a method or constructor parameter of class 'baseType'.