Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8315137: Add explicit override RecordComponentElement.asType()
Reviewed-by: jjg
  • Loading branch information
jddarcy committed Aug 28, 2023
1 parent b4b2fec commit 8e2a533
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Expand Up @@ -68,6 +68,7 @@ public interface Element extends AnnotatedConstruct {
* @see TypeElement#asType
* @see TypeParameterElement#asType
* @see VariableElement#asType
* @see RecordComponentElement#asType
*/
TypeMirror asType();

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -25,13 +25,28 @@

package javax.lang.model.element;

import javax.lang.model.type.TypeMirror;
import javax.lang.model.type.TypeKind;

/**
* Represents a record component.
*
* @jls 8.10.1 Record Components
* @since 16
*/
public interface RecordComponentElement extends Element {
/**
* {@return the type of this record component}
*
* Note that the types of record components range over {@linkplain
* TypeKind many kinds} of types, including primitive types,
* declared types, and array types.
*
* @see TypeKind
*/
@Override
TypeMirror asType();

/**
* {@return the enclosing element of this record component}
*
Expand Down

1 comment on commit 8e2a533

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.