public class Type extends StorableObject
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY_DESCRIPTION
The dictionary key for the description text.
|
static java.lang.String |
KEY_INITIALIZER
The dictionary key for the initializer class name.
|
static java.lang.String |
KEY_PROPERTY
The dictionary key for the property array.
|
static Path |
PATH
The connection object storage path.
|
dict, KEY_CLASSNAME, KEY_ID, KEY_TYPE
Constructor and Description |
---|
Type(java.lang.String id,
java.lang.String type,
Dict dict)
Creates a new type mapping from a serialized representation.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.reflect.Constructor |
constructor(Storage storage,
Dict dict)
Returns a constructor for creating a Java object instance.
|
java.lang.String |
description()
Returns the type description.
|
static Type |
find(Storage storage,
java.lang.String id)
Searches for a specific type in the storage.
|
static Type[] |
findAll(Storage storage)
Searches for all types in the storage.
|
protected void |
init()
Initializes this type mapping by registering it via the
methods in the Storage class.
|
java.lang.Class |
initializer()
Returns the type initializer class.
|
protected static java.lang.Class |
loadClass(java.lang.String className,
java.lang.String objId)
Loads and returns a specified class.
|
Type |
parentType(Storage storage)
Searches for the parent type in the type hierarchy.
|
Array |
properties()
Returns an array of type properties.
|
public static final java.lang.String KEY_DESCRIPTION
public static final java.lang.String KEY_INITIALIZER
public static final java.lang.String KEY_PROPERTY
public static final Path PATH
public Type(java.lang.String id, java.lang.String type, Dict dict)
id
- the object identifiertype
- the object type namedict
- the serialized representationpublic static Type find(Storage storage, java.lang.String id)
storage
- the storage to search inid
- the type identifierpublic static Type[] findAll(Storage storage)
storage
- the storage to search inpublic static java.lang.reflect.Constructor constructor(Storage storage, Dict dict)
storage
- the storage to use for type lookupsdict
- the dictionary dataprotected static java.lang.Class loadClass(java.lang.String className, java.lang.String objId)
className
- the fully qualified class name to loadobjId
- the object identifier for loggingprotected void init() throws StorageException
init
in class StorableObject
StorageException
- if the initialization failedpublic java.lang.String description()
public java.lang.Class initializer()
public Array properties()
public Type parentType(Storage storage)
storage
- the storage to search in