Methods Summary |
---|
public abstract javax.lang.model.element.Element | getElement(com.sun.source.util.TreePath path)Gets the Element for the Tree node identified by a given TreePath.
Returns null if the element is not available.
|
private static com.sun.source.util.Trees | getJavacTrees(java.lang.Class argType, java.lang.Object arg)
try {
ClassLoader cl = arg.getClass().getClassLoader();
Class<?> c = Class.forName("com.sun.tools.javac.api.JavacTrees", false, cl);
argType = Class.forName(argType.getName(), false, cl);
Method m = c.getMethod("instance", new Class[] { argType });
return (Trees) m.invoke(null, new Object[] { arg });
} catch (Throwable e) {
throw new AssertionError(e);
}
|
public abstract com.sun.source.util.TreePath | getPath(com.sun.source.tree.CompilationUnitTree unit, com.sun.source.tree.Tree node)Gets the path to tree node within the specified compilation unit.
|
public abstract com.sun.source.util.TreePath | getPath(javax.lang.model.element.Element e)Gets the TreePath node for a given Element.
Returns null if the node can not be found.
|
public abstract com.sun.source.util.TreePath | getPath(javax.lang.model.element.Element e, javax.lang.model.element.AnnotationMirror a)Gets the TreePath node for an AnnotationMirror on a given Element.
Returns null if the node can not be found.
|
public abstract com.sun.source.util.TreePath | getPath(javax.lang.model.element.Element e, javax.lang.model.element.AnnotationMirror a, javax.lang.model.element.AnnotationValue v)Gets the TreePath node for an AnnotationValue for an AnnotationMirror on a given Element.
Returns null if the node can not be found.
|
public abstract com.sun.source.tree.Scope | getScope(com.sun.source.util.TreePath path)Gets the Scope for the Tree node identified by a given TreePath.
Returns null if the Scope is not available.
|
public abstract com.sun.source.util.SourcePositions | getSourcePositions()Gets a utility object for obtaining source positions.
|
public abstract com.sun.source.tree.Tree | getTree(javax.lang.model.element.Element element)Gets the Tree node for a given Element.
Returns null if the node can not be found.
|
public abstract com.sun.source.tree.ClassTree | getTree(javax.lang.model.element.TypeElement element)Gets the ClassTree node for a given TypeElement.
Returns null if the node can not be found.
|
public abstract com.sun.source.tree.MethodTree | getTree(javax.lang.model.element.ExecutableElement method)Gets the MethodTree node for a given ExecutableElement.
Returns null if the node can not be found.
|
public abstract com.sun.source.tree.Tree | getTree(javax.lang.model.element.Element e, javax.lang.model.element.AnnotationMirror a)Gets the Tree node for an AnnotationMirror on a given Element.
Returns null if the node can not be found.
|
public abstract com.sun.source.tree.Tree | getTree(javax.lang.model.element.Element e, javax.lang.model.element.AnnotationMirror a, javax.lang.model.element.AnnotationValue v)Gets the Tree node for an AnnotationValue for an AnnotationMirror on a given Element.
Returns null if the node can not be found.
|
public abstract javax.lang.model.type.TypeMirror | getTypeMirror(com.sun.source.util.TreePath path)Gets the TypeMirror for the Tree node identified by a given TreePath.
Returns null if the TypeMirror is not available.
|
public static com.sun.source.util.Trees | instance(javax.tools.JavaCompiler.CompilationTask task)Gets a Trees object for a given CompilationTask.
if (!task.getClass().getName().equals("com.sun.tools.javac.api.JavacTaskImpl"))
throw new IllegalArgumentException();
return getJavacTrees(CompilationTask.class, task);
|
public static com.sun.source.util.Trees | instance(javax.annotation.processing.ProcessingEnvironment env)Gets a Trees object for a given CompilationTask.
if (!env.getClass().getName().equals("com.sun.tools.javac.processing.JavacProcessingEnvironment"))
throw new IllegalArgumentException();
return getJavacTrees(ProcessingEnvironment.class, env);
|
public abstract boolean | isAccessible(com.sun.source.tree.Scope scope, javax.lang.model.element.TypeElement type)Checks whether a given type is accessible in a given scope.
|
public abstract boolean | isAccessible(com.sun.source.tree.Scope scope, javax.lang.model.element.Element member, javax.lang.model.type.DeclaredType type)Checks whether the given element is accessible as a member of the given
type in a given scope.
|