Interface Generator

  • All Known Implementing Classes:
    Generator, IDLGenerator, PrintGenerator, RMIGenerator, StubGenerator

    public interface Generator
    Generator defines the protocol for back-end implementations to be added to rmic. See the rmic.properties file for a description of the format for adding new Generators to rmic.

    Classes implementing this interface must have a public default constructor which should set any required arguments to their defaults. When Main encounters a command line argument which maps to a specific Generator subclass, it will instantiate one and call parseArgs(...). At some later point, Main will invoke the generate(...) method once for _each_ class passed on the command line. WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.

    • Method Detail

      • parseArgs

        boolean parseArgs​(java.lang.String[] argv,
                          Main main)
        Examine and consume command line arguments.
        Parameters:
        argv - The command line arguments. Ignore null and unknown arguments. Set each consumed argument to null.
        main - Report any errors using the main.error() methods.
        Returns:
        true if no errors, false otherwise.
      • generate

        void generate​(BatchEnvironment env,
                      java.io.File destDir,
                      ClassDefinition cdef)
        Generate output. Any source files created which need compilation should be added to the compiler environment using the addGeneratedFile(File) method.
        Parameters:
        env - The compiler environment
        destDir - The directory for the root of the package hierarchy
        cdef - The definition for the implementation class or interface from which to generate output