changeset 47440:d3f937f9ca54 condy-folding

Remove Class-consuming ClassRef factories
author briangoetz
date Wed, 18 Oct 2017 11:42:37 -0400
parents 9f592fdeaeca
children a98cd9df2724
files src/java.base/share/classes/java/lang/invoke/ClassRef.java src/java.base/share/classes/java/lang/invoke/Constables.java
diffstat 2 files changed, 3 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/invoke/ClassRef.java	Tue Oct 17 16:39:22 2017 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/ClassRef.java	Wed Oct 18 11:42:37 2017 -0400
@@ -120,17 +120,6 @@
     }
 
     /**
-     * Create a {@linkplain ClassRef} from a live {@link Class} object
-     *
-     * @param clazz the {@code Class}
-     * @return a {@linkplain ClassRef} describing the desired class
-     */
-    @TrackableConstant
-    public static ClassRef of(Class<?> clazz) {
-        return ClassRef.ofDescriptor(clazz.toDescriptorString());
-    }
-
-    /**
      * Create a {@linkplain ClassRef} from a dot-separated class name
      *
      * @param name the class name
--- a/src/java.base/share/classes/java/lang/invoke/Constables.java	Tue Oct 17 16:39:22 2017 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/Constables.java	Wed Oct 18 11:42:37 2017 -0400
@@ -34,9 +34,9 @@
 public class Constables {
     static final ClassRef CLASS_CONDY = ClassRef.of("java.lang.invoke.Bootstraps");
 
-    static final MethodHandleRef BSM_GET_SATIC_FINAL_SELF
+    static final MethodHandleRef BSM_GET_STATIC_FINAL_SELF
             = MethodHandleRef.ofCondyBootstrap(CLASS_CONDY, "getStaticFinal", ClassRef.CR_Object);
-    static final MethodHandleRef BSM_GET_SATIC_FINAL_DECL
+    static final MethodHandleRef BSM_GET_STATIC_FINAL_DECL
             = MethodHandleRef.ofCondyBootstrap(CLASS_CONDY, "getStaticFinal", ClassRef.CR_Object, ClassRef.CR_Class);
     static final MethodHandleRef BSM_DEFAULT_VALUE
             = MethodHandleRef.ofCondyBootstrap(CLASS_CONDY, "defaultValue", ClassRef.CR_Object);
@@ -111,7 +111,7 @@
             if (cr.isPrimitive()) {
                 // Return a dynamic constant whose value is obtained by getting
                 // static final TYPE field on the boxed class
-                return DynamicConstantRef.of(BootstrapSpecifier.of(BSM_GET_SATIC_FINAL_DECL, cr.promote()),
+                return DynamicConstantRef.of(BootstrapSpecifier.of(BSM_GET_STATIC_FINAL_DECL, cr.promote()),
                                              "TYPE", ClassRef.CR_Class);
             }
         }