站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

WorkingCopy (Java Source) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.java.source 0.13.0 1

org.netbeans.api.java.source
Class WorkingCopy

java.lang.Object
  extended by org.netbeans.api.java.source.CompilationInfo
      extended by org.netbeans.api.java.source.CompilationController
          extended by org.netbeans.api.java.source.WorkingCopy

public class WorkingCopy
extends CompilationController

XXX: extends CompilationController now, finish method delegation


Method Summary
 TreeMaker getTreeMaker()
           
 void rewrite(Tree oldTree, Tree newTree)
          Replaces the original tree oldTree with the new one - newTree.
 JavaSource.Phase toPhase(JavaSource.Phase phase)
          Moves the state to required phase.
 
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
 

Method Detail

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

    org.netbeans.modules.java.source 0.13.0 1

    Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.