|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdsto.dfc.databeans.TypeRegistry
public final class TypeRegistry
The global registry of known data object types. Every type has a
unique logical name, which does NOT necessarily correspond to its
Java class name (eg "person", "key"). This class maintains a
mapping from logical type names to
TypeInfo objects that describe them.
This class also provides a mapping from Java class names to type
names, allowing type info to be easily attached to POJO-based data
objects (eg those derived from
SimpleDataObject or
JavaDataBean).
TypeInfo| Method Summary | |
|---|---|
static TypeInfo |
getPropertyInfo(String type,
String property)
|
static TypeInfo |
getTypeInfo(String type)
Peek at the type info (if any) for a given type. |
static TypeInfo |
peekTypeInfo(Class classType)
Shortcut to peek for type info associated with a class. |
static TypeInfo |
peekTypeInfo(String typeName)
Peek at the type info (if any) for a given type. |
static TypeInfo |
register(String type,
Class valueClass)
Shortcut to register type info against a Java class. |
static void |
register(String name,
TypeInfo info)
Register type info. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static TypeInfo register(String type,
Class valueClass)
type - The type name.valueClass - The value class.
register(String,TypeInfo),
peekTypeInfo(Class)
public static void register(String name,
TypeInfo info)
throws IllegalArgumentException
info - The new info.
IllegalArgumentException - if an attempt is made to
register a different set of info for an existing type.peekTypeInfo(String)public static TypeInfo peekTypeInfo(String typeName)
typeName - The name of the type.
getTypeInfo(String)
public static TypeInfo getTypeInfo(String type)
throws IllegalArgumentException
type - The name of the type.
IllegalArgumentException - if type is not defined.peekTypeInfo(String)public static TypeInfo peekTypeInfo(Class classType)
public static TypeInfo getPropertyInfo(String type,
String property)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||