当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
WorkingCopy (Java Source) - NetBeans API Javadoc (Current Development Version)
org.netbeans.api.java.source
Class WorkingCopy
java.lang.Object
org.netbeans.api.java.source.CompilationInfo
org.netbeans.api.java.source.CompilationController
org.netbeans.api.java.source.WorkingCopy
public class WorkingCopy
- extends CompilationController
XXX: extends CompilationController now, finish method delegation
| Methods inherited from class org.netbeans.api.java.source.CompilationController |
getClasspathInfo, getCompilationUnit, getDiagnostics, getDocument, getElements, getElementUtilities, getFileObject, getJavaSource, getPhase, getText, getTokenHierarchy, 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
- Description copied from class:
CompilationController
- 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
- Overrides:
toPhase in class CompilationController
- Parameters:
phase - The required phase
- Returns:
- the reached state
- Throws:
IOException - when the file cannot be red
getTreeMaker
public TreeMaker getTreeMaker()
rewrite
public void rewrite(Tree oldTree,
Tree newTree)
- Replaces the original tree
oldTree with the new one -
newTree. null values are not allowed.
Use methods in TreeMaker for tree element removal.
- Parameters:
oldTree - tree to be replaced, use tree already represented in
source code.newTree - new tree, either created by TreeMaker
or obtained from different place.
- Throws:
IllegalStateException - if toPhase() method was not
called before.
IllegalArgumentException - when null was passed to the
method.- See Also:
TreeMaker