- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<String,Object>
-
- org.refcodes.serial.Schema
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,Object>
,org.refcodes.mixin.AliasAccessor
,org.refcodes.mixin.ChildrenAccessor<Schema[]>
,org.refcodes.mixin.DescriptionAccessor
,org.refcodes.mixin.LengthAccessor
,org.refcodes.mixin.TypeAccessor
,org.refcodes.mixin.ValueAccessor<Sequence>
public class Schema extends HashMap<String,Object> implements Map<String,Object>, org.refcodes.mixin.ChildrenAccessor<Schema[]>, org.refcodes.mixin.TypeAccessor, org.refcodes.mixin.AliasAccessor, org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.DescriptionAccessor, org.refcodes.mixin.ValueAccessor<Sequence>
The purpose of aSchema
is automatically generate documentation of serial data. It describes a portion of defined data such as aAllocSectionDecoratorSegment
and its components such asSegment
orSection
. A type supporting its schema representation- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.AliasAccessor
org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ChildrenAccessor
org.refcodes.mixin.ChildrenAccessor.ChildrenBuilder<T extends Object,B extends org.refcodes.mixin.ChildrenAccessor.ChildrenBuilder<T,B>>, org.refcodes.mixin.ChildrenAccessor.ChildrenMutator<T extends Object>, org.refcodes.mixin.ChildrenAccessor.ChildrenProperty<T extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.DescriptionAccessor
org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B extends org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B>>, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator, org.refcodes.mixin.DescriptionAccessor.DescriptionProperty
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.LengthAccessor
org.refcodes.mixin.LengthAccessor.LengthBuilder<B extends org.refcodes.mixin.LengthAccessor.LengthBuilder<B>>, org.refcodes.mixin.LengthAccessor.LengthMutator, org.refcodes.mixin.LengthAccessor.LengthProperty
-
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K extends Object,V extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor
org.refcodes.mixin.TypeAccessor.TypeBuilder<T extends Object,B extends org.refcodes.mixin.TypeAccessor.TypeBuilder<T,B>>, org.refcodes.mixin.TypeAccessor.TypeMutator<T extends Object>, org.refcodes.mixin.TypeAccessor.TypeProperty<T extends Object>
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ValueAccessor
org.refcodes.mixin.ValueAccessor.ValueBuilder<V extends Object,B extends org.refcodes.mixin.ValueAccessor.ValueBuilder<V,B>>, org.refcodes.mixin.ValueAccessor.ValueMutator<V extends Object>, org.refcodes.mixin.ValueAccessor.ValueProperty<V extends Object>
-
-
Constructor Summary
Constructors Constructor Description Schema(String aAlias, int aLength, String aDescription, Class<?> aType)
Constructs aSchema
with the provided arguments.Schema(String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.Schema(String aAlias, String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.Schema(String aAlias, Sequence aValue, int aLength, String aDescription, Class<?> aType)
Constructs aSchema
with the provided arguments.Schema(String aAlias, Sequence aValue, int aLength, String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.Schema(String aAlias, Sequence aValue, String aVerbose, int aLength, String aDescription, Class<?> aType)
Constructs aSchema
with the provided arguments.Schema(String aAlias, Sequence aValue, String aVerbose, int aLength, String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.Schema(Schema aSchema)
Schema(Schema aSchema, Schema... aChildren)
Schema(Sequence aValue, int aLength, String aDescription, Class<?> aType)
Constructs aSchema
with the provided arguments.Schema(Sequence aValue, int aLength, String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.Schema(Sequence aValue, String aVerbose, int aLength, String aDescription, Class<?> aType)
Constructs aSchema
with the provided arguments.Schema(Sequence aValue, String aVerbose, int aLength, String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlias()
Schema[]
getChildren()
String
getDescription()
int
getLength()
Class<?>
getType()
Sequence
getValue()
String
getVerboseValue()
Retrieves the verbose representation of the value.String
toString()
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Field Detail
-
VERBOSE
public static final String VERBOSE
- See Also:
- Constant Field Values
-
LENGTH
public static final String LENGTH
- See Also:
- Constant Field Values
-
VALUE
public static final String VALUE
- See Also:
- Constant Field Values
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
DESCRIPTION
public static final String DESCRIPTION
- See Also:
- Constant Field Values
-
ALIAS
public static final String ALIAS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Schema
public Schema(String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.
-
Schema
public Schema(Sequence aValue, int aLength, String aDescription, Class<?> aType)
Constructs aSchema
with the provided arguments.
-
Schema
public Schema(Sequence aValue, String aVerbose, int aLength, String aDescription, Class<?> aType)
Constructs aSchema
with the provided arguments.- Parameters:
aValue
- The content of theSchema
providing type.aVerbose
- The verbose representation of the value.aLength
- The length of theSchema
providing type.aDescription
- The description of the schema described by theSchema
providing type.aType
- The type providing the thisSchema
instance.
-
Schema
public Schema(Sequence aValue, int aLength, String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.- Parameters:
aValue
- The content of theSchema
providing type.aLength
- The length of theSchema
providing type.aDescription
- The description of the schema described by theSchema
providing type.aType
- The type providing the thisSchema
instance.aChildren
- The children'sSchema
descriptions representing part of theSchema
providing type.
-
Schema
public Schema(Sequence aValue, String aVerbose, int aLength, String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.- Parameters:
aValue
- The content of theSchema
providing type.aVerbose
- The verbose representation of the value.aLength
- The length of theSchema
providing type.aDescription
- The description of the schema described by theSchema
providing type.aType
- The type providing the thisSchema
instance.aChildren
- The children'sSchema
descriptions representing part of theSchema
providing type.
-
Schema
public Schema(String aAlias, String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.- Parameters:
aAlias
- The alias (name) of the schema described by theSchema
providing type.aDescription
- The description of the schema described by theSchema
providing type.aType
- The type providing the thisSchema
instance.aChildren
- The children'sSchema
descriptions representing part of theSchema
providing type.
-
Schema
public Schema(String aAlias, int aLength, String aDescription, Class<?> aType)
Constructs aSchema
with the provided arguments.
-
Schema
public Schema(String aAlias, Sequence aValue, int aLength, String aDescription, Class<?> aType)
Constructs aSchema
with the provided arguments.- Parameters:
aAlias
- The alias (name) of the schema described by theSchema
providing type.aValue
- The content of theSchema
providing type.aLength
- The length of theSchema
providing type.aDescription
- The description of the schema described by theSchema
providing type.aType
- The type providing the thisSchema
instance.
-
Schema
public Schema(String aAlias, Sequence aValue, String aVerbose, int aLength, String aDescription, Class<?> aType)
Constructs aSchema
with the provided arguments.- Parameters:
aAlias
- The alias (name) of the schema described by theSchema
providing type.aValue
- The content of theSchema
providing type.aVerbose
- The verbose representation of the value.aLength
- The length of theSchema
providing type.aDescription
- The description of the schema described by theSchema
providing type.aType
- The type providing the thisSchema
instance.
-
Schema
public Schema(String aAlias, Sequence aValue, int aLength, String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.- Parameters:
aAlias
- The alias (name) of the schema described by theSchema
providing type.aValue
- The content of theSchema
providing type.aLength
- The length of theSchema
providing type.aDescription
- The description of the schema described by theSchema
providing type.aType
- The type providing the thisSchema
instance.aChildren
- The children'sSchema
descriptions representing part of theSchema
providing type.
-
Schema
public Schema(String aAlias, Sequence aValue, String aVerbose, int aLength, String aDescription, Class<?> aType, Schema... aChildren)
Constructs aSchema
with the provided arguments.- Parameters:
aAlias
- The alias (name) of the schema described by theSchema
providing type.aValue
- The content of theSchema
providing type.aVerbose
- The verbose representation of the value.aLength
- The length of theSchema
providing type.aDescription
- The description of the schema described by theSchema
providing type.aType
- The type providing the thisSchema
instance.aChildren
- The children'sSchema
descriptions representing part of theSchema
providing type.
-
Schema
public Schema(Schema aSchema)
- Parameters:
aSchema
- TheSchema
from which to copy the attributes.
-
-
Method Detail
-
getValue
public Sequence getValue()
- Specified by:
getValue
in interfaceorg.refcodes.mixin.ValueAccessor<Sequence>
-
getVerboseValue
public String getVerboseValue()
Retrieves the verbose representation of the value.- Returns:
- The human readable value representation.
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceorg.refcodes.mixin.DescriptionAccessor
-
getLength
public int getLength()
- Specified by:
getLength
in interfaceorg.refcodes.mixin.LengthAccessor
-
getAlias
public String getAlias()
- Specified by:
getAlias
in interfaceorg.refcodes.mixin.AliasAccessor
-
getType
public Class<?> getType()
- Specified by:
getType
in interfaceorg.refcodes.mixin.TypeAccessor
-
getChildren
public Schema[] getChildren()
- Specified by:
getChildren
in interfaceorg.refcodes.mixin.ChildrenAccessor<Schema[]>
-
toString
public String toString()
- Overrides:
toString
in classAbstractMap<String,Object>
-
-