public class ImplicitTypeAnnotationReader
extends java.lang.Object
ImplicitType
annotations from classes. The first ImplicitType
annotation found for a class is used. If ImplicitType is already defined for
a class type, then it is ignored.Constructor and Description |
---|
ImplicitTypeAnnotationReader(TypeTranslatorMap typeTranslatorMap,
java.lang.reflect.Field field)
Constructs for classes that may contain the annotation.
|
Modifier and Type | Method and Description |
---|---|
void |
install()
Reads
ImplicitType annotations from sources and adds them to
type map if they are not already defined. |
protected void |
updateMap(ImplicitType typeAnnotation)
Adds a new instance of
TypeTranslator to type translator map if not already
defined for Field type. |
public ImplicitTypeAnnotationReader(TypeTranslatorMap typeTranslatorMap, java.lang.reflect.Field field)
typeTranslatorMap
- a class that implements TypeTranslatorMap
; typically
Database
and Table
field
- field that contains ImplicitType
annotationpublic void install() throws java.lang.Exception
ImplicitType
annotations from sources and adds them to
type map if they are not already defined.java.lang.Exception
- if error creating TypeTranslator
protected void updateMap(ImplicitType typeAnnotation) throws java.lang.Exception
TypeTranslator
to type translator map if not already
defined for Field type.typeAnnotation
- definition of type to addjava.lang.Exception
- if error creating new instance of TypeTranslator