Uses of Interface
javax.lang.model.element.Element
| Package | Description |
|---|---|
| com.sun.source.tree |
Provides interfaces to represent source code as abstract syntax
trees (AST).
|
| com.sun.source.util |
Provides utilities for operations on abstract syntax trees (AST).
|
| javax.annotation.processing |
Facilities for declaring annotation processors and for
allowing annotation processors to communicate with an annotation processing
tool environment.
|
| javax.lang.model.element |
Interfaces used to model elements of the Java programming language.
|
| javax.lang.model.type |
Interfaces used to model Java programming language types.
|
| javax.lang.model.util |
Utilities to assist in the processing of
program elements and
types.
|
| jdk.javadoc.doclet |
The Doclet API provides an environment which, in conjunction with
the Language Model API and Compiler Tree API, allows clients
to inspect the source-level structures of programs and
libraries, including API comments embedded in the source.
|
-
Uses of Element in com.sun.source.tree
Methods in com.sun.source.tree that return types with arguments of type Element Modifier and Type Method Description Iterable<? extends Element>Scope. getLocalElements()Returns the elements directly contained in this scope. -
Uses of Element in com.sun.source.util
Methods in com.sun.source.util that return Element Modifier and Type Method Description abstract ElementDocTrees. getElement(DocTreePath path)Returns the language model element referred to by the leaf node of the givenDocTreePath, ornullif unknown.abstract ElementTrees. getElement(TreePath path)Returns the Element for the Tree node identified by a given TreePath.Methods in com.sun.source.util that return types with arguments of type Element Modifier and Type Method Description abstract Iterable<? extends Element>JavacTask. analyze()Completes all analysis.Methods in com.sun.source.util with parameters of type Element Modifier and Type Method Description abstract DocCommentTreeDocTrees. getDocCommentTree(Element e)Returns the doc comment tree of the given element.abstract DocCommentTreeDocTrees. getDocCommentTree(Element e, String relativePath)Returns the doc comment tree of the given file whose path is specified relative to the given element.abstract TreePathTrees. getPath(Element e)Returns the TreePath node for a given Element.abstract TreePathTrees. getPath(Element e, AnnotationMirror a)Returns the TreePath node for an AnnotationMirror on a given Element.abstract TreePathTrees. getPath(Element e, AnnotationMirror a, AnnotationValue v)Returns the TreePath node for an AnnotationValue for an AnnotationMirror on a given Element.abstract TreeTrees. getTree(Element element)Returns the Tree node for a given Element.abstract TreeTrees. getTree(Element e, AnnotationMirror a)Returns the Tree node for an AnnotationMirror on a given Element.abstract TreeTrees. getTree(Element e, AnnotationMirror a, AnnotationValue v)Returns the Tree node for an AnnotationValue for an AnnotationMirror on a given Element.abstract booleanTrees. 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. -
Uses of Element in javax.annotation.processing
Methods in javax.annotation.processing that return types with arguments of type Element Modifier and Type Method Description Set<? extends Element>RoundEnvironment. getElementsAnnotatedWith(Class<? extends Annotation> a)Returns the elements annotated with the given annotation type.Set<? extends Element>RoundEnvironment. getElementsAnnotatedWith(TypeElement a)Returns the elements annotated with the given annotation type.default Set<? extends Element>RoundEnvironment. getElementsAnnotatedWithAny(Set<Class<? extends Annotation>> annotations)Returns the elements annotated with one or more of the given annotation types.default Set<? extends Element>RoundEnvironment. getElementsAnnotatedWithAny(TypeElement... annotations)Returns the elements annotated with one or more of the given annotation types.Set<? extends Element>RoundEnvironment. getRootElements()Returns the root elements for annotation processing generated by the prior round.Methods in javax.annotation.processing with parameters of type Element Modifier and Type Method Description JavaFileObjectFiler. createClassFile(CharSequence name, Element... originatingElements)Creates a new class file, and returns an object to allow writing to it.FileObjectFiler. createResource(JavaFileManager.Location location, CharSequence moduleAndPkg, CharSequence relativeName, Element... originatingElements)Creates a new auxiliary resource file for writing and returns a file object for it.JavaFileObjectFiler. createSourceFile(CharSequence name, Element... originatingElements)Creates a new source file and returns an object to allow writing to it.Iterable<? extends Completion>AbstractProcessor. getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText)Returns an empty iterable of completions.Iterable<? extends Completion>Processor. getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText)Returns to the tool infrastructure an iterable of suggested completions to an annotation.voidMessager. printMessage(Diagnostic.Kind kind, CharSequence msg, Element e)Prints a message of the specified kind at the location of the element.voidMessager. printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a)Prints a message of the specified kind at the location of the annotation mirror of the annotated element.voidMessager. printMessage(Diagnostic.Kind kind, CharSequence msg, Element e, AnnotationMirror a, AnnotationValue v)Prints a message of the specified kind at the location of the annotation value inside the annotation mirror of the annotated element. -
Uses of Element in javax.lang.model.element
Subinterfaces of Element in javax.lang.model.element Modifier and Type Interface Description interfaceExecutableElementRepresents a method, constructor, or initializer (static or instance) of a class or interface, including annotation type elements.interfaceModuleElementRepresents a module program element.interfacePackageElementRepresents a package program element.interfaceParameterizableA mixin interface for an element that has type parameters.interfaceQualifiedNameableA mixin interface for an element that has a qualified name.interfaceRecordComponentElementAssociated with records, a preview feature of the Java language.
Represents a record component.interfaceTypeElementRepresents a class or interface program element.interfaceTypeParameterElementRepresents a formal type parameter of a generic class, interface, method, or constructor element.interfaceVariableElementRepresents a field,enumconstant, method or constructor parameter, local variable, resource variable, or exception parameter.Methods in javax.lang.model.element that return Element Modifier and Type Method Description ElementElement. getEnclosingElement()Returns the innermost element within which this element is, loosely speaking, enclosed.ElementModuleElement. getEnclosingElement()Returnsnullsince a module is not enclosed by another element.ElementPackageElement. getEnclosingElement()Returns the enclosing module if such a module exists; otherwise returnsnull.ElementRecordComponentElement. getEnclosingElement()Returns the enclosing element of this record component.ElementTypeElement. getEnclosingElement()Returns the package of a top-level type and returns the immediately lexically enclosing element for a nested type.ElementTypeParameterElement. getEnclosingElement()Returns the generic element of this type parameter.ElementVariableElement. getEnclosingElement()Returns the enclosing element of this variable.ElementTypeParameterElement. getGenericElement()Returns the generic class, interface, method, or constructor that is parameterized by this type parameter.ElementUnknownElementException. getUnknownElement()Returns the unknown element.Methods in javax.lang.model.element that return types with arguments of type Element Modifier and Type Method Description List<? extends Element>Element. getEnclosedElements()Returns the elements that are, loosely speaking, directly enclosed by this element.List<? extends Element>ModuleElement. getEnclosedElements()Returns the packages within this module.List<? extends Element>PackageElement. getEnclosedElements()Returns the top-level classes and interfaces within this package.List<? extends Element>TypeElement. getEnclosedElements()Returns the fields, methods, constructors, record components, and member types that are directly declared in this class or interface.Methods in javax.lang.model.element with parameters of type Element Modifier and Type Method Description default RElementVisitor. visit(Element e)A convenience method equivalent tovisit(e, null).RElementVisitor. visit(Element e, P p)Visits an element.RElementVisitor. visitUnknown(Element e, P p)Visits an unknown kind of element.Constructors in javax.lang.model.element with parameters of type Element Constructor Description UnknownElementException(Element e, Object p)Creates a newUnknownElementException. -
Uses of Element in javax.lang.model.type
-
Uses of Element in javax.lang.model.util
Methods in javax.lang.model.util that return Element Modifier and Type Method Description ElementTypes. asElement(TypeMirror t)Returns the element corresponding to a type.Methods in javax.lang.model.util that return types with arguments of type Element Modifier and Type Method Description List<? extends Element>Elements. getAllMembers(TypeElement type)Returns all members of a type element, whether inherited or declared directly.Methods in javax.lang.model.util with parameters of type Element Modifier and Type Method Description TypeMirrorTypes. asMemberOf(DeclaredType containing, Element element)Returns the type of an element when that element is viewed as a member of, or otherwise directly contained by, a given type.protected RSimpleElementVisitor6. defaultAction(Element e, P p)The default action for visit methods.List<? extends AnnotationMirror>Elements. getAllAnnotationMirrors(Element e)Returns all annotations present on an element, whether directly present or present via inheritance.StringElements. getDocComment(Element e)Returns the text of the documentation ("Javadoc") comment of an element.default ModuleElementElements. getModuleOf(Element e)Returns the module of an element.default Elements.OriginElements. getOrigin(Element e)Returns the origin of the given element.PackageElementElements. getPackageOf(Element e)Returns the package of an element.booleanElements. hides(Element hider, Element hidden)Tests whether one type, method, or field hides another.booleanElements. isDeprecated(Element e)Returnstrueif the element is deprecated,falseotherwise.voidElements. printElements(Writer w, Element... elements)Prints a representation of the elements to the given writer in the specified order.RElementScanner6. scan(Element e)Convenience method equivalent tov.scan(e, null).RElementScanner6. scan(Element e, P p)Processes an element by callinge.accept(this, p); this method may be overridden by subclasses.RAbstractElementVisitor6. visit(Element e)Visits any program element as if by passing itself to that element'sacceptmethod and passingnullfor the additional parameter.RAbstractElementVisitor6. visit(Element e, P p)Visits any program element as if by passing itself to that element'sacceptmethod.RAbstractElementVisitor6. visitUnknown(Element e, P p)Visits an unknown kind of element.Method parameters in javax.lang.model.util with type arguments of type Element Modifier and Type Method Description static List<ExecutableElement>ElementFilter. constructorsIn(Iterable<? extends Element> elements)Returns a list of constructors inelements.static Set<ExecutableElement>ElementFilter. constructorsIn(Set<? extends Element> elements)Returns a set of constructors inelements.static List<VariableElement>ElementFilter. fieldsIn(Iterable<? extends Element> elements)Returns a list of fields inelements.static Set<VariableElement>ElementFilter. fieldsIn(Set<? extends Element> elements)Returns a set of fields inelements.static List<ExecutableElement>ElementFilter. methodsIn(Iterable<? extends Element> elements)Returns a list of methods inelements.static Set<ExecutableElement>ElementFilter. methodsIn(Set<? extends Element> elements)Returns a set of methods inelements.static List<ModuleElement>ElementFilter. modulesIn(Iterable<? extends Element> elements)Returns a list of modules inelements.static Set<ModuleElement>ElementFilter. modulesIn(Set<? extends Element> elements)Returns a set of modules inelements.static List<PackageElement>ElementFilter. packagesIn(Iterable<? extends Element> elements)Returns a list of packages inelements.static Set<PackageElement>ElementFilter. packagesIn(Set<? extends Element> elements)Returns a set of packages inelements.static List<RecordComponentElement>ElementFilter. recordComponentsIn(Iterable<? extends Element> elements)Associated with records, a preview feature of the Java language.
Returns a list of record components inelements.static Set<RecordComponentElement>ElementFilter. recordComponentsIn(Set<? extends Element> elements)Associated with records, a preview feature of the Java language.
Returns a set of record components inelements.RElementScanner6. scan(Iterable<? extends Element> iterable, P p)Iterates over the given elements and callsscan(Element, P)on each one.static List<TypeElement>ElementFilter. typesIn(Iterable<? extends Element> elements)Returns a list of types inelements.static Set<TypeElement>ElementFilter. typesIn(Set<? extends Element> elements)Returns a set of types inelements. -
Uses of Element in jdk.javadoc.doclet
Methods in jdk.javadoc.doclet that return types with arguments of type Element Modifier and Type Method Description Set<? extends Element>DocletEnvironment. getIncludedElements()Returns the module, package and type elements that should be included in the documentation.Set<? extends Element>DocletEnvironment. getSpecifiedElements()Returns the elements specified when the tool is invoked.Methods in jdk.javadoc.doclet with parameters of type Element Modifier and Type Method Description booleanDocletEnvironment. isIncluded(Element e)Returns true if an element should be included in the documentation.booleanDocletEnvironment. isSelected(Element e)Returns true if the element is selected.voidReporter. print(Diagnostic.Kind kind, Element e, String msg)Print an error message and increment error count.StringTaglet. toString(List<? extends DocTree> tags, Element element)Returns the string representation of a series of instances of this tag to be included in the generated output.