|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sormula.annotation.ExplicitTypeAnnotationReader
public class ExplicitTypeAnnotationReader
Reads ExplicitType
annotations from classes. The first ExplicitType
annotation found for a class is used. If ExplicitType is already defined for
a class type, then it is ignored.
Constructor Summary | |
---|---|
ExplicitTypeAnnotationReader(TypeTranslatorMap typeTranslatorMap,
java.lang.Class<?>... sources)
Constructs for classes that may contain the annotation. |
Method Summary | |
---|---|
void |
install()
Reads ExplicitType annotations from sources and adds them to
type map if they are not already defined. |
protected void |
updateMap(ExplicitType typeAnnotation)
Adds a new instance of TypeTranslator to type translator map if not already
defined for ExplicitType.type() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExplicitTypeAnnotationReader(TypeTranslatorMap typeTranslatorMap, java.lang.Class<?>... sources)
typeTranslatorMap
- a class that implements TypeTranslatorMap
; typically
Database
and Table
sources
- classes that contain ExplicitType
or ExplicitTypes
annotationsMethod Detail |
---|
public void install() throws java.lang.Exception
ExplicitType
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(ExplicitType typeAnnotation) throws java.lang.Exception
TypeTranslator
to type translator map if not already
defined for ExplicitType.type()
.
Versions prior to 1.9.2 did not allow type translators to be replaced. Starting with
version 1.9.2 and 2.3.2, this method will replace existing type translator with new
one ExplicitType.translator()
is different from existing.
typeAnnotation
- definition of type to add
java.lang.Exception
- if error creating new instance of TypeTranslator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |