APIdia Launch Partner
Top Description Methods
javax.lang.model.element

public Interface RecordComponentElement

extends Element
Imports
javax.lang.model.type.TypeMirror, .TypeKind

Represents a record component.
Since
16
Java Language Specification
8.10.1 Record Components

Method Summary

Modifier and TypeMethod and Description
public TypeMirror

Returns:

the type of this record component
asType
()

Redeclares javax.lang.model.element.Element.asType.

Returns the type of this record component.

public ExecutableElement

Returns:

the record component accessor.
getAccessor
()

Returns the executable element for the accessor associated with the given record component.

public Element

Returns:

the enclosing element of this record component
getEnclosingElement
()

Redeclares javax.lang.model.element.Element.getEnclosingElement.

Returns the enclosing element of this record component.

public Name

Returns:

the simple name of this record component
getSimpleName
()

Redeclares javax.lang.model.element.Element.getSimpleName.

Returns the simple name of this record component.

Inherited from javax.lang.model.element.Element:
acceptequalsgetAnnotationgetAnnotationMirrorsgetAnnotationsByTypegetEnclosedElementsgetKindgetModifiershashCode

Method Detail

asTypeback to summary
public TypeMirror asType()

Redeclares javax.lang.model.element.Element.asType.

Returns the type of this record component. Note that the types of record components range over many kinds of types, including primitive types, declared types, and array types.

Returns:TypeMirror

the type of this record component

Annotations
@Override
See Also
TypeKind
getAccessorback to summary
public ExecutableElement getAccessor()

Returns the executable element for the accessor associated with the given record component.

Returns:ExecutableElement

the record component accessor.

getEnclosingElementback to summary
public Element getEnclosingElement()

Redeclares javax.lang.model.element.Element.getEnclosingElement.

Returns the enclosing element of this record component. The enclosing element of a record component is the record class declaring the record component.

Returns:Element

the enclosing element of this record component

Annotations
@Override
getSimpleNameback to summary
public Name getSimpleName()

Redeclares javax.lang.model.element.Element.getSimpleName.

Returns the simple name of this record component.

The name of each record component must be distinct from the names of all other record components of the same record.

Returns:Name

the simple name of this record component

Annotations
@Override
Java Language Specification
6.2 Names and Identifiers