| java.lang.Object com.sun.tools.javac.model.JavacElements
JavacElements | public class JavacElements implements Elements(Code) | | Utility methods for operating on program elements.
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.
|
Method Summary | |
public List<Attribute.Compound> | getAllAnnotationMirrors(Element e) Returns all annotations of an element, whether
inherited or directly present. | public FilteredMemberList | getAllMembers(TypeElement element) | public static A | getAnnotation(Symbol annotated, Class<A> annoType) An internal-use utility that creates a reified annotation. | public static A | getAnnotation(ClassSymbol annotated, Class<A> annoType) An internal-use utility that creates a reified annotation. | public Name | getBinaryName(TypeElement type) | public String | getConstantExpression(Object value) | public String | getDocComment(Element e) | public Map<MethodSymbol, Attribute> | getElementValuesWithDefaults(AnnotationMirror a) | public Name | getName(CharSequence cs) | public PackageSymbol | getPackageElement(CharSequence name) | public PackageElement | getPackageOf(Element e) | public JavacSourcePosition | getSourcePosition(Element e) | public JavacSourcePosition | getSourcePosition(Element e, AnnotationMirror a) | public JavacSourcePosition | getSourcePosition(Element e, AnnotationMirror a, AnnotationValue v) | public JCTree | getTree(Element e) Returns the tree node corresponding to this element, or null
if none can be found. | public Pair<JCTree, JCCompilationUnit> | getTreeAndTopLevel(Element e, AnnotationMirror a, AnnotationValue v) Returns the best approximation for the tree node and compilation unit
corresponding to the given element, annotation and value. | public ClassSymbol | getTypeElement(CharSequence name) | public boolean | hides(Element hiderEl, Element hideeEl) | public static JavacElements | instance(Context context) | public boolean | isDeprecated(Element e) | public boolean | overrides(ExecutableElement riderEl, ExecutableElement rideeEl, TypeElement typeEl) | public void | printElements(java.io.Writer w, Element... elements) Print a representation of the elements to the given writer in
the specified order. | public void | setContext(Context context) Use a new context. |
JavacElements | public JavacElements(Context context)(Code) | | Public for use only by JavacProcessingEnvironment
|
getAllAnnotationMirrors | public List<Attribute.Compound> getAllAnnotationMirrors(Element e)(Code) | | Returns all annotations of an element, whether
inherited or directly present.
Parameters: e - the element being examined all annotations of the element |
getAnnotation | public static A getAnnotation(Symbol annotated, Class<A> annoType)(Code) | | An internal-use utility that creates a reified annotation.
|
getAnnotation | public static A getAnnotation(ClassSymbol annotated, Class<A> annoType)(Code) | | An internal-use utility that creates a reified annotation.
This overloaded version take annotation inheritance into account.
|
getTree | public JCTree getTree(Element e)(Code) | | Returns the tree node corresponding to this element, or null
if none can be found.
|
getTreeAndTopLevel | public Pair<JCTree, JCCompilationUnit> getTreeAndTopLevel(Element e, AnnotationMirror a, AnnotationValue v)(Code) | | Returns the best approximation for the tree node and compilation unit
corresponding to the given element, annotation and value.
If the element is null, null is returned.
If the annotation is null or cannot be found, the tree node and
compilation unit for the element is returned.
If the annotation value is null or cannot be found, the tree node and
compilation unit for the annotation is returned.
|
printElements | public void printElements(java.io.Writer w, Element... elements)(Code) | | Print a representation of the elements to the given writer in
the specified order. The main purpose of this method is for
diagnostics. The exact format of the output is not
specified and is subject to change.
Parameters: w - the writer to print the output to Parameters: elements - the elements to print |
setContext | public void setContext(Context context)(Code) | | Use a new context. May be called from outside to update
internal state for a new annotation-processing round.
This instance is *not* then registered with the new context.
|
|
|