com.io7m.jpra.compiler.java

## Class JPRAJavaGenerator

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

- All Implemented Interfaces:
    JPRAJavaGeneratorType

      public final class JPRAJavaGenerator
      extends Object
      implements JPRAJavaGeneratorType

  The default implementation of the `JPRAJavaGeneratorType` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `generatePackedImplementation(TPacked t, OutputStream os)` Generate Java source code for the implementation of a `packed` definition.
    `void` | `generatePackedInterface(TPacked t, OutputStream os)` Generate Java source code for the readable and writable interface of a `packed` definition.
    `void` | `generatePackedInterfaceReadable(TPacked t, OutputStream os)` Generate Java source code for the readable interface of a `packed` definition.
    `void` | `generatePackedInterfaceWritable(TPacked t, OutputStream os)` Generate Java source code for the writable interface of a `packed` definition.
    `void` | `generateRecordImplementation(TRecord t, OutputStream os)` Generate Java source code for the implementation of a `record` definition.
    `void` | `generateRecordInterface(TRecord t, OutputStream os)` Generate Java source code for the readable and writable interface of a `record` definition.
    `void` | `generateRecordInterfaceReadable(TRecord t, OutputStream os)` Generate Java source code for the readable interface of a `record` definition.
    `void` | `generateRecordInterfaceWritable(TRecord t, OutputStream os)` Generate Java source code for the writable interface of a `record` definition.
    `String` | `getPackedImplementationByteBufferedName(TypeName t)`
    `String` | `getPackedInterfaceName(TypeName t)`
    `String` | `getPackedInterfaceReadableName(TypeName t)`
    `String` | `getPackedInterfaceWritableName(TypeName t)`
    `String` | `getRecordImplementationByteBufferedName(TypeName t)`
    `String` | `getRecordInterfaceName(TypeName t)`
    `String` | `getRecordInterfaceReadableName(TypeName t)`
    `String` | `getRecordInterfaceWritableName(TypeName t)`
    `static JPRAJavaGeneratorType` | `newGenerator()`

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

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

- - ### Method Detail

    - #### newGenerator

          public static JPRAJavaGeneratorType newGenerator()

      Returns:
        A new generator

    - #### getRecordImplementationByteBufferedName

          public String getRecordImplementationByteBufferedName(TypeName t)

      Specified by:
        `getRecordImplementationByteBufferedName` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type name
      Returns:
        The class name that will result for a byte-buffered implementation of `t`

    - #### getRecordInterfaceReadableName

          public String getRecordInterfaceReadableName(TypeName t)

      Specified by:
        `getRecordInterfaceReadableName` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type name
      Returns:
        The class name that will result for the readable interface of `t`

    - #### getRecordInterfaceWritableName

          public String getRecordInterfaceWritableName(TypeName t)

      Specified by:
        `getRecordInterfaceWritableName` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type name
      Returns:
        The class name that will result for the writable interface of `t`

    - #### getRecordInterfaceName

          public String getRecordInterfaceName(TypeName t)

      Specified by:
        `getRecordInterfaceName` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type name
      Returns:
        The class name that will result for the readable and writable interface of `t`

    - #### getPackedImplementationByteBufferedName

          public String getPackedImplementationByteBufferedName(TypeName t)

      Specified by:
        `getPackedImplementationByteBufferedName` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type name
      Returns:
        The class name that will result for a byte-buffered implementation of `t`

    - #### getPackedInterfaceReadableName

          public String getPackedInterfaceReadableName(TypeName t)

      Specified by:
        `getPackedInterfaceReadableName` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type name
      Returns:
        The class name that will result for the readable interface of `t`

    - #### getPackedInterfaceWritableName

          public String getPackedInterfaceWritableName(TypeName t)

      Specified by:
        `getPackedInterfaceWritableName` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type name
      Returns:
        The class name that will result for the writable interface of `t`

    - #### getPackedInterfaceName

          public String getPackedInterfaceName(TypeName t)

      Specified by:
        `getPackedInterfaceName` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type name
      Returns:
        The class name that will result for the readable and writable interface of `t`

    - #### generateRecordImplementation

          public void generateRecordImplementation(TRecord t,
                                                   OutputStream os)
                                            throws IOException

      Description copied from interface: `JPRAJavaGeneratorType`
      Generate Java source code for the implementation of a `record` definition.
      Specified by:
        `generateRecordImplementation` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type
        `os` - The output stream
      Throws:
        `IOException` - On I/O errors

    - #### generateRecordInterfaceReadable

          public void generateRecordInterfaceReadable(TRecord t,
                                                      OutputStream os)
                                               throws IOException

      Description copied from interface: `JPRAJavaGeneratorType`
      Generate Java source code for the readable interface of a `record` definition.
      Specified by:
        `generateRecordInterfaceReadable` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type
        `os` - The output stream
      Throws:
        `IOException` - On I/O errors

    - #### generateRecordInterfaceWritable

          public void generateRecordInterfaceWritable(TRecord t,
                                                      OutputStream os)
                                               throws IOException

      Description copied from interface: `JPRAJavaGeneratorType`
      Generate Java source code for the writable interface of a `record` definition.
      Specified by:
        `generateRecordInterfaceWritable` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type
        `os` - The output stream
      Throws:
        `IOException` - On I/O errors

    - #### generateRecordInterface

          public void generateRecordInterface(TRecord t,
                                              OutputStream os)
                                       throws IOException

      Description copied from interface: `JPRAJavaGeneratorType`
      Generate Java source code for the readable and writable interface of a `record` definition.
      Specified by:
        `generateRecordInterface` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type
        `os` - The output stream
      Throws:
        `IOException` - On I/O errors

    - #### generatePackedImplementation

          public void generatePackedImplementation(TPacked t,
                                                   OutputStream os)
                                            throws IOException

      Description copied from interface: `JPRAJavaGeneratorType`
      Generate Java source code for the implementation of a `packed` definition.
      Specified by:
        `generatePackedImplementation` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type
        `os` - The output stream
      Throws:
        `IOException` - On I/O errors

    - #### generatePackedInterfaceReadable

          public void generatePackedInterfaceReadable(TPacked t,
                                                      OutputStream os)
                                               throws IOException

      Description copied from interface: `JPRAJavaGeneratorType`
      Generate Java source code for the readable interface of a `packed` definition.
      Specified by:
        `generatePackedInterfaceReadable` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type
        `os` - The output stream
      Throws:
        `IOException` - On I/O errors

    - #### generatePackedInterfaceWritable

          public void generatePackedInterfaceWritable(TPacked t,
                                                      OutputStream os)
                                               throws IOException

      Description copied from interface: `JPRAJavaGeneratorType`
      Generate Java source code for the writable interface of a `packed` definition.
      Specified by:
        `generatePackedInterfaceWritable` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type
        `os` - The output stream
      Throws:
        `IOException` - On I/O errors

    - #### generatePackedInterface

          public void generatePackedInterface(TPacked t,
                                              OutputStream os)
                                       throws IOException

      Description copied from interface: `JPRAJavaGeneratorType`
      Generate Java source code for the readable and writable interface of a `packed` definition.
      Specified by:
        `generatePackedInterface` in interface `JPRAJavaGeneratorType`
      Parameters:
        `t` - The type
        `os` - The output stream
      Throws:
        `IOException` - On I/O errors

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