Class Main

java.lang.Object
org.glassfish.rmic.Main
All Implemented Interfaces:
Constants, Constants, RuntimeConstants
Direct Known Subclasses:
Main

public class Main extends Object implements Constants
Main "rmic" program. 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.
  • Constructor Details

  • Method Details

    • output

      public void output(String msg)
      Output a message.
    • error

      public void error(String msg)
      Top level error message. This method is called when the environment could not be set up yet.
    • error

      public void error(String msg, String arg1)
    • error

      public void error(String msg, String arg1, String arg2)
    • usage

      public void usage()
      Usage
    • compile

      public boolean compile(String[] argv)
      Run the compiler
    • getDestinationDir

      public File getDestinationDir()
      Get the destination directory.
    • parseArgs

      public boolean parseArgs(String... argv)
      Parse the arguments for compile.
    • checkGeneratorArg

      protected boolean checkGeneratorArg(String[] argv, int currentIndex)
      If this argument is for a generator, instantiate it, call parseArgs(...) and add generator to generators vector. Returns false on error.
    • addGenerator

      protected Generator addGenerator(String arg)
      Instantiate and add a generator to the generators array.
    • getArray

      protected String[] getArray(String name, boolean mustExist)
      Grab a resource string and parse it into an array of strings. Assumes comma separated list.
      Parameters:
      name - The resource name.
      mustExist - If true, throws error if resource does not exist. If false and resource does not exist, returns zero element array.
    • getEnv

      public BatchEnvironment getEnv()
      Get the correct type of BatchEnvironment
    • compileAllClasses

      public void compileAllClasses(BatchEnvironment env) throws ClassNotFound, IOException, InterruptedException
      Throws:
      ClassNotFound
      IOException
      InterruptedException
    • compileClass

      Throws:
      ClassNotFound
      IOException
      InterruptedException
    • main

      public static void main(String[] argv)
      Main program
    • getString

      public static String getString(String key)
      Return the string value of a named resource in the rmic.properties resource bundle. If the resource is not found, null is returned.
    • getText

      public static String getText(String key)
    • getText

      public static String getText(String key, int num)
    • getText

      public static String getText(String key, String arg0)
    • getText

      public static String getText(String key, String arg0, String arg1)
    • getText

      public static String getText(String key, String arg0, String arg1, String arg2)