A DESCRIPTION OF THE PROBLEM :
The java.lang.reflect.WildcardType methods getLowerBounds() and getUpperBounds() as well as the java.lang.reflect.AnnotatedWildcardType methods getAnnotatedLowerBounds() and getAnnotatedUpperBounds() return arrays and their documentation as well as the interface documentation is talking about "bound(s)".
However, the JLS does not permit mulitple bounds (not sure if the JVMS does, though based on sun.reflect.generics.parser.SignatureParser.parseTypeArgument() it does not look like it). It would therefore be good to clarify the documentation stating that currently at most 1 bound is returned. In their current state these methods are rather irritating.
The java.lang.reflect.WildcardType methods getLowerBounds() and getUpperBounds() as well as the java.lang.reflect.AnnotatedWildcardType methods getAnnotatedLowerBounds() and getAnnotatedUpperBounds() return arrays and their documentation as well as the interface documentation is talking about "bound(s)".
However, the JLS does not permit mulitple bounds (not sure if the JVMS does, though based on sun.reflect.generics.parser.SignatureParser.parseTypeArgument() it does not look like it). It would therefore be good to clarify the documentation stating that currently at most 1 bound is returned. In their current state these methods are rather irritating.
- relates to
-
JDK-4891872 (reflect) Extend reflection to support generics, metadata and JSR201 features
- Resolved
-
JDK-8250920 Increase @jls usage in core reflection
- Resolved