|
org.netbeans.modules.java.source 0.13.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.java.source.CompilationInfo
org.netbeans.api.java.source.CompilationController
public class CompilationController
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 | |
---|---|
ClasspathInfo |
getClasspathInfo()
|
CompilationUnitTree |
getCompilationUnit()
Returns the javac tree representing the source file. |
List<Diagnostic> |
getDiagnostics()
Returns the errors in the file represented by the JavaSource . |
Document |
getDocument()
|
Elements |
getElements()
|
ElementUtilities |
getElementUtilities()
|
FileObject |
getFileObject()
|
JavaSource |
getJavaSource()
|
JavaSource.Phase |
getPhase()
Returns the current phase of the JavaSource . |
String |
getText()
Returns the content of the file represented by the JavaSource . |
TokenHierarchy |
getTokenHierarchy()
|
Trees |
getTrees()
|
TreeUtilities |
getTreeUtilities()
|
Types |
getTypes()
|
TypeUtilities |
getTypeUtilities()
Get the TypeUtilities. |
JavaSource.Phase |
toPhase(JavaSource.Phase phase)
Moves the state to required phase. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public JavaSource.Phase toPhase(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 phase
IllegalArgumentException
- in case that given state can not be
reached using this method
IOException
- when the file cannot be redpublic JavaSource.Phase getPhase()
JavaSource
.
getPhase
in class CompilationInfo
JavaSource.Phase
the state which was reached by the JavaSource
.public CompilationUnitTree getCompilationUnit()
getCompilationUnit
in class CompilationInfo
CompilationUnitTree
the compilation unit cantaining the top level classes contained in the
java source file. It may return null when the getPhase()
is lower than
JavaSource.Phase.PARSED
. Before calling this method the client has to call toPhase(org.netbeans.api.java.source.JavaSource.Phase)
with required JavaSource.Phase
.public String getText()
JavaSource
.
getText
in class CompilationInfo
public TokenHierarchy getTokenHierarchy()
getTokenHierarchy
in class CompilationInfo
public List<Diagnostic> getDiagnostics()
JavaSource
.
getDiagnostics
in class CompilationInfo
Diagnostic
public Trees getTrees()
getTrees
in class CompilationInfo
public Types getTypes()
getTypes
in class CompilationInfo
public Elements getElements()
getElements
in class CompilationInfo
public JavaSource getJavaSource()
getJavaSource
in class CompilationInfo
public ClasspathInfo getClasspathInfo()
getClasspathInfo
in class CompilationInfo
public FileObject getFileObject()
getFileObject
in class CompilationInfo
public Document getDocument() throws IOException
getDocument
in class CompilationInfo
IOException
public TreeUtilities getTreeUtilities()
getTreeUtilities
in class CompilationInfo
public ElementUtilities getElementUtilities()
getElementUtilities
in class CompilationInfo
public TypeUtilities getTypeUtilities()
CompilationInfo
getTypeUtilities
in class CompilationInfo
|
org.netbeans.modules.java.source 0.13.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |