Class CompilationResult
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult
A compilation result consists of all information returned by the compiler for
a single compiled compilation source unit. This includes:
- the compilation unit that was compiled
- for each type produced by compiling the compilation unit, its binary and optionally its principal structure
- any problems (errors or warnings) produced
- dependency info
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanchar[]booleanbooleanbooleanbooleanbooleanint[]char[][]intchar[][][]char[][]char[][]intintintboolean -
Constructor Summary
ConstructorsConstructorDescriptionCompilationResult(char[] fileName, int unitIndex, int totalUnitsKnown, int maxProblemPerUnit) CompilationResult(ICompilationUnit compilationUnit, int unitIndex, int totalUnitsKnown, int maxProblemPerUnit) -
Method Summary
Modifier and TypeMethodDescriptionvoidcacheContents(char[] contents) voidAnswer the initial compilation unit corresponding to the present compilation resultchar[]Same as getProblems() but don't answer problems that actually concern the enclosing package.Answer the errors encountered during compilation.char[]Answer the initial file nameint[]Answer the problems (errors and warnings) encountered during compilation.getTasks()Answer the tasks (TO-DO, ...) encountered during compilation.booleanbooleanbooleanbooleanhasTasks()booleanbooleanvoidvoidvoidFor now, remember the compiled type using its compound name.voidrecord(CategorizedProblem newProblem, ReferenceContext referenceContext) voidrecord(CategorizedProblem newProblem, ReferenceContext referenceContext, boolean mandatoryError) voidrecordPackageName(char[][] packName) voidvoidremoveProblem(CategorizedProblem problem) intCan be used to tidy up the problems set, if a problem is accepted by the filter, it will be removed.voidscheduleProblem(Runnable task) toString()
-
Field Details
-
problems
-
tasks
-
problemCount
public int problemCount -
taskCount
public int taskCount -
compilationUnit
-
qualifiedReferences
public char[][][] qualifiedReferences -
simpleNameReferences
public char[][] simpleNameReferences -
rootReferences
public char[][] rootReferences -
hasAnnotations
public boolean hasAnnotations -
hasFunctionalTypes
public boolean hasFunctionalTypes -
lineSeparatorPositions
public int[] lineSeparatorPositions -
recoveryScannerData
-
compiledTypes
-
unitIndex
public int unitIndex -
totalUnitsKnown
public int totalUnitsKnown -
hasBeenAccepted
public boolean hasBeenAccepted -
fileName
public char[] fileName -
hasInconsistentToplevelHierarchies
public boolean hasInconsistentToplevelHierarchies -
hasSyntaxError
public boolean hasSyntaxError -
packageName
public char[][] packageName -
checkSecondaryTypes
public boolean checkSecondaryTypes -
annotations
-
usesPreview
public boolean usesPreview
-
-
Constructor Details
-
CompilationResult
public CompilationResult(char[] fileName, int unitIndex, int totalUnitsKnown, int maxProblemPerUnit) -
CompilationResult
public CompilationResult(ICompilationUnit compilationUnit, int unitIndex, int totalUnitsKnown, int maxProblemPerUnit)
-
-
Method Details
-
getAllProblems
-
getClassFiles
-
getCompilationUnit
Answer the initial compilation unit corresponding to the present compilation result -
getErrors
Answer the errors encountered during compilation. -
getFileName
public char[] getFileName()Answer the initial file name -
getLineSeparatorPositions
public int[] getLineSeparatorPositions() -
getProblems
Answer the problems (errors and warnings) encountered during compilation. This is not a compiler internal API - it has side-effects ! It is intended to be used only once all problems have been detected, and makes sure the problems slot as the exact size of the number of problems. -
getCUProblems
Same as getProblems() but don't answer problems that actually concern the enclosing package. -
getTasks
Answer the tasks (TO-DO, ...) encountered during compilation. This is not a compiler internal API - it has side-effects ! It is intended to be used only once all problems have been detected, and makes sure the problems slot as the exact size of the number of problems. -
hasErrors
public boolean hasErrors() -
hasMandatoryErrors
public boolean hasMandatoryErrors() -
hasProblems
public boolean hasProblems() -
hasTasks
public boolean hasTasks() -
hasWarnings
public boolean hasWarnings() -
recordPackageName
public void recordPackageName(char[][] packName) -
record
-
record
public void record(CategorizedProblem newProblem, ReferenceContext referenceContext, boolean mandatoryError) -
record
For now, remember the compiled type using its compound name. -
removeProblem
-
tagAsAccepted
-
toString
-
scheduleProblem
-
materializeProblems
public void materializeProblems() -
cacheSource
public void cacheSource() -
getContents
public char[] getContents() -
cacheContents
public void cacheContents(char[] contents) -
releaseContent
public void releaseContent() -
isFromBinarySource
public boolean isFromBinarySource() -
noSourceAvailable
public void noSourceAvailable() -
removeProblems
Can be used to tidy up the problems set, if a problem is accepted by the filter, it will be removed. Returns number of problems removed.
-