Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8263333: Improve links from core reflection to JLS and JVMS
Reviewed-by: jfranck
  • Loading branch information
jddarcy committed Mar 10, 2021
1 parent 9399e1b commit acda8129587f8e00e4c67ab88914d4d754d95973
@@ -1268,6 +1268,8 @@ private Class<?> elementType() {
* @return the {@code int} representing the modifiers for this class
* @see java.lang.reflect.Modifier
* @since 1.1
* @jls 8.1.1 Class Modifiers
* @jls 9.1.1. Interface Modifiers
*/
@IntrinsicCandidate
public native int getModifiers();
@@ -1725,6 +1727,7 @@ private String getCanonicalName0() {
*
* @return {@code true} if and only if this class is an anonymous class.
* @since 1.5
* @jls 15.9.5 Anonymous Class Declarations
*/
public boolean isAnonymousClass() {
return !isArray() && isLocalOrAnonymousClass() &&
@@ -1737,6 +1740,7 @@ public boolean isAnonymousClass() {
*
* @return {@code true} if and only if this class is a local class.
* @since 1.5
* @jls 14.3 Local Class Declarations
*/
public boolean isLocalClass() {
return isLocalOrAnonymousClass() &&
@@ -1749,6 +1753,7 @@ public boolean isLocalClass() {
*
* @return {@code true} if and only if this class is a member class.
* @since 1.5
* @jls 8.5 Member Type Declarations
*/
public boolean isMemberClass() {
return !isLocalOrAnonymousClass() && getDeclaringClass0() != null;
@@ -2273,6 +2278,7 @@ public Constructor<T> getConstructor(Class<?>... parameterTypes)
* </ul>
*
* @since 1.1
* @jls 8.5 Member Type Declarations
*/
@CallerSensitive
public Class<?>[] getDeclaredClasses() throws SecurityException {
@@ -2485,6 +2491,7 @@ public Method[] getDeclaredMethods() throws SecurityException {
* </ul>
*
* @since 1.1
* @jls 8.8 Constructor Declarations
*/
@CallerSensitive
public Constructor<?>[] getDeclaredConstructors() throws SecurityException {
@@ -3741,6 +3748,7 @@ private static ReflectionFactory getReflectionFactory() {
* declared, or null if this {@code Class} object does not
* represent an enum class
* @since 1.5
* @jls 8.9.1 Enum Constants
*/
public T[] getEnumConstants() {
T[] values = getEnumConstantsShared();
@@ -96,6 +96,7 @@
*
* @since 9
* @see Class#getModule()
* @jls 7.7 Module Declarations
*/

public final class Module implements AnnotatedElement {
@@ -169,6 +170,7 @@ public final class Module implements AnnotatedElement {
* @return {@code true} if this is a named module
*
* @see ClassLoader#getUnnamedModule()
* @jls 7.7.5 Unnamed Modules
*/
public boolean isNamed() {
return name != null;
@@ -223,6 +223,7 @@ public String getName() {

/**
* {@inheritDoc}
* @jls 8.8.3 Constructor Modifiers
*/
@Override
public int getModifiers() {
@@ -332,7 +333,7 @@ public int hashCode() {
* followed by a parenthesized, comma-separated list of the
* constructor's formal parameter types. For example:
* <pre>{@code
* public java.util.Hashtable(int,float)
* public java.util.HashMap(int,float)
* }</pre>
*
* <p>If the constructor is declared to throw exceptions, the
@@ -502,6 +503,7 @@ T newInstanceWithCaller(Object[] args, boolean checkAccess, Class<?> caller)
/**
* {@inheritDoc}
* @since 1.5
* @jls 8.4.1 Formal Parameters
*/
@Override
public boolean isVarArgs() {
@@ -199,6 +199,8 @@ public String getName() {
* be used to decode the modifiers.
*
* @see Modifier
* @jls 8.3 Field Declarations
* @jls 9.3 Field (Constant) Declarations
*/
public int getModifiers() {
return modifiers;
@@ -211,6 +213,7 @@ public int getModifiers() {
* @return {@code true} if and only if this field represents an element of
* an enumerated class.
* @since 1.5
* @jls 8.9.1 Enum Constants
*/
public boolean isEnumConstant() {
return (getModifiers() & Modifier.ENUM) != 0;
@@ -234,6 +234,7 @@ public String getName() {

/**
* {@inheritDoc}
* @jls 8.4.3 Method Modifiers
*/
@Override
public int getModifiers() {
@@ -244,6 +245,7 @@ public int getModifiers() {
* {@inheritDoc}
* @throws GenericSignatureFormatError {@inheritDoc}
* @since 1.5
* @jls 8.4.4 Generic Methods
*/
@Override
@SuppressWarnings({"rawtypes", "unchecked"})
@@ -613,6 +615,7 @@ public boolean isBridge() {
/**
* {@inheritDoc}
* @since 1.5
* @jls 8.4.1 Formal Parameters
*/
@Override
public boolean isVarArgs() {
@@ -640,6 +643,7 @@ public boolean isSynthetic() {
* @return true if and only if this method is a default
* method as defined by the Java Language Specification.
* @since 1.8
* @jls 9.4 Method Declarations
*/
public boolean isDefault() {
// Default methods are public non-abstract instance methods
@@ -697,6 +701,7 @@ void setMethodAccessor(MethodAccessor accessor) {
* {@link Class} and no definition can be found for the
* default class value.
* @since 1.5
* @jls 9.6.2 Defaults for Annotation Type Elements
*/
public Object getDefaultValue() {
if (annotationDefault == null)

0 comments on commit acda812

Please sign in to comment.