org.netbeans.modules.java.source 0.40.0 7

org.netbeans.api.java.source
Class CompilationController

java.lang.Object
  extended by org.netbeans.api.java.source.CompilationInfo
      extended by 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....


Method Summary
 JavaSource.Phase toPhase(JavaSource.Phase phase)
          Moves the state to required phase.
 
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
 

Method Detail

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

  • org.netbeans.modules.java.source 0.40.0 7

    Built on October 14 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.