Package deltix.qsrv.hf.pub
Class MappingTypeLoader
- java.lang.Object
-
- deltix.qsrv.hf.pub.MappingTypeLoader
-
- All Implemented Interfaces:
TypeLoader
public class MappingTypeLoader extends java.lang.Object implements TypeLoader
Allows loading pre-registered classes with arbitrary names, or with names determined by theSchemaElement
annotation.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.Class<?>>
map
protected TypeLoader
parent
-
Constructor Summary
Constructors Constructor Description MappingTypeLoader()
MappingTypeLoader(TypeLoader parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(ClassDescriptor cd, java.lang.Class<?> cls)
void
bind(java.lang.Class<?> cls)
void
bind(java.lang.String className, java.lang.Class<?> cls)
java.util.Map<java.lang.String,java.lang.Class<?>>
getMap()
java.lang.Class<?>
load(ClassDescriptor cd)
-
-
-
Field Detail
-
parent
protected final TypeLoader parent
-
map
protected final java.util.Map<java.lang.String,java.lang.Class<?>> map
-
-
Constructor Detail
-
MappingTypeLoader
public MappingTypeLoader()
-
MappingTypeLoader
public MappingTypeLoader(TypeLoader parent)
-
-
Method Detail
-
bind
public void bind(java.lang.Class<?> cls)
-
bind
public void bind(java.lang.String className, java.lang.Class<?> cls)
-
bind
public void bind(ClassDescriptor cd, java.lang.Class<?> cls)
-
load
public java.lang.Class<?> load(ClassDescriptor cd) throws java.lang.ClassNotFoundException
- Specified by:
load
in interfaceTypeLoader
- Returns:
- Class for type specified by given descriptor (never null). Implementation of this function must return the same class for identical class descriptors (i.e. must be "pure function").
- Throws:
java.lang.ClassNotFoundException
-
getMap
public java.util.Map<java.lang.String,java.lang.Class<?>> getMap()
-
-