Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.jdt.internal.compiler
Class Compiler  view Compiler download Compiler.java

java.lang.Object
  extended byorg.eclipse.jdt.internal.compiler.Compiler
All Implemented Interfaces:
org.eclipse.jdt.internal.compiler.impl.ITypeRequestor, org.eclipse.jdt.internal.compiler.problem.ProblemSeverities

public class Compiler
extends java.lang.Object
implements org.eclipse.jdt.internal.compiler.impl.ITypeRequestor, org.eclipse.jdt.internal.compiler.problem.ProblemSeverities


Field Summary
static boolean DEBUG
           
static IDebugRequestor DebugRequestor
           
 org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment lookupEnvironment
           
 org.eclipse.jdt.internal.compiler.impl.CompilerOptions options
           
 org.eclipse.jdt.internal.compiler.parser.Parser parser
           
 int parseThreshold
           
 org.eclipse.jdt.internal.compiler.problem.ProblemReporter problemReporter
           
 ICompilerRequestor requestor
           
 int totalUnits
           
 org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration[] unitsToProcess
           
 
Fields inherited from interface org.eclipse.jdt.internal.compiler.problem.ProblemSeverities
Abort, AbortCompilation, AbortCompilationUnit, AbortMethod, AbortType, Error, Ignore, SecondaryError, Warning
 
Constructor Summary
Compiler(org.eclipse.jdt.internal.compiler.env.INameEnvironment environment, IErrorHandlingPolicy policy, java.util.Map settings, ICompilerRequestor requestor, IProblemFactory problemFactory)
          Answer a new compiler using the given name environment and compiler options.
Compiler(org.eclipse.jdt.internal.compiler.env.INameEnvironment environment, IErrorHandlingPolicy policy, java.util.Map settings, ICompilerRequestor requestor, IProblemFactory problemFactory, boolean parseLiteralExpressionsAsConstants)
          Answer a new compiler using the given name environment and compiler options.
 
Method Summary
 void accept(org.eclipse.jdt.internal.compiler.env.IBinaryType binaryType, org.eclipse.jdt.internal.compiler.lookup.PackageBinding packageBinding)
          Add an additional binary type
 void accept(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit)
          Add an additional compilation unit into the loop -> build compilation unit declarations, their bindings and record their results.
 void accept(org.eclipse.jdt.internal.compiler.env.ISourceType[] sourceTypes, org.eclipse.jdt.internal.compiler.lookup.PackageBinding packageBinding)
          Add additional source types
protected  void addCompilationUnit(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration parsedUnit)
           
protected  void beginToCompile(org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits)
          Add the initial set of compilation units into the loop -> build compilation unit declarations, their bindings and record their results.
 void compile(org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits)
          General API -> compile each of supplied files -> recompile any required types for which we have an incomplete principle structure
protected  void handleInternalException(org.eclipse.jdt.internal.compiler.problem.AbortCompilation abortException, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit)
           
protected  void handleInternalException(java.lang.Throwable internalException, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit, CompilationResult result)
           
 void initializeParser()
           
 void process(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit, int i)
          Process a compilation unit already parsed and build.
 void reset()
           
 org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration resolve(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit, org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit, boolean verifyMethods, boolean analyzeCode, boolean generateCode)
          Internal API used to resolve a given compilation unit.
 org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration resolve(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit, boolean verifyMethods, boolean analyzeCode, boolean generateCode)
          Internal API used to resolve a given compilation unit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parser

public org.eclipse.jdt.internal.compiler.parser.Parser parser

requestor

public ICompilerRequestor requestor

options

public org.eclipse.jdt.internal.compiler.impl.CompilerOptions options

problemReporter

public org.eclipse.jdt.internal.compiler.problem.ProblemReporter problemReporter

unitsToProcess

public org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration[] unitsToProcess

totalUnits

public int totalUnits

lookupEnvironment

public org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment lookupEnvironment

DEBUG

public static boolean DEBUG

parseThreshold

public int parseThreshold

DebugRequestor

public static IDebugRequestor DebugRequestor
Constructor Detail

Compiler

public Compiler(org.eclipse.jdt.internal.compiler.env.INameEnvironment environment,
                IErrorHandlingPolicy policy,
                java.util.Map settings,
                ICompilerRequestor requestor,
                IProblemFactory problemFactory)
Answer a new compiler using the given name environment and compiler options. The environment and options will be in effect for the lifetime of the compiler. When the compiler is run, compilation results are sent to the given requestor.


Compiler

public Compiler(org.eclipse.jdt.internal.compiler.env.INameEnvironment environment,
                IErrorHandlingPolicy policy,
                java.util.Map settings,
                ICompilerRequestor requestor,
                IProblemFactory problemFactory,
                boolean parseLiteralExpressionsAsConstants)
Answer a new compiler using the given name environment and compiler options. The environment and options will be in effect for the lifetime of the compiler. When the compiler is run, compilation results are sent to the given requestor.

Method Detail

accept

public void accept(org.eclipse.jdt.internal.compiler.env.IBinaryType binaryType,
                   org.eclipse.jdt.internal.compiler.lookup.PackageBinding packageBinding)
Add an additional binary type

Specified by:
accept in interface org.eclipse.jdt.internal.compiler.impl.ITypeRequestor

accept

public void accept(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit)
Add an additional compilation unit into the loop -> build compilation unit declarations, their bindings and record their results.

Specified by:
accept in interface org.eclipse.jdt.internal.compiler.impl.ITypeRequestor

accept

public void accept(org.eclipse.jdt.internal.compiler.env.ISourceType[] sourceTypes,
                   org.eclipse.jdt.internal.compiler.lookup.PackageBinding packageBinding)
Add additional source types

Specified by:
accept in interface org.eclipse.jdt.internal.compiler.impl.ITypeRequestor

addCompilationUnit

protected void addCompilationUnit(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit,
                                  org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration parsedUnit)

beginToCompile

protected void beginToCompile(org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits)
Add the initial set of compilation units into the loop -> build compilation unit declarations, their bindings and record their results.


compile

public void compile(org.eclipse.jdt.internal.compiler.env.ICompilationUnit[] sourceUnits)
General API -> compile each of supplied files -> recompile any required types for which we have an incomplete principle structure


handleInternalException

protected void handleInternalException(java.lang.Throwable internalException,
                                       org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit,
                                       CompilationResult result)

handleInternalException

protected void handleInternalException(org.eclipse.jdt.internal.compiler.problem.AbortCompilation abortException,
                                       org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit)

initializeParser

public void initializeParser()

process

public void process(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit,
                    int i)
Process a compilation unit already parsed and build.


reset

public void reset()

resolve

public org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration resolve(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration unit,
                                                                                org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit,
                                                                                boolean verifyMethods,
                                                                                boolean analyzeCode,
                                                                                boolean generateCode)
Internal API used to resolve a given compilation unit. Can run a subset of the compilation process


resolve

public org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration resolve(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit,
                                                                                boolean verifyMethods,
                                                                                boolean analyzeCode,
                                                                                boolean generateCode)
Internal API used to resolve a given compilation unit. Can run a subset of the compilation process