org.netbeans.api.java.source
Class CompilationController
java.lang.Object
org.netbeans.api.java.source.CompilationInfo
org.netbeans.api.java.source.CompilationController
- Direct Known Subclasses:
- WorkingCopy
public class CompilationController
- extends CompilationInfo
Class for explicit invocation of compilation phases on a java source.
The implementation delegates to the 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....
| Methods inherited from class org.netbeans.api.java.source.CompilationInfo |
getChangedTree, getClasspathInfo, getCompilationUnit, getDiagnostics, getDocument, getElements, getElementUtilities, getFileObject, getJavaSource, getPhase, getPositionConverter, getText, getTokenHierarchy, getTopLevelElements, getTrees, getTreeUtilities, getTypes, getTypeUtilities |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
toPhase
public JavaSource.Phase toPhase(JavaSource.Phase phase)
throws IOException
- Moves the state to required phase. If given state was already reached
the state is not changed. The method will throw exception if a state is
illegal required. Acceptable parameters for thid method are
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
- Parameters:
phase - The required phase
- Returns:
- the reached state
- Throws:
IllegalArgumentException - in case that given state can not be
reached using this method
IOException - when the file cannot be red