|
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 CompilationInfoJavaSource.Phase the state which was reached by the JavaSource.public CompilationUnitTree getCompilationUnit()
getCompilationUnit in class CompilationInfoCompilationUnitTree 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 CompilationInfopublic TokenHierarchy getTokenHierarchy()
getTokenHierarchy in class CompilationInfopublic List<Diagnostic> getDiagnostics()
JavaSource.
getDiagnostics in class CompilationInfoDiagnosticpublic Trees getTrees()
getTrees in class CompilationInfopublic Types getTypes()
getTypes in class CompilationInfopublic Elements getElements()
getElements in class CompilationInfopublic JavaSource getJavaSource()
getJavaSource in class CompilationInfopublic ClasspathInfo getClasspathInfo()
getClasspathInfo in class CompilationInfopublic FileObject getFileObject()
getFileObject in class CompilationInfopublic Document getDocument() throws IOException
getDocument in class CompilationInfoIOExceptionpublic TreeUtilities getTreeUtilities()
getTreeUtilities in class CompilationInfopublic ElementUtilities getElementUtilities()
getElementUtilities in class CompilationInfopublic 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 | |||||||||