public class

Main

extends Object
java.lang.Object
   ↳ sun.rmi.rmic.newrmic.Main

Class Overview

The rmic front end. This class contains the "main" method for rmic command line invocation. A Main instance contains the stream to output error messages and other diagnostics to. An rmic compilation batch (for example, one rmic command line invocation) is executed by invoking the "compile" method of a Main instance. 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. NOTE: If and when there is a J2SE API for invoking SDK tools, this class should be updated to support that API. NOTE: This class is the front end for a "new" rmic implementation, which uses javadoc and the doclet API for reading class files and javac for compiling generated source files. This implementation is incomplete: it lacks any CORBA-based back end implementations, and thus the command line options "-idl", "-iiop", and their related options are not yet supported. The front end for the "old", oldjavac-based rmic implementation is sun.rmi.rmic.Main.

Summary

Public Constructors
Main(OutputStream out, String program)
Creates a Main instance that writes output to the specified stream.
Public Methods
boolean compile(String[] args)
Compiles a batch of input classes, as given by the specified command line arguments.
void error(String msg, String... args)
Prints an error message to the output stream of this Main instance.
static void main(String[] args)
Command line entry point.
static int optionLength(String option)
Doclet class method that indicates that this doclet class recognizes (only) the "-batchID" option on the javadoc command line, and that the "-batchID" option comprises two arguments on the javadoc command line.
void output(String msg)
Prints the specified string to the output stream of this Main instance.
static boolean start(RootDoc rootDoc)
Doclet class entry point.
void usage()
Prints rmic's usage message to the output stream of this Main instance.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Main (OutputStream out, String program)

Creates a Main instance that writes output to the specified stream. The specified program name is used in error messages.

Public Methods

public boolean compile (String[] args)

Compiles a batch of input classes, as given by the specified command line arguments. Protocol-specific generators are determined by the choice options on the command line. Returns true if successful, or false if an error occurred. NOTE: This method is retained for transitional consistency with previous implementations.

public void error (String msg, String... args)

Prints an error message to the output stream of this Main instance. The first argument is used as a key in rmic's resource bundle, and the rest of the arguments are used as arguments in the formatting of the resource string.

public static void main (String[] args)

Command line entry point.

public static int optionLength (String option)

Doclet class method that indicates that this doclet class recognizes (only) the "-batchID" option on the javadoc command line, and that the "-batchID" option comprises two arguments on the javadoc command line.

public void output (String msg)

Prints the specified string to the output stream of this Main instance.

public static boolean start (RootDoc rootDoc)

Doclet class entry point.

public void usage ()

Prints rmic's usage message to the output stream of this Main instance. This method is public so that it can be used by the "parseArgs" methods of Generator implementations.