All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class epp.Epp

java.lang.Object
   |
   +----epp.Epp

public class Epp
extends Object
The Epp class defines the EPP main routine.

When you execute the "epp" command from the command line, initially, a program called "EPP main routine" will be invoked. The EPP main routine will first interpret optional arguments specified at the command line. Then, it will compare the timestamps of the specified files to select the files to expand and will begin expanding those files.

Files are processed as follows. First, the files are scanned and a list of plug-ins specified by the #epp command is created. Following that, system mixins that comprise the "standard Java preprocessor" and all system mixins that were specified by the #epp command are combined together to build a single class. (This is not a Java class but an Ld-2 class.) Then, an instance of that class is created, its initialization method is called, and the file conversion process begins.

Plug-ins cannot extend the behaviour of an Epp class. Instead, a subclass of an Epp class can be created and invoked to extend the behaviour of the main routine. Assuming this approach will be taken, most of the methods of the Epp class are defined as non-static methods.


Constructor Index

 o Epp()

Method Index

 o allOptions()
 o checkEppoutDirectory()
 o collectEppCommands(String)
 o collectInputFileNames(String, Vector)
 o eppCommandUsage(EppInputStream)
 o eppMain(String[])
Called from main and is the actual main routine.
 o eppMainRoutineError(String)
 o error(String)
Throws EppUserError.
 o fatal(String)
Throws a fatal error message.
 o getClassNameFromFileName(String)
Retrieves the class name from a file name.
 o globalEpp(String[])
 o importantOptions()
 o isGeneratedFile(String)
Returns true if the file specified by path is a "file generated by EPP or javac", and otherwise returns false.
 o loadDefaultConfiguration()
 o main(String[])
Calls eppMain, which is the actual main routine.
 o makeEppGlobalProcessor()
 o makeEppObject(String, String, Object[][])
 o makeEppPreProcessor(String, String)
 o makeFileInfo(String, Obj, Hashtable, DVenv)
 o makeInputFileNameList(String[], int)
 o parseEppCommand(EppInputStream, Vector)
 o parseOption(String[], int)
 o printAllOptions()
 o printUsage()
 o processFiles(String[], int)
 o processFilesAndCatchEppUserError(String[], int)
 o processPhase1(FileInfo)
 o processPhase2(FileInfo)
 o separateEpp(String[])
 o skipComment(EppInputStream)
 o skipSpace(EppInputStream)

Constructors

 o Epp
 public Epp()

Methods

 o main
 public static void main(String argv[])
Calls eppMain, which is the actual main routine. This method is called when epp is invoked. The implementation is shown below.
    new Epp().eppMain(argv);

See Also:
eppMain
 o eppMain
 public void eppMain(String argv[])
Called from main and is the actual main routine.

See Also:
main
 o parseOption
 public int parseOption(String argv[],
                        int argp)
 o printUsage
 public void printUsage()
 o printAllOptions
 public void printAllOptions()
 o importantOptions
 public String[] importantOptions()
 o allOptions
 public String[] allOptions()
 o checkEppoutDirectory
 public void checkEppoutDirectory()
 o processFilesAndCatchEppUserError
 public void processFilesAndCatchEppUserError(String argv[],
                                              int argp)
 o processFiles
 public void processFiles(String argv[],
                          int argp)
 o makeInputFileNameList
 public String[] makeInputFileNameList(String argv[],
                                       int argp)
 o collectInputFileNames
 public void collectInputFileNames(String inputFileName,
                                   Vector names)
 o globalEpp
 public void globalEpp(String inputFileNames[])
 o makeEppGlobalProcessor
 public FileInfo makeEppGlobalProcessor()
 o separateEpp
 public void separateEpp(String inputFileNames[])
 o makeEppPreProcessor
 public FileInfo makeEppPreProcessor(String inputFileName,
                                     String outputFileName)
 o processPhase1
 public void processPhase1(FileInfo fileInfo)
 o processPhase2
 public void processPhase2(FileInfo fileInfo)
 o makeEppObject
 public FileInfo makeEppObject(String inputFileName,
                               String outputFileName,
                               Object eppCommands[][])
 o makeFileInfo
 public FileInfo makeFileInfo(String inputFileName,
                              Obj preprocessor,
                              Hashtable classTable,
                              DVenv env)
 o loadDefaultConfiguration
 public void loadDefaultConfiguration()
 o collectEppCommands
 public Object[][] collectEppCommands(String inputFileName)
 o parseEppCommand
 public void parseEppCommand(EppInputStream in,
                             Vector commands)
 o eppCommandUsage
 public Error eppCommandUsage(EppInputStream in)
 o skipSpace
 public void skipSpace(EppInputStream in)
 o skipComment
 public void skipComment(EppInputStream in)
 o eppMainRoutineError
 public Error eppMainRoutineError(String str)
 o getClassNameFromFileName
 public static String getClassNameFromFileName(String inputFileName)
Retrieves the class name from a file name. For example, this utility can retrieve the class name "File" from the file name "foo/bar/File.java".

 o isGeneratedFile
 public static boolean isGeneratedFile(String path)
Returns true if the file specified by path is a "file generated by EPP or javac", and otherwise returns false. If the return value is true, EPP assumes it may overwrite the file completely.

See Also:
emit1
 o error
 public static Error error(String str)
Throws EppUserError. Call this method when a user generated error occurs. User generated errors are EPP and EPP plug-in user (normal Java programmers) errors that may be caused by input program syntax errors, for example.

EppUserError exceptions are normally caught and handled by the EPP error recovery mechanism.

See Also:
error, fatal
 o fatal
 public static Error fatal(String str)
Throws a fatal error message. Call this method when a fatal error occurs. Fatal errors may be caused by errors such as a bug in the EPP main portion, a bug in an EPP plug-in, or a collision between EPP plug-ins. Typically, you would use this method as follows.
	throw Epp.fatal("message");
This method is defined as follows.
  public static Error fatal(String str){
    return new Error("EPP FATAL: "+ str);
  }

See Also:
error

All Packages  Class Hierarchy  This Package  Previous  Next  Index