This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
Package javax.lang.model.element
Interfaces used to model elements of the Java programming language.See:
Description
Interface Summary |
AnnotationMirror |
Represents an annotation. |
AnnotationValue |
Represents a value of an annotation type element. |
AnnotationValueVisitor |
A visitor of the values of annotation type elements, using a
variant of the visitor design pattern. |
Element |
Represents a program element such as a package, class, or method. |
ElementVisitor |
A visitor of program elements, in the style of the visitor design
pattern. |
ExecutableElement |
Represents a method, constructor, or initializer (static or
instance) of a class or interface, including annotation type
elements. |
Name |
An immutable sequence of characters. |
PackageElement |
Represents a package program element. |
TypeElement |
Represents a class or interface program element. |
TypeParameterElement |
Represents a formal type parameter of a generic class, interface, method,
or constructor element. |
VariableElement |
Represents a field, constant, method or constructor
parameter, local variable, or exception parameter. |
Enum Summary |
ElementKind |
The of an element. |
Modifier |
Represents a modifier on a program element such
as a class, method, or field. |
NestingKind |
The nesting kind of a type element. |
Package javax.lang.model.element Description
Interfaces used to model elements of the Java programming language.
When used in the context of annotation processing, an accurate
model of the element being represented must be returned. As this
is a language model, the source code provides the fiducial
(reference) representation of the construct in question rather than
a representation in an executable output like a class file.
Executable output may serve as the basis for creating a modeling
element. However, the process of translating source code to
executable output may not permit recovering some aspects of the
source code representation. For example, annotations with
{@linkplain java.lang.annotation.RetentionPolicy#SOURCE source}
{@linkplain java.lang.annotation.Retention retention} cannot be
recovered from class files and class files might not be able to
provide source position information. The {@linkplain
javax.lang.model.element.Modifier modifiers} on an element may
differ in some cases including
- {@code strictfp} on a class or interface
- {@code final} on a parameter
- {@code protected}, {@code private}, and {@code static} on classes and interfaces
Additionally, synthetic constructs in a class file, such as
accessor methods used in implementing nested classes and bridge
methods used in implementing covariant returns, are translation
artifacts outside of this model.
During annotation processing, operating on incomplete or
erroneous programs is necessary; however, there are fewer
guarantees about the nature of the resulting model. If the source
code is not syntactically well-formed, a model may or may not be
provided as a quality of implementation issue. If a program is
syntactically valid but erroneous in some other fashion, the
returned model must have no less information than if all the method
bodies in the program were replaced by {@code "throw new
RuntimeException();"}. If a program refers to a missing type XYZ,
the returned model must contain no less information than if the
declaration of type XYZ were assumed to be {@code "class XYZ {}"},
{@code "interface XYZ {}"}, {@code "enum XYZ {}"}, or {@code
"@interface XYZ {}"}. If a program refers to a missing type {@code
XYZ}, the returned model must contain no less
information than if the declaration of XYZ were assumed to be
{@code "class XYZ {}"} or {@code "interface XYZ {}"}
Unless otherwise specified in a particular implementation, the
collections returned by methods in this package should be expected
to be unmodifiable by the caller and unsafe for concurrent access.
Unless otherwise specified, methods in this package will throw
a {@code NullPointerException} if given a {@code null} argument.
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.