Save This Page
Home » openjdk-7 » com.sun.tools » javac » model » [javadoc | source]
com.sun.tools.javac.model
public class: JavacElements [javadoc | source]
java.lang.Object
   com.sun.tools.javac.model.JavacElements

All Implemented Interfaces:
    Elements

Utility methods for operating on program elements.

This is NOT part of any supported API. 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.

Constructor:
 protected JavacElements(Context context) 
    Public for use only by JavacProcessingEnvironment
Method from com.sun.tools.javac.model.JavacElements Summary:
getAllAnnotationMirrors,   getAllMembers,   getAnnotation,   getAnnotation,   getBinaryName,   getConstantExpression,   getDocComment,   getElementValuesWithDefaults,   getName,   getPackageElement,   getPackageOf,   getSourcePosition,   getSourcePosition,   getSourcePosition,   getTree,   getTreeAndTopLevel,   getTypeElement,   hides,   instance,   isDeprecated,   overrides,   printElements,   setContext
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.tools.javac.model.JavacElements Detail:
 public List<Compound> getAllAnnotationMirrors(Element e) 
    Returns all annotations of an element, whether inherited or directly present.
 public FilteredMemberList getAllMembers(TypeElement element) 
    {@inheritDoc}
 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. This overloaded version take annotation inheritance into account.
 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. 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.
 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(Writer w,
    Element elements) 
    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.
 public  void setContext(Context context) 
    Use a new context. May be called from outside to update internal state for a new annotation-processing round.