Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
javax.lang.model.element

Interface TypeElement

  • All Superinterfaces:
    Element, Parameterizable, QualifiedNameable

    public interface TypeElement
    extends Element, Parameterizable, QualifiedNameable
    Represents a class or interface program element. Provides access to information about the type and its members. Note that an enum type is a kind of class and an annotation type is a kind of interface.

    While a TypeElement represents a class or interface element, a DeclaredType represents a class or interface type, the latter being a use (or invocation) of the former. The distinction is most apparent with generic types, for which a single element can define a whole family of types. For example, the element java.util.Set corresponds to the parameterized types java.util.Set<String> and java.util.Set<Number> (and many others), and to the raw type java.util.Set.

    Each method of this interface that returns a list of elements will return them in the order that is natural for the underlying source of program information. For example, if the underlying source of information is Java source code, then the elements will be returned in source code order.

    Since:
    1.6
    See Also:
    DeclaredType
    • Method Detail

      • getEnclosedElements

        List<? extends Element> getEnclosedElements()
        Returns the elements that are, loosely speaking, directly enclosed by this element. A class or interface is considered to enclose the fields, methods, constructors, and member types that it directly declares. This includes any (implicit) default constructor and the implicit values and valueOf methods of an enum type. A package encloses the top-level classes and interfaces within it, but is not considered to enclose subpackages. Other kinds of elements are not currently considered to enclose any elements; however, that may change as this API or the programming language evolves.

        Note that elements of certain kinds can be isolated using methods in ElementFilter.

        Note that as a particular instance of the general accuracy requirements and the ordering behavior required of this interface, the list of enclosed elements will be returned in the natural order for the originating source of information about the type. For example, if the information about the type is originating from a source file, the elements will be returned in source code order. (However, in that case the the ordering of synthesized elements, such as a default constructor, is not specified.)

        Specified by:
        getEnclosedElements in interface Element
        Returns:
        the enclosed elements in proper order, or an empty list if none
        See Also:
        Elements.getAllMembers(javax.lang.model.element.TypeElement)
      • getNestingKind

        NestingKind getNestingKind()
        Returns the nesting kind of this type element.
        Returns:
        the nesting kind of this type element
      • getQualifiedName

        Name getQualifiedName()
        Returns the fully qualified name of this type element. More precisely, it returns the canonical name. For local and anonymous classes, which do not have canonical names, an empty name is returned.

        The name of a generic type does not include any reference to its formal type parameters. For example, the fully qualified name of the interface java.util.Set<E> is "java.util.Set". Nested types use "." as a separator, as in "java.util.Map.Entry".

        Specified by:
        getQualifiedName in interface QualifiedNameable
        Returns:
        the fully qualified name of this class or interface, or an empty name if none
        See Also:
        Elements.getBinaryName(javax.lang.model.element.TypeElement)
        See The Java™ Language Specification:
        6.7 Fully Qualified Names and Canonical Names
      • getSimpleName

        Name getSimpleName()
        Returns the simple name of this type element. For an anonymous class, an empty name is returned.
        Specified by:
        getSimpleName in interface Element
        Returns:
        the simple name of this class or interface, an empty name for an anonymous class
      • getSuperclass

        TypeMirror getSuperclass()
        Returns the direct superclass of this type element. If this type element represents an interface or the class java.lang.Object, then a NoType with kind NONE is returned.
        Returns:
        the direct superclass, or a NoType if there is none
      • getInterfaces

        List<? extends TypeMirror> getInterfaces()
        Returns the interface types directly implemented by this class or extended by this interface.
        Returns:
        the interface types directly implemented by this class or extended by this interface, or an empty list if there are none
      • getTypeParameters

        List<? extends TypeParameterElement> getTypeParameters()
        Returns the formal type parameters of this type element in declaration order.
        Specified by:
        getTypeParameters in interface Parameterizable
        Returns:
        the formal type parameters, or an empty list if there are none

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/lang/model/element/typeelement.html/

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut