Interface FieldCreate


  • public interface FieldCreate
    Interface for creating introspection interfaces.
    Author:
    mrk
    • Method Detail

      • createFieldBuilder

        FieldBuilder createFieldBuilder()
        Create a new instance of in-line Field builder.
        Returns:
        a new instance of a FieldBuilder
      • createScalar

        Scalar createScalar​(ScalarType scalarType)
        Create a ScalarField.
        Parameters:
        scalarType - the scalar type
        Returns:
        a Scalar interface for the newly created object
        Throws:
        IllegalArgumentException - if an illegal type is specified
      • createBoundedString

        BoundedString createBoundedString​(int maxLength)
        Create a BoundedString.
        Parameters:
        maxLength - the maximum string length
        Returns:
        a BoundedScalar interface for the newly created object
        Throws:
        IllegalArgumentException - if maxLength <= 0
      • createScalarArray

        ScalarArray createScalarArray​(ScalarType elementType)
        Create an Array field, variable size array
        Parameters:
        elementType - the scalarType for array elements
        Returns:
        an Array interface for the newly created object
      • createFixedScalarArray

        ScalarArray createFixedScalarArray​(ScalarType elementType,
                                           int size)
        Create an Array field, fixed size array.
        Parameters:
        elementType - The scalarType for array elements
        size - the fixed array size
        Returns:
        an Array interface for the newly created object
      • createBoundedScalarArray

        ScalarArray createBoundedScalarArray​(ScalarType elementType,
                                             int bound)
        Create an Array field, bounded size array.
        Parameters:
        elementType - The scalarType for array elements
        bound - the array maximum capacity (bound)
        Returns:
        an Array interface for the newly created object
      • createStructureArray

        StructureArray createStructureArray​(Structure elementStructure)
        Create an Array field that is has element type Structure
        Parameters:
        elementStructure - the Structure for each array element
        Returns:
        an Array interface for the newly created object
      • createUnionArray

        UnionArray createUnionArray​(Union elementUnion)
        Create an Array field that is has element type Union
        Parameters:
        elementUnion - the Union for each array element
        Returns:
        an Array interface for the newly created object
      • createVariantUnionArray

        UnionArray createVariantUnionArray()
        Create a variant UnionArray (aka any type) field.
        Returns:
        a UnionArray interface for the newly created object
      • createStructure

        Structure createStructure​(String[] fieldNames,
                                  Field[] fields)
        Create a Structure field.
        Parameters:
        fieldNames - the array of field names for the structure
        fields - the array of fields for the structure
        Returns:
        a Structure interface for the newly created object
      • createStructure

        Structure createStructure​(String id,
                                  String[] fieldNames,
                                  Field[] fields)
        Create a Structure field with an identification.
        Parameters:
        id - the identification string for the structure
        fieldNames - the array of field names for the structure
        fields - the array of fields for the structure
        Returns:
        a Structure interface for the newly created object
      • appendField

        Structure appendField​(Structure structure,
                              String fieldName,
                              Field field)
        Append a field to a structure.
        Parameters:
        structure - the structure to which the field is appended
        fieldName - the name for the appended field
        field - the appended field
        Returns:
        The new structure
      • appendFields

        Structure appendFields​(Structure structure,
                               String[] fieldNames,
                               Field[] fields)
        Append fields to a structure.
        Parameters:
        structure - the structure to which the fields are appended
        fieldNames - the names for the appended fields
        fields - the appended fields
        Returns:
        the new structure
      • createStructure

        Structure createStructure​(Structure structToClone)
        Create a Structure field.
        Parameters:
        structToClone - the structure to clone
        Returns:
        a Structure interface for the newly created object
      • createVariantUnion

        Union createVariantUnion()
        Create a variant Union (aka any type) field.
        Returns:
        a Union interface for the newly created object
      • createUnion

        Union createUnion​(String[] fieldNames,
                          Field[] fields)
        Create an Union field.
        Parameters:
        fieldNames - the array of field names for the union
        fields - the array of fields for the union
        Returns:
        a Union interface for the newly created object
      • createUnion

        Union createUnion​(String id,
                          String[] fieldNames,
                          Field[] fields)
        Create an Union field with an identification.
        Parameters:
        id - the identification string for the union
        fieldNames - the array of field names for the union
        fields - the array of fields for the union
        Returns:
        a Union interface for the newly created object
      • deserialize

        Field deserialize​(ByteBuffer buffer,
                          DeserializableControl control)
        Deserialize Field instance from given byte buffer
        Parameters:
        buffer - the buffer containing serialized Field instance
        control - the deserialization control instance
        Returns:
        a deserialized Field instance