public class KeyV3<I extends Iced,S extends KeyV3<I,S,K>,K extends Keyed> extends SchemaV3<I,KeyV3<I,S,K>>
Base Schema Class for Keys. Note that Key schemas are generally typed by the type of object they point to (e.g., the front something like a Key).
The type parameters are a bit subtle, because we have several schemas that map to Key,
by type. We want to be parameterized by the type of Keyed that we point to, but the
Iced type we pass up to Schema must be Iced, so that a lookup for a Schema for Key
Modifier and Type | Class and Description |
---|---|
static class |
KeyV3.AssemblyKeyV3 |
static class |
KeyV3.FrameKeyV3 |
static class |
KeyV3.GridKeyV3 |
static class |
KeyV3.JobKeyV3 |
static class |
KeyV3.ModelKeyV3<T extends Model> |
static class |
KeyV3.PartialDependenceKeyV3 |
SchemaV3.Meta
Modifier and Type | Field and Description |
---|---|
java.lang.String |
name |
java.lang.String |
type |
java.lang.String |
URL |
Modifier and Type | Method and Description |
---|---|
I |
createImpl()
Create an appropriate implementation object and any child objects but does not fill them.
|
S |
fillFromImpl(Iced i)
Fill this Schema from the given implementation object.
|
java.lang.Class<? extends Keyed> |
getKeyedClass() |
static java.lang.Class<? extends Keyed> |
getKeyedClass(java.lang.Class<? extends KeyV3> clz) |
java.lang.String |
getKeyedClassType() |
static java.lang.String |
getKeyedClassType(java.lang.Class<? extends KeyV3> clz) |
Key<K> |
key() |
static KeyV3 |
make(java.lang.Class<? extends KeyV3> clz,
Key key) |
static KeyV3 |
make(Key key)
TODO: figure out the right KeyV1 class from the Key, so the type is set properly.
|
java.lang.String |
toString() |
createAndFillImpl, extractVersionFromSchemaName, fillFromImpl, fillFromImpl, fillFromParms, fillFromParms, fillImpl, fillImpl, getImplClass, getImplClass, getSchemaName, getSchemaType, getSchemaVersion, init_meta, markdown, markdown, newInstance, newInstance, setField, setSchemaType_doNotCall
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonString, write, writeExternal
@API(help="Name (string representation) for this Key.", direction=INOUT) public java.lang.String name
@API(help="Name (string representation) for the type of Keyed this Key points to.", direction=INOUT) public java.lang.String type
public KeyV3()
public KeyV3(Key key)
public static KeyV3 make(Key key)
public S fillFromImpl(Iced i)
Schema
public static java.lang.Class<? extends Keyed> getKeyedClass(java.lang.Class<? extends KeyV3> clz)
public java.lang.Class<? extends Keyed> getKeyedClass()
public static java.lang.String getKeyedClassType(java.lang.Class<? extends KeyV3> clz)
public java.lang.String getKeyedClassType()
public I createImpl()
Schema
For objects without children this method does all the required work. For objects with children the subclass will need to override, e.g. by calling super.createImpl() and then calling createImpl() on its children.
Note that impl objects for schemas which override this method don't need to have a default constructor (e.g., a Keyed object constructor can still create and set the Key), but they must not fill any fields which can be filled later from the schema.
TODO: We could handle the common case of children with the same field names here by finding all of our fields that are themselves Schemas.
public java.lang.String toString()
toString
in class java.lang.Object