com.io7m.jpra.compiler.java

## Class JPRAJavaWriter

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

- All Implemented Interfaces:
    JPRAJavaWriterType

      public final class JPRAJavaWriter
      extends Object
      implements JPRAJavaWriterType

  The default implementation of the `JPRAJavaWriterType` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Path` | `getPathForPackage(Path base, PackageNameQualified p_name)` A function to return a path for the package `p_name`, based on `base`.
    `static JPRAJavaWriterType` | `newWriter(JPRAJavaGeneratorType in_generator)`
    `void` | `writeType(Path path, TypeUserDefinedType t)` Write the given type to the base directory `path`.

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

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

- - ### Method Detail

    - #### newWriter

          public static JPRAJavaWriterType newWriter(JPRAJavaGeneratorType in_generator)

      Parameters:
        `in_generator` - A Java code generator
      Returns:
        A new writer

    - #### getPathForPackage

          public static Path getPathForPackage(Path base,
                                               PackageNameQualified p_name)

      A function to return a path for the package `p_name`, based on `base`.
      Parameters:
        `base` - The base path
        `p_name` - The package name
      Returns:
        A path

    - #### writeType

          public void writeType(Path path,
                                TypeUserDefinedType t)
                         throws IOException

      Description copied from interface: `JPRAJavaWriterType`
      Write the given type to the base directory `path`.
      Specified by:
        `writeType` in interface `JPRAJavaWriterType`
      Parameters:
        `path` - The base directory
        `t` - The type
      Throws:
        `IOException` - On I/O errors

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