public class

BatchEnvironment

extends BatchEnvironment
java.lang.Object
   ↳ sun.tools.java.Environment
     ↳ sun.tools.javac.BatchEnvironment
       ↳ sun.rmi.rmic.BatchEnvironment

Class Overview

BatchEnvironment for rmic extends javac's version in four ways: 1. It overrides errorString() to handle looking for rmic-specific error messages in rmic's resource bundle 2. It provides a mechanism for recording intermediate generated files so that they can be deleted later. 3. It holds a reference to the Main instance so that generators can refer to it. 4. It provides access to the ClassPath passed to the constructor. 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.

Summary

[Expand]
Inherited Constants
From interface sun.tools.java.Constants
From interface sun.tools.java.RuntimeConstants
[Expand]
Inherited Fields
From class sun.tools.javac.BatchEnvironment
From interface sun.tools.java.Constants
From interface sun.tools.java.RuntimeConstants
Public Constructors
BatchEnvironment(OutputStream out, ClassPath path, Main main)
Create a BatchEnvironment for rmic with the given class path, stream for messages and Main.
Public Methods
void addGeneratedFile(File file)
Remember a generated source file generated so that it can be removed later, if appropriate.
static ClassPath createClassPath(String classPathString, String sysClassPathString, String extDirsString)
Create a ClassPath object for rmic from the relevant command line options for class path, boot class path, and extension directories.
static ClassPath createClassPath(String classPathString)
Create a ClassPath object for rmic from a class path string.
void deleteGeneratedFiles()
Delete all the generated source files made during the execution of this environment (those that have been registered with the "addGeneratedFile" method).
String errorString(String err, Object arg0, Object arg1, Object arg2)
Return the formatted, localized string for a named error message and supplied arguments.
ClassPath getClassPath()
Get the ClassPath.
Main getMain()
Get the instance of Main which created this environment.
void reset()
void shutdown()
Release resources, if any.
[Expand]
Inherited Methods
From class sun.tools.javac.BatchEnvironment
From class sun.tools.java.Environment
From class java.lang.Object
From interface sun.tools.javac.ErrorConsumer

Public Constructors

public BatchEnvironment (OutputStream out, ClassPath path, Main main)

Create a BatchEnvironment for rmic with the given class path, stream for messages and Main.

Public Methods

public void addGeneratedFile (File file)

Remember a generated source file generated so that it can be removed later, if appropriate.

public static ClassPath createClassPath (String classPathString, String sysClassPathString, String extDirsString)

Create a ClassPath object for rmic from the relevant command line options for class path, boot class path, and extension directories.

public static ClassPath createClassPath (String classPathString)

Create a ClassPath object for rmic from a class path string.

public void deleteGeneratedFiles ()

Delete all the generated source files made during the execution of this environment (those that have been registered with the "addGeneratedFile" method).

public String errorString (String err, Object arg0, Object arg1, Object arg2)

Return the formatted, localized string for a named error message and supplied arguments. For rmic error messages, with names that being with "rmic.", look up the error message in rmic's resource bundle; otherwise, defer to java's superclass method.

public ClassPath getClassPath ()

Get the ClassPath.

public Main getMain ()

Get the instance of Main which created this environment.

public void reset ()

public void shutdown ()

Release resources, if any.