8276772: Refine javax.lang.model docs

Reviewed-by: iris, vromero
This commit is contained in:
Joe Darcy 2021-11-08 22:19:55 +00:00
parent 14d66bd438
commit a7dedb5f47
10 changed files with 33 additions and 16 deletions

View File

@ -59,10 +59,15 @@ public enum SourceVersion {
* 10: local-variable type inference (var)
* 11: local-variable syntax for lambda parameters
* 12: no changes (switch expressions in preview)
* 13: no changes (switch expressions and text blocks in preview)
* 13: no changes (text blocks in preview; switch expressions in
* second preview)
* 14: switch expressions (pattern matching and records in
* preview, text blocks in preview again)
* 15: text blocks (records and pattern matching in preview again)
* preview; text blocks in second preview)
* 15: text blocks (sealed classes in preview; records and pattern
* matching in second preview)
* 16: records and pattern matching (sealed classes in second preview)
* 17: sealed classes, floating-point always strict
* 18: TBD
*/
/**
@ -184,6 +189,7 @@ public enum SourceVersion {
/**
* The version recognized by the Java Platform, Standard Edition
* 12.
* No major changes from the prior release.
*
* @since 12
*/
@ -192,6 +198,7 @@ public enum SourceVersion {
/**
* The version recognized by the Java Platform, Standard Edition
* 13.
* No major changes from the prior release.
*
* @since 13
*/
@ -221,8 +228,8 @@ public enum SourceVersion {
* The version recognized by the Java Platform, Standard Edition
* 16.
*
* Additions in this release include pattern matching for {@code
* instanceof} and records.
* Additions in this release include records and pattern matching
* for {@code instanceof}.
*
* @since 16
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2021, 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
@ -58,7 +58,8 @@ public interface AnnotationMirror {
* The order of the map matches the order in which the
* values appear in the annotation's source.
*
* <p>Note that an annotation mirror of a marker annotation type
* @apiNote
* An annotation mirror of a marker annotation type
* will by definition have an empty map.
*
* <p>To fill in default values, use {@link

View File

@ -117,8 +117,9 @@ public interface Element extends javax.lang.model.AnnotatedConstruct {
/**
* Returns the modifiers of this element, excluding annotations.
* Implicit modifiers, such as the {@code public} and {@code static}
* modifiers of interface members, are included.
* Implicit modifiers, such as the {@code public} and {@code
* static} modifiers of interface members (JLS section {@jls
* 9.3}), are included.
*
* @return the modifiers of this element, or an empty set if there are none
*/
@ -230,6 +231,7 @@ public interface Element extends javax.lang.model.AnnotatedConstruct {
* @see Elements#getAllMembers
* @jls 8.8.9 Default Constructor
* @jls 8.9 Enum Classes
* @jls 8.10 Record Classes
* @revised 9
*/
List<? extends Element> getEnclosedElements();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2021, 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
@ -59,7 +59,8 @@ import javax.lang.model.util.*;
*
* <p>Methods to accommodate new language constructs are expected to
* be added as default methods to provide strong source compatibility,
* as done for {@link visitModule visitModule}. The implementations of
* as done for {@link visitModule visitModule} and {@link
* visitRecordComponent visitRecordComponent}. The implementations of
* the default methods will in turn call {@link visitUnknown
* visitUnknown}, behavior that will be overridden in concrete
* visitors supporting the source version with the new language

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2021, 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
@ -28,6 +28,7 @@ package javax.lang.model.element;
/**
* Represents a record component.
*
* @jls 8.10.1 Record Components
* @since 16
*/
public interface RecordComponentElement extends Element {

View File

@ -108,6 +108,7 @@ public interface TypeElement extends Element, Parameterizable, QualifiedNameable
*
* @jls 8.8.9 Default Constructor
* @jls 8.9.3 Enum Members
* @jls 8.10.3 Record Members
*/
@Override
List<? extends Element> getEnclosedElements();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2021, 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
@ -44,6 +44,7 @@ import javax.lang.model.element.ExecutableElement;
* @author Scott Seligman
* @author Peter von der Ah&eacute;
* @see ExecutableElement#getReturnType()
* @see javax.lang.model.util.Types#getNoType(TypeKind)
* @since 1.6
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2021, 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
@ -35,6 +35,7 @@ package javax.lang.model.type;
* @author Peter von der Ah&eacute;
* @jls 3.10.7 The Null Literal
* @jls 4.1 The Kinds of Types and Values
* @see javax.lang.model.util.Types#getNullType()
* @since 1.6
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2021, 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
@ -35,6 +35,7 @@ package javax.lang.model.type;
* @author Scott Seligman
* @author Peter von der Ah&eacute;
* @jls 4.2 Primitive Types and Values
* @see javax.lang.model.util.Types#getPrimitiveType(TypeKind)
* @since 1.6
*/
public interface PrimitiveType extends TypeMirror {

View File

@ -427,6 +427,7 @@ public interface Elements {
*
* @jls 8.8.9 Default Constructor
* @jls 8.9.3 Enum Members
* @jls 8.10.3 Record Members
* @jls 9.6.3 Repeatable Annotation Types
* @jls 9.7.5 Multiple Annotations of the Same Interface
*/
@ -543,7 +544,7 @@ public interface Elements {
* element and therefore {@code null} is returned for those kinds
* of elements.
*
* A {@link NestingKind#TOP_LEVEL top-level} class or
* A {@linkplain NestingKind#TOP_LEVEL top-level} class or
* interface is its own outermost type element.
*
* @implSpec