8338333: Add jls links to javax.lang.model.element.Modifier

Reviewed-by: liach, iris, prappo, vromero, jlahoda
This commit is contained in:
Joe Darcy 2024-08-14 18:42:59 +00:00
parent 723ac5763a
commit aff7936ff0

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2024, 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
@ -51,25 +51,68 @@ public enum Modifier {
// Note java.lang.reflect.Modifier includes INTERFACE, but that's a VMism.
/** The modifier {@code public} */ PUBLIC,
/** The modifier {@code protected} */ PROTECTED,
/** The modifier {@code private} */ PRIVATE,
/** The modifier {@code abstract} */ ABSTRACT,
/**
* The modifier {@code public}
*
* @jls 6.6 Access Control
*/
PUBLIC,
/**
* The modifier {@code protected}
*
* @jls 6.6 Access Control
*/
PROTECTED,
/**
* The modifier {@code private}
*
* @jls 6.6 Access Control
*/
PRIVATE,
/**
* The modifier {@code abstract}
*
* @jls 8.1.1.1 {@code abstract} Classes
* @jls 8.4.3.1 {@code abstract} Methods
* @jls 9.1.1.1 {@code abstract} Interfaces
*/
ABSTRACT,
/**
* The modifier {@code default}
*
* @jls 9.4 Method Declarations
* @since 1.8
*/
DEFAULT,
/** The modifier {@code static} */ STATIC,
/**
* The modifier {@code static}
*
* @jls 8.1.1.4 {@code static} Classes
* @jls 8.3.1.1 {@code static} Fields
* @jls 8.4.3.2 {@code static} Methods
* @jls 9.1.1.3 {@code static} Interfaces
*/
STATIC,
/**
* The modifier {@code sealed}
*
* @jls 8.1.1.2 {@code sealed}, {@code non-sealed}, and {@code final} Classes
* @jls 9.1.1.4 {@code sealed} and {@code non-sealed} Interfaces
* @since 17
*/
SEALED,
/**
* The modifier {@code non-sealed}
*
* @jls 8.1.1.2 {@code sealed}, {@code non-sealed}, and {@code final} Classes
* @jls 9.1.1.4 {@code sealed} and {@code non-sealed} Interfaces
* @since 17
*/
NON_SEALED {
@ -77,12 +120,51 @@ public enum Modifier {
return "non-sealed";
}
},
/** The modifier {@code final} */ FINAL,
/** The modifier {@code transient} */ TRANSIENT,
/** The modifier {@code volatile} */ VOLATILE,
/** The modifier {@code synchronized} */ SYNCHRONIZED,
/** The modifier {@code native} */ NATIVE,
/** The modifier {@code strictfp} */ STRICTFP;
/**
* The modifier {@code final}
*
* @jls 8.1.1.2 {@code sealed}, {@code non-sealed}, and {@code final} Classes
* @jls 8.3.1.2 {@code final} Fields
* @jls 8.4.3.3 {@code final} Methods
*/
FINAL,
/**
* The modifier {@code transient}
*
* @jls 8.3.1.3 {@code transient} Fields
*/
TRANSIENT,
/**
* The modifier {@code volatile}
*
* @jls 8.3.1.4 {@code volatile} Fields
*/
VOLATILE,
/**
* The modifier {@code synchronized}
*
* @jls 8.4.3.6 {@code synchronized} Methods
*/
SYNCHRONIZED,
/**
* The modifier {@code native}
*
* @jls 8.4.3.4 {@code native} Methods
*/
NATIVE,
/**
* The modifier {@code strictfp}
*
* @jls 8.1.1.3 {@code strictfp} Classes
* @jls 8.4.3.5 {@code strictfp} Methods
* @jls 9.1.1.2 {@code strictfp} Interfaces
*/
STRICTFP;
/**
* Returns this modifier's name as defined in <cite>The