Class SerialSchema

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
org.refcodes.mixin.AbstractSchema
org.refcodes.serial.SerialSchema
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, org.refcodes.mixin.AliasAccessor, org.refcodes.mixin.ChildrenAccessor<org.refcodes.mixin.Schema[]>, org.refcodes.mixin.CommentAccessor, org.refcodes.mixin.DescriptionAccessor, org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.Schema, org.refcodes.mixin.TypeAccessor, org.refcodes.mixin.ValueAccessor<Sequence>

public class SerialSchema extends org.refcodes.mixin.AbstractSchema implements org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.DescriptionAccessor, org.refcodes.mixin.ValueAccessor<Sequence>, org.refcodes.mixin.CommentAccessor
The purpose of a SerialSchema is to automatically outline and generate documentation of serial data (structures).
See Also:
  • 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.CommentAccessor

    org.refcodes.mixin.CommentAccessor.CommentBuilder<B extends org.refcodes.mixin.CommentAccessor.CommentBuilder<B>>, org.refcodes.mixin.CommentAccessor.CommentMutator, org.refcodes.mixin.CommentAccessor.CommentProperty

    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>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

    Fields inherited from interface org.refcodes.mixin.Schema

    ALIAS, DESCRIPTION, KEY, TYPE, VALUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    SerialSchema(Class<?> aType, String aDescription, org.refcodes.mixin.Schema... aChildren)
    SerialSchema(Class<?> aType, Sequence aValue, int aLength, String aDescription, org.refcodes.mixin.Schema... aChildren)
    Constructs a SerialSchema with the provided arguments.
    SerialSchema(Class<?> aType, Sequence aValue, String aVerbose, String aDescription, int aLength)
    Constructs a SerialSchema with the provided arguments.
    SerialSchema(String aAlias, Class<?> aType, String aDescription, int aLength)
    SerialSchema(String aAlias, Class<?> aType, Sequence aValue, int aLength, String aVerbose, String aDescription, org.refcodes.mixin.Schema... aChildren)
    Constructs a SerialSchema with the provided arguments.
    SerialSchema(String aAlias, Class<?> aType, Sequence aValue, int aLength, String aDescription, org.refcodes.mixin.Schema... aChildren)
    Constructs a SerialSchema with the provided arguments.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the verbose representation of the value.
    int
    protected String
    toString(Object aValue)

    Methods inherited from class org.refcodes.mixin.AbstractSchema

    getChildren, toString

    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 org.refcodes.mixin.Schema

    getAlias, getDescription, getType

    Methods inherited from interface org.refcodes.mixin.ValueAccessor

    getValueOr
  • Field Details

  • Constructor Details

    • SerialSchema

      public SerialSchema(Class<?> aType, String aDescription, org.refcodes.mixin.Schema... aChildren)
    • SerialSchema

      public SerialSchema(String aAlias, Class<?> aType, String aDescription, int aLength)
    • SerialSchema

      public SerialSchema(Class<?> aType, Sequence aValue, String aVerbose, String aDescription, int aLength)
      Constructs a SerialSchema with the provided arguments.
      Parameters:
      aType - The type providing the this SerialSchema instance.
      aValue - The content of the SerialSchema providing type.
      aVerbose - The verbose representation of the value.
      aDescription - The description of the schema described by the SerialSchema providing type.
      aLength - The length of the SerialSchema providing type.
    • SerialSchema

      public SerialSchema(Class<?> aType, Sequence aValue, int aLength, String aDescription, org.refcodes.mixin.Schema... aChildren)
      Constructs a SerialSchema with the provided arguments.
      Parameters:
      aType - The type providing the this SerialSchema instance.
      aValue - The content of the SerialSchema providing type.
      aLength - The length of the SerialSchema providing type.
      aDescription - The description of the schema described by the SerialSchema providing type.
      aChildren - The children's SerialSchema descriptions representing part of the SerialSchema providing type.
    • SerialSchema

      public SerialSchema(String aAlias, Class<?> aType, Sequence aValue, int aLength, String aDescription, org.refcodes.mixin.Schema... aChildren)
      Constructs a SerialSchema with the provided arguments.
      Parameters:
      aAlias - The alias (name) of the schema described by the SerialSchema providing type.
      aType - The type providing the this SerialSchema instance.
      aValue - The content of the SerialSchema providing type.
      aLength - The length of the SerialSchema providing type.
      aDescription - The description of the schema described by the SerialSchema providing type.
      aChildren - The children's SerialSchema descriptions representing part of the SerialSchema providing type.
    • SerialSchema

      public SerialSchema(String aAlias, Class<?> aType, Sequence aValue, int aLength, String aVerbose, String aDescription, org.refcodes.mixin.Schema... aChildren)
      Constructs a SerialSchema with the provided arguments.
      Parameters:
      aAlias - The alias (name) of the schema described by the SerialSchema providing type.
      aType - The type providing the this SerialSchema instance.
      aValue - The content of the SerialSchema providing type.
      aLength - The length of the SerialSchema providing type.
      aVerbose - The verbose representation of the value.
      aDescription - The description of the schema described by the SerialSchema providing type.
      aChildren - The children's SerialSchema descriptions representing part of the SerialSchema providing type.
  • Method Details

    • getLength

      public int getLength()
      Specified by:
      getLength in interface org.refcodes.mixin.LengthAccessor
    • getValue

      public Sequence getValue()
      Specified by:
      getValue in interface org.refcodes.mixin.ValueAccessor<Sequence>
    • getComment

      public String getComment()
      Retrieves the verbose representation of the value.
      Specified by:
      getComment in interface org.refcodes.mixin.CommentAccessor
      Returns:
      The human readable value representation.
    • toString

      protected String toString(Object aValue)
      Overrides:
      toString in class org.refcodes.mixin.AbstractSchema