8314477: Improve definition of "prototypical type"
Reviewed-by: prappo
This commit is contained in:
parent
d27daf01d6
commit
6445314fec
@ -88,7 +88,7 @@ import javax.lang.model.util.*;
|
|||||||
public interface TypeElement extends Element, Parameterizable, QualifiedNameable {
|
public interface TypeElement extends Element, Parameterizable, QualifiedNameable {
|
||||||
/**
|
/**
|
||||||
* Returns the type defined by this class or interface element,
|
* Returns the type defined by this class or interface element,
|
||||||
* returning the <i>prototypical</i> type for an element
|
* returning the <dfn>{@index "prototypical type"}</dfn> for an element
|
||||||
* representing a generic type.
|
* representing a generic type.
|
||||||
*
|
*
|
||||||
* <p>A generic element defines a family of types, not just one.
|
* <p>A generic element defines a family of types, not just one.
|
||||||
@ -98,6 +98,12 @@ public interface TypeElement extends Element, Parameterizable, QualifiedNameable
|
|||||||
* For example,
|
* For example,
|
||||||
* for the generic class element {@code C<N extends Number>},
|
* for the generic class element {@code C<N extends Number>},
|
||||||
* the parameterized type {@code C<N>} is returned.
|
* the parameterized type {@code C<N>} is returned.
|
||||||
|
* Otherwise, for a non-generic class or interface, the
|
||||||
|
* prototypical type mirror corresponds to a use of the type.
|
||||||
|
* None of the components of the prototypical type are annotated,
|
||||||
|
* including the prototypical type itself.
|
||||||
|
*
|
||||||
|
* @apiNote
|
||||||
* The {@link Types} utility interface has more general methods
|
* The {@link Types} utility interface has more general methods
|
||||||
* for obtaining the full range of types defined by an element.
|
* for obtaining the full range of types defined by an element.
|
||||||
*
|
*
|
||||||
|
@ -114,12 +114,8 @@
|
|||||||
* javax.lang.model.element.Element#asType() mapped to} some type.
|
* javax.lang.model.element.Element#asType() mapped to} some type.
|
||||||
* The elements for classes and interfaces get {@linkplain
|
* The elements for classes and interfaces get {@linkplain
|
||||||
* javax.lang.model.element.TypeElement#asType() mapped to} a
|
* javax.lang.model.element.TypeElement#asType() mapped to} a
|
||||||
* prototypical type. (If a class or interface is generic, its
|
* {@linkplain javax.lang.model.element.TypeElement#asType() prototypical type}.
|
||||||
* prototypical type mirror is parameterized with type arguments
|
* Conversely, in general, many types can map to the same
|
||||||
* matching the type variables of the declaration, all
|
|
||||||
* unannotated. Otherwise, for a non-generic class or interface, the
|
|
||||||
* prototypical type mirror corresponds to an unannotated use of the
|
|
||||||
* type.) Conversely, in general, many types can map to the same
|
|
||||||
* {@linkplain javax.lang.model.element.TypeElement type element}. For
|
* {@linkplain javax.lang.model.element.TypeElement type element}. For
|
||||||
* example, the type mirror for the raw type {@code java.util.Set},
|
* example, the type mirror for the raw type {@code java.util.Set},
|
||||||
* the prototypical type {@code java.util.Set<E>}, and the type {@code
|
* the prototypical type {@code java.util.Set<E>}, and the type {@code
|
||||||
|
Loading…
Reference in New Issue
Block a user