org.extendj.ast
class Frontend

General Info

Type Hierarchy:
java.lang.Object
  extended by org.extendj.ast.Frontend

Description

Source
Declared in /home/jesper/git/extendj/java4/frontend/FrontendMain.jrag at line 68
Aspect
FrontendMain

Member Filters

API level:

Aspect:

Constructors

protected Frontend()
Initialize the program object.
protected Frontend(java.lang.String name,
                   java.lang.String version)
Initialize the program object and set compiler name and version.
Parameters:
name - compiler name
version - compiler version

Methods

public int run(java.lang.String[] args,
               BytecodeReader reader,
               JavaParser parser)
Process all compilation units listed in the command-line arguments, and all compilation units referenced from those.
Returns:
0 on success, 1 on error, 2 on configuration error, 3 on system error, 4 on unhandled error
protected int processCompilationUnit(CompilationUnit unit)
                              throws java.lang.Error
Processes from-source compilation units by error-checking them. This method only report semantic errors and warnings.
Returns:
zero on success, non-zero on error
Throws:
java.lang.Error
protected void initOptions()
Initialize the command-line options. Override this method to add your own command-line options.
protected int processArgs(java.lang.String[] args)
Configure the compiler with command-line arguments.
Returns:
0 if there were no configuration errors
protected void processErrors(java.util.Collection<Problem> errors,
                             CompilationUnit unit)
Print errors for a compilation unit.
Parameters:
errors - collection of compile problems
unit - affected compilation unit
protected void processWarnings(java.util.Collection<Problem> warnings,
                               CompilationUnit unit)
Print the warnings for a compilation unit.
Parameters:
warnings - collection of warnings
unit - affected compilation unit
protected void processNoErrors(CompilationUnit unit)
Called for each from-source compilation unit with no errors.
protected void printUsage()
Echo the command-line usage help to sysout.
protected void printVersion()
Echo the version to sysout.
protected java.lang.String name()
Returns:
the name of the compiler
protected java.lang.String version()
Returns:
the version of the compiler

Fields

protected Program program
public static final int EXIT_SUCCESS
Compile success
See Also:
Constant Field Values
public static final int EXIT_ERROR
Lexical/semantic error.
See Also:
Constant Field Values
public static final int EXIT_CONFIG_ERROR
Command-line configuration error.
See Also:
Constant Field Values
public static final int EXIT_SYSTEM_ERROR
The compiler terminated by system error.
See Also:
Constant Field Values
public static final int EXIT_UNHANDLED_ERROR
The compiler terminated abnormally.
See Also:
Constant Field Values

Inherited Members

Methods inherited from class java.lang.Object

clone
equals
finalize
getClass
hashCode
notify
notifyAll
toString
wait
wait
wait