-
Enhancement
-
Resolution: Unresolved
-
P4
-
24
-
In Review
The Type and AnnotatedType hierarchies have been enigmatic to new users: users have no clue how to categorize arbitrary type objects, when it is safe to cast to more specific types, and the exact conditions for method contracts.
A manifest isJDK-8306039, where people are massively confused by the conditions for `ParameterizedType::getOwnerType` to return null.
To fix these problems, I consulted the JLS, used some terms from there and added JLS links to make the definitions concise and accurate.
Here are some actions:
1. Add section for hierarchy overview for both Type and AnnotatedType
2. Specify the underlying type for different AnnotatedType subinterfaces
3. Define "inner member class" for `getOwnerType`, and refer to it in `AnnotatedType::getAnnotatedOwnerType`.
4. Improve the specification for `ParameterizedType::getActualTypeArguments` to note the existence of owner types; also for annotated version
5. Minor improvements to `ParameterizedType::getRawType`
6. Move the equals specification for `ParameterizedType` to the actual `equals` method.
A manifest is
To fix these problems, I consulted the JLS, used some terms from there and added JLS links to make the definitions concise and accurate.
Here are some actions:
1. Add section for hierarchy overview for both Type and AnnotatedType
2. Specify the underlying type for different AnnotatedType subinterfaces
3. Define "inner member class" for `getOwnerType`, and refer to it in `AnnotatedType::getAnnotatedOwnerType`.
4. Improve the specification for `ParameterizedType::getActualTypeArguments` to note the existence of owner types; also for annotated version
5. Minor improvements to `ParameterizedType::getRawType`
6. Move the equals specification for `ParameterizedType` to the actual `equals` method.
- csr for
-
JDK-8343280 Facelift for Type and AnnotatedType specifications
- Provisional
- duplicates
-
JDK-8306039 ParameterizedType.getOwnerType() documentation is incomplete about null result
- Closed
- relates to
-
JDK-8162500 Receiver annotations of inner classes of local classes not found at runtime
- In Progress
- links to
-
Review(master) openjdk/jdk/19977