kmy.jint.tools
Class Compiler

java.lang.Object
  |
  +--kmy.jint.tools.Compiler

public class Compiler
extends java.lang.Object

This class is used to invoke Jint compiler. It parses command-line arguments, extracts or reads Jint program sources and then calls all parts of compiler in the proper order.


Inner Class Summary
(package private)  class Compiler.AbstractFile
           
(package private)  class Compiler.ClassGeneratorFactory
           
(package private)  class Compiler.ClassLoaderFactory
           
(package private)  class Compiler.DiskFile
           
(package private)  class Compiler.DumpFactory
           
(package private) static class Compiler.ExtensionFilenameFilter
           
(package private)  class Compiler.Loader
           
(package private)  class Compiler.SourceLoader
           
(package private)  class Compiler.StdinFile
           
(package private) static class Compiler.WorkUnit
           
(package private)  class Compiler.ZipEntryFile
           
(package private) static class Compiler.ZipFileEx
           
(package private) static class Compiler.ZipTreeElement
           
 
Field Summary
(package private)  int adapterCount
           
(package private)  java.lang.Object[] bootClassPathList
           
(package private)  java.lang.Object[] bootClassPathListIn
           
(package private)  boolean canListPackages
           
(package private) static java.lang.String[] cextList
           
(package private)  boolean chain
           
(package private)  java.lang.Object[] classPathList
           
(package private)  java.lang.Object[] classPathListIn
           
 JintClassTable classTable
           
(package private)  int debugFlags
           
(package private)  int deprecationLevel
           
(package private)  boolean dumpCode
           
(package private)  java.lang.String encoding
           
(package private)  java.lang.Object[] extDirs
           
(package private) static java.lang.String[] extList
           
(package private)  java.lang.String[] files
           
(package private) static int G_LINES
           
(package private) static int G_SOURCE
           
(package private) static int G_VARS
           
(package private)  boolean interpMode
           
(package private)  Identifier JAVA
           
(package private)  boolean javaOnlyClasses
           
(package private)  Identifier JAVAX
           
(package private)  boolean lineByLine
           
(package private)  boolean lineByLineOption
           
(package private)  java.util.Hashtable loadedList
           
 Compiler.Loader loader
           
(package private)  boolean looseExceptionCheck
           
(package private) static java.lang.String METHOD_SIG
           
 NameTable nameTable
           
(package private) static java.lang.String[] noextList
           
(package private)  int optimizeLevel
           
(package private)  java.lang.String outputPath
           
(package private)  boolean printDebugInfo
           
(package private)  boolean printJavaCode
           
 java.lang.String prompt
           
(package private)  boolean relativeSources
           
(package private) static boolean saveByteCode
           
(package private)  int sourceLoadDepth
           
(package private)  java.lang.Object[] sourcePathList
           
(package private)  java.lang.Object[] sourcePathListIn
           
(package private)  boolean stackTrace
           
(package private) static java.lang.String STATEMENT_SIG
           
(package private)  java.lang.String target
           
 DispatchObject theWorld
           
(package private)  int verboseLevel
           
(package private)  int warningLevel
           
(package private)  boolean wholeOption
           
(package private)  java.util.Hashtable workSet
           
(package private)  java.util.Vector workToDo
           
 
Constructor Summary
Compiler()
           
 
Method Summary
(package private)  boolean alreadyLoaded(java.lang.String name)
           
private  boolean compile(Compiler.AbstractFile in, StatementNode[] statements, ErrorKeeper errorKeeper, boolean interp)
           
 int doCompiling()
           
 int doParsing()
           
private  java.lang.String findInDirectoryTree(java.io.File folder, java.lang.String name, java.lang.String[] ext)
           
 void init(java.lang.String[] args)
           
private static java.lang.Object[] initBootClassPath()
           
(package private)  void listPackage(java.lang.Object[] pathList, java.lang.String fname, java.util.Dictionary list, java.lang.String[] extList)
           
(package private)  void listPackage(QualifiedIdentifier qname, java.util.Dictionary list)
           
static void main(java.lang.String[] args)
           
 void newClassTable()
           
(package private)  Compiler.AbstractFile openFile(java.lang.Object[] pathList, java.lang.String fname, java.lang.String[] ext)
           
private  boolean parse(Compiler.AbstractFile in, ClassConsumer classConsumer, boolean interp)
           
private static java.lang.Object[] parseList(java.lang.String pathList)
           
(package private)  java.lang.Object[] preprocessPaths(java.lang.Object[] pathList)
           
 int run()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

METHOD_SIG

static final java.lang.String METHOD_SIG

STATEMENT_SIG

static final java.lang.String STATEMENT_SIG

G_LINES

static final int G_LINES

G_VARS

static final int G_VARS

G_SOURCE

static final int G_SOURCE

outputPath

java.lang.String outputPath

classPathListIn

java.lang.Object[] classPathListIn

sourcePathListIn

java.lang.Object[] sourcePathListIn

bootClassPathListIn

java.lang.Object[] bootClassPathListIn

extDirs

java.lang.Object[] extDirs

classPathList

java.lang.Object[] classPathList

sourcePathList

java.lang.Object[] sourcePathList

bootClassPathList

java.lang.Object[] bootClassPathList

encoding

java.lang.String encoding

target

java.lang.String target

debugFlags

int debugFlags

optimizeLevel

int optimizeLevel

warningLevel

int warningLevel

verboseLevel

int verboseLevel

deprecationLevel

int deprecationLevel

dumpCode

boolean dumpCode

printJavaCode

boolean printJavaCode

printDebugInfo

boolean printDebugInfo

stackTrace

boolean stackTrace

relativeSources

boolean relativeSources

lineByLine

boolean lineByLine

wholeOption

boolean wholeOption

lineByLineOption

boolean lineByLineOption

files

java.lang.String[] files

nameTable

public NameTable nameTable

classTable

public JintClassTable classTable

workSet

java.util.Hashtable workSet

loadedList

java.util.Hashtable loadedList

workToDo

java.util.Vector workToDo

sourceLoadDepth

int sourceLoadDepth

JAVA

Identifier JAVA

JAVAX

Identifier JAVAX

interpMode

boolean interpMode

looseExceptionCheck

boolean looseExceptionCheck

adapterCount

int adapterCount

saveByteCode

static final boolean saveByteCode

theWorld

public DispatchObject theWorld

loader

public Compiler.Loader loader

prompt

public java.lang.String prompt

extList

static final java.lang.String[] extList

cextList

static final java.lang.String[] cextList

noextList

static final java.lang.String[] noextList

canListPackages

boolean canListPackages

javaOnlyClasses

boolean javaOnlyClasses

chain

boolean chain
Constructor Detail

Compiler

public Compiler()
Method Detail

parseList

private static java.lang.Object[] parseList(java.lang.String pathList)

initBootClassPath

private static java.lang.Object[] initBootClassPath()

alreadyLoaded

boolean alreadyLoaded(java.lang.String name)

preprocessPaths

java.lang.Object[] preprocessPaths(java.lang.Object[] pathList)
                             throws java.io.IOException

openFile

Compiler.AbstractFile openFile(java.lang.Object[] pathList,
                               java.lang.String fname,
                               java.lang.String[] ext)
                         throws java.io.IOException

listPackage

void listPackage(QualifiedIdentifier qname,
                 java.util.Dictionary list)
           throws java.io.IOException

listPackage

void listPackage(java.lang.Object[] pathList,
                 java.lang.String fname,
                 java.util.Dictionary list,
                 java.lang.String[] extList)
           throws java.io.IOException

findInDirectoryTree

private java.lang.String findInDirectoryTree(java.io.File folder,
                                             java.lang.String name,
                                             java.lang.String[] ext)

main

public static void main(java.lang.String[] args)

init

public void init(java.lang.String[] args)

newClassTable

public void newClassTable()

parse

private boolean parse(Compiler.AbstractFile in,
                      ClassConsumer classConsumer,
                      boolean interp)

compile

private boolean compile(Compiler.AbstractFile in,
                        StatementNode[] statements,
                        ErrorKeeper errorKeeper,
                        boolean interp)

doParsing

public int doParsing()

doCompiling

public int doCompiling()

run

public int run()