src/share/classes/java/lang/reflect/Type.java
Print this page
@@ -30,8 +30,19 @@
* programming language. These include raw types, parameterized types,
* array types, type variables and primitive types.
*
* @since 1.5
*/
-
public interface Type {
+ /**
+ * Returns a string describing this type, including information
+ * about any type parameters.
+ *
+ * @implSpec The default implementation calls {@code toString}.
+ *
+ * @return a string describing this type
+ * @since 1.8
+ */
+ default String getTypeName() {
+ return toString();
+ }
}