Package javax. lang. model. element
See: Description
-
Interface Summary Interface Description AnnotationMirror Represents an annotation.AnnotationValue Represents a value of an annotation type element.AnnotationValueVisitor<R,P> 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<R,P> 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.Parameterizable A mixin interface for an element that has type parameters.QualifiedNameable A mixin interface for an element that has a qualified name.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,enum
constant, method or constructor parameter, local variable, resource variable, or exception parameter. -
Enum Summary Enum Description ElementKind Thekind
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. -
Exception Summary Exception Description UnknownAnnotationValueException Indicates that an unknown kind of annotation value was encountered.UnknownElementException Indicates that an unknown kind of element was encountered.
Package javax.lang.model.element Description
for
loop or try
-finally
block. However, the interfaces can model some structures only
appearing inside method bodies, such as local variables and
anonymous classes.
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 source retention cannot be recovered from class files and class files might not be able to provide source position information. The modifiers on an element may differ in some cases including
-
strictfp
on a class or interface -
final
on a parameter -
protected
,private
, andstatic
on classes and interfaces
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 or has some other
irrecoverable error that could not be removed by the generation of
new types, 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, any returned model must have no less information than if
all the method bodies in the program were replaced by "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 "class XYZ {}"
,
"interface XYZ {}"
, "enum XYZ {}"
, or "@interface XYZ {}"
. If a program refers to a missing type XYZ<K1, ... ,Kn>
, the returned model must contain no less
information than if the declaration of XYZ were assumed to be
"class XYZ<T1, ... ,Tn> {}"
or "interface XYZ<T1,
... ,Tn> {}"
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 NullPointerException
if given a null
argument.
- Since:
- 1.6
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/lang/model/element/package-summary.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.