Class JavaGenerator

java.lang.Object
org.reldb.wrapd.generator.JavaGenerator

public class JavaGenerator
extends java.lang.Object
Machinery for generating Java source code.
  • Constructor Summary

    Constructors
    Constructor Description
    JavaGenerator​(java.lang.String userSourcePath)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    java.io.File generateJavaCode​(java.lang.String className, java.lang.String packageSpec, java.lang.String src)
    Generate compilable Java code.
    static java.lang.String obtainDirectoryFromSourcePathAndPackage​(java.lang.String sourcePath, java.lang.String packageSpec)
    Given a source code directory and a package specification, get the directory they specify.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JavaGenerator

      public JavaGenerator​(java.lang.String userSourcePath)
      Constructor.
      Parameters:
      userSourcePath - Specifies path to source code.
  • Method Details

    • obtainDirectoryFromSourcePathAndPackage

      public static java.lang.String obtainDirectoryFromSourcePathAndPackage​(java.lang.String sourcePath, java.lang.String packageSpec)
      Given a source code directory and a package specification, get the directory they specify.
      Parameters:
      sourcePath - Source path.
      packageSpec - Package specification.
      Returns:
      Target directory specification.
    • generateJavaCode

      public java.io.File generateJavaCode​(java.lang.String className, java.lang.String packageSpec, java.lang.String src)
      Generate compilable Java code.
      Parameters:
      className - The class name to be generated.
      packageSpec - The package.
      src - The source code.
      Returns:
      Generated source code file.