>
}
/**
- * Returns the enum constant of the specified enum type with the
+ * Returns the enum constant of the specified enum class with the
* specified name. The name must match exactly an identifier used
- * to declare an enum constant in this type. (Extraneous whitespace
+ * to declare an enum constant in this class. (Extraneous whitespace
* characters are not permitted.)
*
- * Note that for a particular enum type {@code T}, the
+ *
Note that for a particular enum class {@code T}, the
* implicitly declared {@code public static T valueOf(String)}
* method on that enum may be used instead of this method to map
* from a name to the corresponding enum constant. All the
- * constants of an enum type can be obtained by calling the
+ * constants of an enum class can be obtained by calling the
* implicit {@code public static T[] values()} method of that
- * type.
+ * class.
*
- * @param The enum type whose constant is to be returned
- * @param enumType the {@code Class} object of the enum type from which
+ * @param The enum class whose constant is to be returned
+ * @param enumClass the {@code Class} object of the enum class from which
* to return a constant
* @param name the name of the constant to return
- * @return the enum constant of the specified enum type with the
+ * @return the enum constant of the specified enum class with the
* specified name
- * @throws IllegalArgumentException if the specified enum type has
+ * @throws IllegalArgumentException if the specified enum class has
* no constant with the specified name, or the specified
- * class object does not represent an enum type
- * @throws NullPointerException if {@code enumType} or {@code name}
+ * class object does not represent an enum class
+ * @throws NullPointerException if {@code enumClass} or {@code name}
* is null
* @since 1.5
*/
- public static > T valueOf(Class enumType,
+ public static > T valueOf(Class enumClass,
String name) {
- T result = enumType.enumConstantDirectory().get(name);
+ T result = enumClass.enumConstantDirectory().get(name);
if (result != null)
return result;
if (name == null)
throw new NullPointerException("Name is null");
throw new IllegalArgumentException(
- "No enum constant " + enumType.getCanonicalName() + "." + name);
+ "No enum constant " + enumClass.getCanonicalName() + "." + name);
}
/**
@@ -307,13 +307,13 @@ public abstract class Enum>
/**
* Constructs a nominal descriptor for the specified {@code enum} class and name.
*
- * @param constantType a {@link ClassDesc} describing the {@code enum} class
+ * @param constantClass a {@link ClassDesc} describing the {@code enum} class
* @param constantName the unqualified name of the enum constant
* @throws NullPointerException if any argument is null
* @jvms 4.2.2 Unqualified Names
*/
- private EnumDesc(ClassDesc constantType, String constantName) {
- super(ConstantDescs.BSM_ENUM_CONSTANT, requireNonNull(constantName), requireNonNull(constantType));
+ private EnumDesc(ClassDesc constantClass, String constantName) {
+ super(ConstantDescs.BSM_ENUM_CONSTANT, requireNonNull(constantName), requireNonNull(constantClass));
}
/**
diff --git a/src/java.base/share/classes/java/lang/Record.java b/src/java.base/share/classes/java/lang/Record.java
index 67e538978d2..ee7c1095e67 100644
--- a/src/java.base/share/classes/java/lang/Record.java
+++ b/src/java.base/share/classes/java/lang/Record.java
@@ -101,7 +101,7 @@ public abstract class Record {
*
* @implSpec
* The implicitly provided implementation returns {@code true} if
- * and only if the argument is an instance of the same record type
+ * and only if the argument is an instance of the same record class
* as this record, and each component of this record is equal to
* the corresponding component of the argument; otherwise, {@code
* false} is returned. Equality of a component {@code c} is