33 * <p>An intersection type can be either implicitly or explicitly |
33 * <p>An intersection type can be either implicitly or explicitly |
34 * declared in a program. For example, the bound of the type parameter |
34 * declared in a program. For example, the bound of the type parameter |
35 * {@code <T extends Number & Runnable>} is an (implicit) intersection |
35 * {@code <T extends Number & Runnable>} is an (implicit) intersection |
36 * type. As of {@link javax.lang.model.SourceVersion#RELEASE_8 |
36 * type. As of {@link javax.lang.model.SourceVersion#RELEASE_8 |
37 * RELEASE_8}, this is represented by an {@code IntersectionType} with |
37 * RELEASE_8}, this is represented by an {@code IntersectionType} with |
38 * {@code Number} and {@code Runnable} as its bounds. Also as of the |
38 * {@code Number} and {@code Runnable} as its bounds. |
39 * {@link javax.lang.model.SourceVersion#RELEASE_8 RELEASE_8}, |
39 * |
40 * intersection types can explicitly appear as the target type of a |
40 * @implNote Also as of {@link |
41 * cast expression. |
41 * javax.lang.model.SourceVersion#RELEASE_8 RELEASE_8}, in the |
|
42 * reference implementation an {@code IntersectionType} is used to |
|
43 * model the explicit target type of a cast expression. |
42 * |
44 * |
43 * @since 1.8 |
45 * @since 1.8 |
44 */ |
46 */ |
45 public interface IntersectionType extends TypeMirror { |
47 public interface IntersectionType extends TypeMirror { |
46 |
48 |