Class SerialSchema

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

public class SerialSchema extends org.refcodes.mixin.AbstractSchema<SerialSchema> implements org.refcodes.mixin.AliasAccessor, org.refcodes.mixin.LengthAccessor, org.refcodes.mixin.DescriptionAccessor, org.refcodes.mixin.ValueAccessor<Sequence>
The purpose of a SerialSchema is automatically generate documentation of serial data. It describes a portion of defined data such as a AllocSectionDecoratorSegment and its components such as Segment or Section. A type supporting its schema representation
See Also:
  • Field Details

  • Constructor Details

    • SerialSchema

      public SerialSchema(Class<?> aType, String aDescription, SerialSchema... aChildren)
      Constructs a SerialSchema with the provided arguments.
      Parameters:
      aType - The type providing the this SerialSchema instance.
      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(Class<?> aType, String aDescription, Sequence aValue, int aLength)
      Constructs a SerialSchema with the provided arguments.
      Parameters:
      aType - The type providing the this SerialSchema instance.
      aDescription - The description of the schema described by the SerialSchema providing type.
      aValue - The content of the SerialSchema providing type.
      aLength - The length of the SerialSchema providing type.
    • SerialSchema

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

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

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

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

      public SerialSchema(Class<?> aType, String aDescription, String aAlias, int aLength)
      Constructs a SerialSchema with the provided arguments.
      Parameters:
      aType - The type providing the this SerialSchema instance.
      aDescription - The description of the schema described by the SerialSchema providing type.
      aAlias - The alias (name) of the schema described by the SerialSchema providing type.
      aLength - The length of the SerialSchema providing type.
    • SerialSchema

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

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

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

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

      public SerialSchema(SerialSchema aSchema)
      Constructs a SerialSchema with the properties of the provided SerialSchema ("copy constructor"),.
      Parameters:
      aSchema - The SerialSchema from which to copy the attributes.
    • SerialSchema

      public SerialSchema(SerialSchema aSchema, SerialSchema... aChildren)
      Constructs a SerialSchema with the properties of the provided SerialSchema ("copy constructor"),.
      Parameters:
      aSchema - The SerialSchema from which to copy the attributes.
      aChildren - The children's SerialSchema descriptions representing part of the SerialSchema providing type.
  • Method Details

    • getValue

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

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

      public String getVerbose()
      Retrieves the verbose representation of the value.
      Returns:
      The human readable value representation.
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.refcodes.mixin.DescriptionAccessor
    • getAlias

      public String getAlias()
      Specified by:
      getAlias in interface org.refcodes.mixin.AliasAccessor
    • toString

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