|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectecologylab.generic.Debug
ecologylab.xml.types.scalar.TypeRegistry
public class TypeRegistry
This class implements a registry of instances of Type. Each key in this registry is the name of the Java type that underlies the Type, and not the name of the subclass of Type, itself.
Thus, for example, the key for the type translated by IntType is "int", not "IntType". It must be this way, because automatic translation is performed based on Field declarations, and the Field declarations do not know about these Types, only about the underlying Java types.
| Constructor Summary | |
|---|---|
TypeRegistry()
|
|
| Method Summary | ||
|---|---|---|
static boolean |
contains(java.lang.Class thatClass)
Check to see if we have a Type corresponding to the Class, by using its name. |
|
static boolean |
contains(java.lang.String className)
Check to see if we have a Type corresponding to the Class name. |
|
static
|
getType(java.lang.Class<U> thatClass)
Get the Scalar Type corresponding to the Class, by using its name. |
|
static ScalarType |
getType(java.lang.reflect.Field field)
Get the Type corresponding to the Field, by using the Field's Class. |
|
static ScalarType |
getType(java.lang.String className)
Get the Scalar Type corresponding to the Class name. |
|
static boolean |
register(java.lang.Class<? extends ScalarType> typeClass)
Enter this type in the registry, which is a map in which the Type's Class object's fully qualified named is used as a key. |
|
| Methods inherited from class ecologylab.generic.Debug |
|---|
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TypeRegistry()
| Method Detail |
|---|
public static boolean register(java.lang.Class<? extends ScalarType> typeClass)
public static ScalarType getType(java.lang.reflect.Field field)
field -
public static <U> ScalarType<U> getType(java.lang.Class<U> thatClass)
thatClass -
public static final ScalarType getType(java.lang.String className)
className -
public static boolean contains(java.lang.Class thatClass)
thatClass -
public static boolean contains(java.lang.String className)
className -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||