com.io7m.jpra.compiler.java

## Class PackedFieldInterfaceProcessor

- java.lang.Object
- - com.io7m.jpra.compiler.java.PackedFieldInterfaceProcessor

- All Implemented Interfaces:
    TypeIntegerMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>, TypeMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>

      public final class PackedFieldInterfaceProcessor
      extends Object
      implements TypeMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>, TypeIntegerMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>

  A type matcher that produces interface methods for packed fields.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `generatedPackedAllMethodInterface(com.squareup.javapoet.TypeSpec.Builder class_builder, com.gs.collections.api.list.ImmutableList<TPacked.FieldType> ordered)` Generate a `set` method that sets all packed fields at once.
    `static Class<?>` | `getPackedIntegerTypeForSize(BigInteger size)` Retrieve the type that should be used for the interfaces of non-normalized integers fields in packed types.
    `com.io7m.jfunctional.Unit` | `matchArray(TArray t)` Match an `array` type.
    `com.io7m.jfunctional.Unit` | `matchBooleanSet(TBooleanSet t)` Match a `boolean-set` type.
    `com.io7m.jfunctional.Unit` | `matchFloat(TFloat t)` Match a `float` type.
    `com.io7m.jfunctional.Unit` | `matchInteger(TIntegerType t)` Match an `integer` type.
    `com.io7m.jfunctional.Unit` | `matchIntegerSigned(TIntegerSigned t)` Match a `signed` type expression.
    `com.io7m.jfunctional.Unit` | `matchIntegerSignedNormalized(TIntegerSignedNormalized t)` Match an `signed-normalized` type expression.
    `com.io7m.jfunctional.Unit` | `matchIntegerUnsigned(TIntegerUnsigned t)` Match an `unsigned` type expression.
    `com.io7m.jfunctional.Unit` | `matchIntegerUnsignedNormalized(TIntegerUnsignedNormalized t)` Match an `unsigned-normalized` type expression.
    `com.io7m.jfunctional.Unit` | `matchMatrix(TMatrix t)` Match a `matrix` type.
    `com.io7m.jfunctional.Unit` | `matchPacked(TPacked t)` Match a `packed` type.
    `com.io7m.jfunctional.Unit` | `matchRecord(TRecord t)` Match a `record` type.
    `com.io7m.jfunctional.Unit` | `matchString(TString t)` Match a `string` type.
    `com.io7m.jfunctional.Unit` | `matchVector(TVector t)` Match a `vector` type.

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

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

- - ### Method Detail

    - #### getPackedIntegerTypeForSize

          public static Class<?> getPackedIntegerTypeForSize(BigInteger size)

      Retrieve the type that should be used for the interfaces of non-normalized integers fields in packed types. Generally, this is the smallest integer size larger than or equal to `int` that can hold values of the given size.
      Parameters:
        `size` - The size in bits of the integer type
      Returns:
        A type

    - #### generatedPackedAllMethodInterface

          public static void generatedPackedAllMethodInterface(com.squareup.javapoet.TypeSpec.Builder class_builder,
                                                               com.gs.collections.api.list.ImmutableList<TPacked.FieldType> ordered)

      Generate a `set` method that sets all packed fields at once.
      Parameters:
        `class_builder` - The class builder
        `ordered` - The set of fields in the type

    - #### matchArray

          public com.io7m.jfunctional.Unit matchArray(TArray t)

      Description copied from interface: `TypeMatcherType`
      Match an `array` type.
      Specified by:
        `matchArray` in interface `TypeMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type
      Returns:
        A value of `A`

    - #### matchString

          public com.io7m.jfunctional.Unit matchString(TString t)

      Description copied from interface: `TypeMatcherType`
      Match a `string` type.
      Specified by:
        `matchString` in interface `TypeMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type
      Returns:
        A value of `A`

    - #### matchBooleanSet

          public com.io7m.jfunctional.Unit matchBooleanSet(TBooleanSet t)

      Description copied from interface: `TypeMatcherType`
      Match a `boolean-set` type.
      Specified by:
        `matchBooleanSet` in interface `TypeMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type
      Returns:
        A value of `A`

    - #### matchInteger

          public com.io7m.jfunctional.Unit matchInteger(TIntegerType t)

      Description copied from interface: `TypeMatcherType`
      Match an `integer` type.
      Specified by:
        `matchInteger` in interface `TypeMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type
      Returns:
        A value of `A`

    - #### matchFloat

          public com.io7m.jfunctional.Unit matchFloat(TFloat t)

      Description copied from interface: `TypeMatcherType`
      Match a `float` type.
      Specified by:
        `matchFloat` in interface `TypeMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type
      Returns:
        A value of `A`

    - #### matchVector

          public com.io7m.jfunctional.Unit matchVector(TVector t)

      Description copied from interface: `TypeMatcherType`
      Match a `vector` type.
      Specified by:
        `matchVector` in interface `TypeMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type
      Returns:
        A value of `A`

    - #### matchMatrix

          public com.io7m.jfunctional.Unit matchMatrix(TMatrix t)

      Description copied from interface: `TypeMatcherType`
      Match a `matrix` type.
      Specified by:
        `matchMatrix` in interface `TypeMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type
      Returns:
        A value of `A`

    - #### matchRecord

          public com.io7m.jfunctional.Unit matchRecord(TRecord t)

      Description copied from interface: `TypeMatcherType`
      Match a `record` type.
      Specified by:
        `matchRecord` in interface `TypeMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type
      Returns:
        A value of `A`

    - #### matchPacked

          public com.io7m.jfunctional.Unit matchPacked(TPacked t)

      Description copied from interface: `TypeMatcherType`
      Match a `packed` type.
      Specified by:
        `matchPacked` in interface `TypeMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type
      Returns:
        A value of `A`

    - #### matchIntegerUnsigned

          public com.io7m.jfunctional.Unit matchIntegerUnsigned(TIntegerUnsigned t)

      Description copied from interface: `TypeIntegerMatcherType`
      Match an `unsigned` type expression.
      Specified by:
        `matchIntegerUnsigned` in interface `TypeIntegerMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type expression
      Returns:
        A value of `A`

    - #### matchIntegerSigned

          public com.io7m.jfunctional.Unit matchIntegerSigned(TIntegerSigned t)

      Description copied from interface: `TypeIntegerMatcherType`
      Match a `signed` type expression.
      Specified by:
        `matchIntegerSigned` in interface `TypeIntegerMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type expression
      Returns:
        A value of `A`

    - #### matchIntegerSignedNormalized

          public com.io7m.jfunctional.Unit matchIntegerSignedNormalized(TIntegerSignedNormalized t)

      Description copied from interface: `TypeIntegerMatcherType`
      Match an `signed-normalized` type expression.
      Specified by:
        `matchIntegerSignedNormalized` in interface `TypeIntegerMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type expression
      Returns:
        A value of `A`

    - #### matchIntegerUnsignedNormalized

          public com.io7m.jfunctional.Unit matchIntegerUnsignedNormalized(TIntegerUnsignedNormalized t)

      Description copied from interface: `TypeIntegerMatcherType`
      Match an `unsigned-normalized` type expression.
      Specified by:
        `matchIntegerUnsignedNormalized` in interface `TypeIntegerMatcherType<com.io7m.jfunctional.Unit,com.io7m.junreachable.UnreachableCodeException>`
      Parameters:
        `t` - The type expression
      Returns:
        A value of `A`

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