com.io7m.jpra.model.types

## Class TPacked

- java.lang.Object
- - com.io7m.jpra.model.types.TPacked

- All Implemented Interfaces:
    ModelElementType, TType, TypeUserDefinedType

      public final class TPacked
      extends Object
      implements TType, TypeUserDefinedType

  A `packed` type.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `TPacked.FieldMatcherType<A,E extends Exception>` The type of field matchers.
    `static class` | `TPacked.FieldPaddingBits` A packed padding field.
    `static interface` | `TPacked.FieldType` The type of packed fields.
    `static class` | `TPacked.FieldValue` A packed value field.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.gs.collections.api.map.ImmutableMap<FieldName,TPacked.FieldValue>` | `getFieldsByName()`
    `com.gs.collections.api.list.ImmutableList<TPacked.FieldType>` | `getFieldsInDeclarationOrder()`
    `IdentifierType` | `getIdentifier()`
    `Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>>` | `getLexicalInformation()` Fetch the lexical information for the element.
    `TypeName` | `getName()`
    `PackageContextType` | `getPackageContext()`
    `Size<SizeUnitBitsType>` | `getSizeInBits()`
    `Size<SizeUnitOctetsType>` | `getSizeInOctets()`
    `<A,E extends Exception> A` | `matchType(TypeMatcherType<A,E> m)` Accept a matcher.
    `<A,E extends Exception> A` | `matchTypeUserDefined(TypeUserDefinedMatcherType<A,E> m)` Accept a matcher.
    `static TPackedBuilderType` | `newBuilder(PackageContextType in_package, IdentifierType in_identifier, TypeName in_ident)` Construct a new mutable record builder.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### newBuilder

          public static TPackedBuilderType newBuilder(PackageContextType in_package,
                                                      IdentifierType in_identifier,
                                                      TypeName in_ident)

      Construct a new mutable record builder.
      Parameters:
        `in_package` - The package context
        `in_identifier` - The type's identifier
        `in_ident` - The type's name
      Returns:
        A new builder

    - #### getFieldsByName

          public com.gs.collections.api.map.ImmutableMap<FieldName,TPacked.FieldValue> getFieldsByName()

      Returns:
        The subset of fields that have names

    - #### getFieldsInDeclarationOrder

          public com.gs.collections.api.list.ImmutableList<TPacked.FieldType> getFieldsInDeclarationOrder()

      Returns:
        All fields in declaration order

    - #### getSizeInBits

          public Size<SizeUnitBitsType> getSizeInBits()

      Specified by:
        `getSizeInBits` in interface `TType`
      Returns:
        The size in bits

    - #### matchType

          public <A,E extends Exception> A matchType(TypeMatcherType<A,E> m)
                                              throws E extends Exception

      Description copied from interface: `TType`
      Accept a matcher.
      Specified by:
        `matchType` in interface `TType`
      Type Parameters:
        `A` - The type of returned values
        `E` - The type of raised exceptions
      Parameters:
        `m` - The matcher
      Returns:
        The value returned by `m`
      Throws:
        `E` - If `m` raises `E`
        `E extends Exception`

    - #### getLexicalInformation

          public Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>> getLexicalInformation()

      Description copied from interface: `ModelElementType`
      Fetch the lexical information for the element. This is used to localize error messages to a position in a file when referring to specific elements.
      Specified by:
        `getLexicalInformation` in interface `ModelElementType`
      Returns:
        The original lexical information, if any

    - #### getName

          public TypeName getName()

      Specified by:
        `getName` in interface `TypeUserDefinedType`
      Returns:
        The type name

    - #### getIdentifier

          public IdentifierType getIdentifier()

      Specified by:
        `getIdentifier` in interface `TypeUserDefinedType`
      Returns:
        The identifier

    - #### getPackageContext

          public PackageContextType getPackageContext()

      Specified by:
        `getPackageContext` in interface `TypeUserDefinedType`
      Returns:
        The package context

    - #### matchTypeUserDefined

          public <A,E extends Exception> A matchTypeUserDefined(TypeUserDefinedMatcherType<A,E> m)
                                                         throws E extends Exception

      Description copied from interface: `TypeUserDefinedType`
      Accept a matcher.
      Specified by:
        `matchTypeUserDefined` in interface `TypeUserDefinedType`
      Type Parameters:
        `A` - The type of returned values
        `E` - The type of raised exceptions
      Parameters:
        `m` - The matcher
      Returns:
        The value returned by `m`
      Throws:
        `E` - If `m` raises `E`
        `E extends Exception`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getSizeInOctets

          public Size<SizeUnitOctetsType> getSizeInOctets()

      Returns:
        The size in octets of the packed type

Copyright © 2015 <code@io7m.com> http://io7m.com