public class CompilationController extends CompilationInfo
CompilationInfo
to get the data,
the access to CompilationInfo
is not synchronized, so the class isn't
reentrant.
XXX: make toPhase automatic in getTrees(), Trees.getElement, etc....CompilationInfo.CacheClearPolicy
Modifier and Type | Method and Description |
---|---|
protected void |
doInvalidate()
Marks this
CompilationInfo as invalid, may be used to
verify confinement. |
static CompilationController |
get(Parser.Result result)
Returns an instance of the
CompilationController for
given Parser.Result if it is a result
of a java parser. |
JavaSource.Phase |
toPhase(JavaSource.Phase phase)
Moves the state to required phase.
|
getCachedValue, getChangedTree, getClasspathInfo, getCompilationUnit, getDiagnostics, getDocTrees, getDocument, getElements, getElementUtilities, getFileObject, getJavaSource, getPhase, getPositionConverter, getSnapshot, getSourceVersion, getText, getTokenHierarchy, getTopLevelElements, getTrees, getTreeUtilities, getTypes, getTypeUtilities, putCachedValue
@NullUnknown public static CompilationController get(@NonNull Parser.Result result)
CompilationController
for
given Parser.Result
if it is a result
of a java parser.result
- for which the CompilationController
should be
returned.CompilationController
or null when the given result
is not a result of java parsing.@NonNull public JavaSource.Phase toPhase(@NonNull JavaSource.Phase phase) throws IOException
org.netbeans.api.java.source.JavaSource.Phase.PARSED
org.netbeans.api.java.source.JavaSource.Phase.ELEMENTS_RESOLVED
org.netbeans.api.java.source.JavaSource.Phase.RESOLVED
org.netbeans.api.java.source.JavaSource.Phase.UP_TO_DATE
phase
- The required phaseIllegalArgumentException
- in case that given state can not be
reached using this methodIOException
- when the file cannot be redprotected void doInvalidate()
CompilationInfo
as invalid, may be used to
verify confinement.doInvalidate
in class CompilationInfo