diff jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java @ 23393:1d4ce2d19e52

clean up and minimize JVMCI (JDK-8156835)
author Doug Simon <doug.simon@oracle.com>
date Thu, 12 May 2016 20:57:31 +0200
parents 30af491f98c5
children
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java	Thu May 12 11:06:49 2016 +0200
+++ b/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java	Thu May 12 20:57:31 2016 +0200
@@ -62,6 +62,15 @@
     }
 
     /**
+     * Checks whether this type is an array class.
+     *
+     * @return {@code true} if this type is an array class
+     */
+    default boolean isArray() {
+        return getComponentType() != null;
+    }
+
+    /**
      * For array types, gets the type of the components, or {@code null} if this is not an array
      * type. This method is analogous to {@link Class#getComponentType()}.
      */