com.io7m.jpra.model.type_declarations

## Class TypeDeclPacked<I,T>

- java.lang.Object
- - com.io7m.jpra.model.type_declarations.TypeDeclPacked<I,T>

- Type Parameters:
    `I` - The type of identifiers
    `T` - The type of type information
  All Implemented Interfaces:
    ModelElementType, StatementType<I,T>, TypeDeclType<I,T>

      @Immutable
      public final class TypeDeclPacked<I,T>
      extends Object
      implements TypeDeclType<I,T>

  A `packed` type declaration.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TypeDeclPacked(I in_identifier, T in_type, com.gs.collections.api.map.ImmutableMap<FieldName,PackedFieldDeclValue<I,T>> in_fields_name, TypeName in_name, com.gs.collections.api.list.ImmutableList<PackedFieldDeclType<I,T>> in_fields_order)` Construct a type declaration.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.gs.collections.api.map.ImmutableMap<FieldName,PackedFieldDeclValue<I,T>>` | `getFieldsByName()`
    `com.gs.collections.api.list.ImmutableList<PackedFieldDeclType<I,T>>` | `getFieldsInDeclarationOrder()`
    `I` | `getIdentifier()`
    `Optional<com.io7m.jlexing.core.ImmutableLexicalPositionType<Path>>` | `getLexicalInformation()` Fetch the lexical information for the element.
    `TypeName` | `getName()`
    `T` | `getType()`
    `<A,E extends Exception> A` | `matchStatement(StatementMatcherType<I,T,A,E> m)` Accept a matcher.
    `<A,E extends Exception> A` | `matchTypeDeclaration(TypeDeclMatcherType<I,T,A,E> m)` Accept a type declaration matcher.

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

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

- - ### Constructor Detail

    - #### TypeDeclPacked

          public TypeDeclPacked(I in_identifier,
                                T in_type,
                                com.gs.collections.api.map.ImmutableMap<FieldName,PackedFieldDeclValue<I,T>> in_fields_name,
                                TypeName in_name,
                                com.gs.collections.api.list.ImmutableList<PackedFieldDeclType<I,T>> in_fields_order)

      Construct a type declaration.
      Parameters:
        `in_identifier` - The identifier
        `in_type` - The type
        `in_fields_name` - The fields by name
        `in_name` - The type name
        `in_fields_order` - The fields in declaration order

  - ### Method Detail

    - #### getName

          public TypeName getName()

      Specified by:
        `getName` in interface `TypeDeclType<I,T>`
      Returns:
        The type name

    - #### matchTypeDeclaration

          public <A,E extends Exception> A matchTypeDeclaration(TypeDeclMatcherType<I,T,A,E> m)
                                                         throws E extends Exception

      Description copied from interface: `TypeDeclType`
      Accept a type declaration matcher.
      Specified by:
        `matchTypeDeclaration` in interface `TypeDeclType<I,T>`
      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

    - #### getType

          public T getType()

      Specified by:
        `getType` in interface `TypeDeclType<I,T>`
      Returns:
        The type

    - #### getIdentifier

          public I getIdentifier()

      Specified by:
        `getIdentifier` in interface `TypeDeclType<I,T>`
      Returns:
        The identifier

    - #### matchStatement

          public <A,E extends Exception> A matchStatement(StatementMatcherType<I,T,A,E> m)
                                                   throws E extends Exception

      Description copied from interface: `StatementType`
      Accept a matcher.
      Specified by:
        `matchStatement` in interface `StatementType<I,T>`
      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`

    - #### getFieldsInDeclarationOrder

          public com.gs.collections.api.list.ImmutableList<PackedFieldDeclType<I,T>> getFieldsInDeclarationOrder()

      Returns:
        The fields in declaration order

    - #### getFieldsByName

          public com.gs.collections.api.map.ImmutableMap<FieldName,PackedFieldDeclValue<I,T>> getFieldsByName()

      Returns:
        The fields by name

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