polyglot.frontend
Class Compiler

java.lang.Object
  extended by polyglot.frontend.Compiler

public class Compiler
extends java.lang.Object

This is the main entry point for the compiler. It contains a work list that contains entries for all classes that must be compiled (or otherwise worked on).


Constructor Summary
Compiler(ExtensionInfo extensionInfo)
          Initialize the compiler.
Compiler(ExtensionInfo extensionInfo, ErrorQueue eq)
          Initialize the compiler.
 
Method Summary
 void addExtension(ExtensionInfo ext)
          Return a list of all languages extensions active in the compiler.
 java.util.List allExtensions()
          Return a list of all languages extensions active in the compiler.
 boolean compile(java.util.Collection sources)
          Compile all the files listed in the set of strings source.
 ErrorQueue errorQueue()
          Get the compiler's error queue.
 ClassFileLoader loader()
          Get the compiler's class file loader.
 java.util.Collection outputFiles()
          Return a set of output filenames resulting from a compilation.
 int outputWidth()
          Maximum number of characters on each line of output
 boolean serializeClassInfo()
          Should class info be serialized into the output?
 ExtensionInfo sourceExtension()
          Get information about the language extension being compiled.
 boolean useFullyQualifiedNames()
          Should fully qualified class names be used in the output?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Compiler

public Compiler(ExtensionInfo extensionInfo)
Initialize the compiler.

Parameters:
extensionInfo - the ExtensionInfo this compiler is for.

Compiler

public Compiler(ExtensionInfo extensionInfo,
                ErrorQueue eq)
Initialize the compiler.

Parameters:
extensionInfo - the ExtensionInfo this compiler is for.
Method Detail

outputFiles

public java.util.Collection outputFiles()
Return a set of output filenames resulting from a compilation.


compile

public boolean compile(java.util.Collection sources)
Compile all the files listed in the set of strings source. Return true on success. The method outputFiles can be used to obtain the output of the compilation. This is the main entry point for the compiler, called from main().


loader

public ClassFileLoader loader()
Get the compiler's class file loader.


useFullyQualifiedNames

public boolean useFullyQualifiedNames()
Should fully qualified class names be used in the output?


addExtension

public void addExtension(ExtensionInfo ext)
Return a list of all languages extensions active in the compiler.


allExtensions

public java.util.List allExtensions()
Return a list of all languages extensions active in the compiler.


sourceExtension

public ExtensionInfo sourceExtension()
Get information about the language extension being compiled.


outputWidth

public int outputWidth()
Maximum number of characters on each line of output


serializeClassInfo

public boolean serializeClassInfo()
Should class info be serialized into the output?


errorQueue

public ErrorQueue errorQueue()
Get the compiler's error queue.