|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.source.util.Trees
com.sun.tools.javac.api.JavacTrees
public class JavacTrees
Provides an implementation of Trees.
This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Nested Class Summary | |
|---|---|
(package private) static class |
JavacTrees.Copier
Makes a copy of a tree, noting the value resulting from copying a particular leaf. |
| Field Summary | |
|---|---|
private Attr |
attr
|
private JavacElements |
elements
|
private Enter |
enter
|
private JavacTaskImpl |
javacTaskImpl
|
private Log |
log
|
private MemberEnter |
memberEnter
|
private Resolve |
resolve
|
private TreeMaker |
treeMaker
|
| Constructor Summary | |
|---|---|
private |
JavacTrees(Context context)
|
| Method Summary | |
|---|---|
private Env<AttrContext> |
attribExprToTree(JCTree.JCExpression expr,
Env<AttrContext> env,
JCTree tree)
|
private Env<AttrContext> |
attribStatToTree(JCTree stat,
Env<AttrContext> env,
JCTree tree)
|
private Env<AttrContext> |
getAttrContext(TreePath path)
|
Element |
getElement(TreePath path)
Gets the Element for the Tree node identified by a given TreePath. |
TypeMirror |
getOriginalType(ErrorType errorType)
Gets the original type from the ErrorType object. |
TreePath |
getPath(CompilationUnitTree unit,
Tree node)
Gets the path to tree node within the specified compilation unit. |
TreePath |
getPath(Element e)
Gets the TreePath node for a given Element. |
TreePath |
getPath(Element e,
AnnotationMirror a)
Gets the TreePath node for an AnnotationMirror on a given Element. |
TreePath |
getPath(Element e,
AnnotationMirror a,
AnnotationValue v)
Gets the TreePath node for an AnnotationValue for an AnnotationMirror on a given Element. |
JavacScope |
getScope(TreePath path)
Gets the Scope for the Tree node identified by a given TreePath. |
SourcePositions |
getSourcePositions()
Gets a utility object for obtaining source positions. |
JCTree |
getTree(Element element)
|
JCTree |
getTree(Element e,
AnnotationMirror a)
|
JCTree |
getTree(Element e,
AnnotationMirror a,
AnnotationValue v)
|
JCTree.JCMethodDecl |
getTree(ExecutableElement method)
Gets the MethodTree node for a given ExecutableElement. |
JCTree.JCClassDecl |
getTree(TypeElement element)
Gets the ClassTree node for a given TypeElement. |
TypeMirror |
getTypeMirror(TreePath path)
Gets the TypeMirror for the Tree node identified by a given TreePath. |
static JavacTrees |
instance(Context context)
|
static JavacTrees |
instance(JavaCompiler.CompilationTask task)
|
static JavacTrees |
instance(ProcessingEnvironment env)
|
boolean |
isAccessible(Scope scope,
Element member,
DeclaredType type)
Checks whether the given element is accessible as a member of the given type in a given scope. |
boolean |
isAccessible(Scope scope,
TypeElement type)
Checks whether a given type is accessible in a given scope. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final Resolve resolve
private final Enter enter
private final Log log
private final MemberEnter memberEnter
private final Attr attr
private final TreeMaker treeMaker
private final JavacElements elements
private final JavacTaskImpl javacTaskImpl
| Constructor Detail |
|---|
private JavacTrees(Context context)
| Method Detail |
|---|
public static JavacTrees instance(JavaCompiler.CompilationTask task)
public static JavacTrees instance(ProcessingEnvironment env)
public static JavacTrees instance(Context context)
public SourcePositions getSourcePositions()
Trees
getSourcePositions in class Treespublic JCTree.JCClassDecl getTree(TypeElement element)
Trees
getTree in class Treespublic JCTree.JCMethodDecl getTree(ExecutableElement method)
Trees
getTree in class Treespublic JCTree getTree(Element element)
public JCTree getTree(Element e,
AnnotationMirror a)
public JCTree getTree(Element e,
AnnotationMirror a,
AnnotationValue v)
public TreePath getPath(CompilationUnitTree unit,
Tree node)
Trees
getPath in class Treespublic TreePath getPath(Element e)
Trees
getPath in class Trees
public TreePath getPath(Element e,
AnnotationMirror a)
Trees
getPath in class Trees
public TreePath getPath(Element e,
AnnotationMirror a,
AnnotationValue v)
Trees
getPath in class Treespublic Element getElement(TreePath path)
Trees
getElement in class Treespublic TypeMirror getTypeMirror(TreePath path)
Trees
getTypeMirror in class Treespublic JavacScope getScope(TreePath path)
Trees
getScope in class Trees
public boolean isAccessible(Scope scope,
TypeElement type)
Trees
isAccessible in class Treesscope - the scope to be checkedtype - the type to be checked
type is accessible
public boolean isAccessible(Scope scope,
Element member,
DeclaredType type)
Trees
isAccessible in class Treesscope - the scope to be checkedmember - the member to be checkedtype - the type for which to check if the member is accessible
member is accessible in typeprivate Env<AttrContext> getAttrContext(TreePath path)
private Env<AttrContext> attribStatToTree(JCTree stat,
Env<AttrContext> env,
JCTree tree)
private Env<AttrContext> attribExprToTree(JCTree.JCExpression expr,
Env<AttrContext> env,
JCTree tree)
public TypeMirror getOriginalType(ErrorType errorType)
getOriginalType in class TreeserrorType - The errorType for which we want to get the original type.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||