CSR :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
JLS changes for JDK-8246772 include those described in the "Consistent Class and Interface Terminology" document: https://download.java.net/java/early_access/jdk16/docs/specs/class-terminology-jls.html This imposes a stricter discipline for distinguishing between *classes and interfaces* vs. *types*. A similar discipline should be applied, where possible, to key Java SE API specs. (Obviously, class and method names used by the APIs themselves must remain unchanged.) java.lang.Enum and java.lang.Record should be reviewed to avoid inappropriate use of the term "type". For example, the terms "enum type" and "record type" should be replaced, respectively, with "enum class" and "record class". The summary of the "Consistent Class and Interface Terminology" document is reproduced here: "The following terminology is preferred: a class declaration or an interface declaration is a syntactic structure that introduces a class or an interface, respectively. Various class and interface declarations have different syntactic forms, and can appear in different contexts, per the grammar. An enum declaration introduces a special kind of class, an enum class. An annotation declaration introduces a special kind of interface, an annotation interface." "A class type or an interface type is the type of a variable or an expression, where the type names a class or interface. The word type should be avoided when talking about a class or interface itself, or its declaration. For example, "member type" is not appropriate. (As an exception, we continue to use type name to describe a name that refers to a class, interface, or type parameter.)" "Each class has a direct superclass type and direct superinterface types. These can be mapped to a direct superclass and direct superinterfaces when the extra information supplied by types (e.g., type arguments) is irrelevant. Through transitive closure, we can talk more generally about superclass types, superinterface types, superclasses, and superinterfaces."
|