|
org.netbeans.modules.java.source 0.40.1 7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.api.java.source.CompilationInfo
public class CompilationInfo
Asorted information about the JavaSource.
| Method Summary | |
|---|---|
TreePath |
getChangedTree()
Returns tree which was reparsed by an incremental reparse. |
ClasspathInfo |
getClasspathInfo()
Returns ClasspathInfo for which this CompilationInfo was created. |
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()
Returns Document of this CompilationInfoImpl |
Elements |
getElements()
Return the Elements service of the javac represented by this CompilationInfo. |
ElementUtilities |
getElementUtilities()
Returns ElementUtilities. |
FileObject |
getFileObject()
Returns the FileObject represented by this CompilationInfo. |
JavaSource |
getJavaSource()
Returns JavaSource for which this CompilationInfo was created. |
JavaSource.Phase |
getPhase()
Returns the current phase of the JavaSource. |
PositionConverter |
getPositionConverter()
Return PositionConverter binding virtual Java source and the real source. |
String |
getText()
Returns the content of the file represented by the JavaSource. |
TokenHierarchy<?> |
getTokenHierarchy()
Returns the TokenHierarchy for the file represented by the JavaSource. |
List<? extends TypeElement> |
getTopLevelElements()
Returns all top level elements defined in file for which the CompilationInfo
was created. |
Trees |
getTrees()
Return the Trees service of the javac represented by this CompilationInfo. |
TreeUtilities |
getTreeUtilities()
Returns TreeUtilities. |
Types |
getTypes()
Return the Types service of the javac represented by this CompilationInfo. |
TypeUtilities |
getTypeUtilities()
Get the TypeUtilities. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public JavaSource.Phase getPhase()
JavaSource.
JavaSource.Phase the state which was reached by the JavaSource.public TreePath getChangedTree()
Currently the leaf tree is a MethodTree but this may change in the future. Client of this method is responsible to check the corresponding TreeKind to find out if it may perform on the changed subtree or it needs to reprocess the whole tree.
TreePath or nullpublic CompilationUnitTree getCompilationUnit()
CompilationUnitTree the compilation unit containing the top level classes contained in the,
java source file.
IllegalStateException - when the phase is less than JavaSource.Phase.PARSEDpublic String getText()
JavaSource.
public TokenHierarchy<?> getTokenHierarchy()
TokenHierarchy for the file represented by the JavaSource.
public List<Diagnostic> getDiagnostics()
JavaSource.
Diagnostic
public List<? extends TypeElement> getTopLevelElements()
throws IllegalStateException
CompilationInfo
was created. The CompilationInfo has to be in phase JavaSource#Phase#ELEMENTS_RESOLVED.
CompilationInfo is not
in phase JavaSource#Phase#ELEMENTS_RESOLVED or higher.
IllegalStateException - is thrown when the JavaSource was created with no filespublic Trees getTrees()
Trees service of the javac represented by this CompilationInfo.
public Types getTypes()
Types service of the javac represented by this CompilationInfo.
public Elements getElements()
Elements service of the javac represented by this CompilationInfo.
public JavaSource getJavaSource()
JavaSource for which this CompilationInfo was created.
public ClasspathInfo getClasspathInfo()
ClasspathInfo for which this CompilationInfo was created.
public FileObject getFileObject()
FileObject represented by this CompilationInfo.
public PositionConverter getPositionConverter()
PositionConverter binding virtual Java source and the real source.
Please note that this method is needed only for clients that need to work
in non-Java files (e.g. JSP files) or in dialogs, like code completion.
Most clients do not need to use PositionConverter.
public Document getDocument()
throws IOException
Document of this CompilationInfoImpl
DataObject doesn't
exist or has no EditorCookie.
IOExceptionpublic TreeUtilities getTreeUtilities()
TreeUtilities.
public ElementUtilities getElementUtilities()
ElementUtilities.
public TypeUtilities getTypeUtilities()
|
org.netbeans.modules.java.source 0.40.1 7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||