diff -r 4396b78981be -r 7ba4fe073384 jdk/src/share/classes/java/dyn/InvokeDynamic.java --- a/jdk/src/share/classes/java/dyn/InvokeDynamic.java Thu Dec 16 18:18:06 2010 -0800 +++ b/jdk/src/share/classes/java/dyn/InvokeDynamic.java Thu Dec 16 20:51:55 2010 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,55 +26,8 @@ package java.dyn; /** - * {@code InvokeDynamic} is a class with neither methods nor instances, - * which serves only as a syntactic marker in Java source code for - * an {@code invokedynamic} instruction. - * (See the package information for specifics on this instruction.) - *

- * The {@code invokedynamic} instruction is incomplete without a target method. - * The target method is a property of the reified {@linkplain CallSite call site object} - * which is linked to each active {@code invokedynamic} instruction. - * The call site object is initially produced by a - * {@linkplain BootstrapMethod bootstrap method} - * associated with the class whose bytecodes include the dynamic call site. - *

- * The type {@code InvokeDynamic} has no particular meaning as a - * class or interface supertype, or an object type; it can never be instantiated. - * Logically, it denotes a source of all dynamically typed methods. - * It may be viewed as a pure syntactic marker of static calls. - * It may be imported for ease of use. - *

- * Here are some examples: -


-@BootstrapMethod(value=Here.class, name="bootstrapDynamic")
-static void example() throws Throwable {
-    Object x; String s; int i;
-    x = InvokeDynamic.greet("world"); // greet(Ljava/lang/String;)Ljava/lang/Object;
-    s = (String) InvokeDynamic.hail(x); // hail(Ljava/lang/Object;)Ljava/lang/String;
-    InvokeDynamic.cogito(); // cogito()V
-    i = (int) InvokeDynamic.#"op:+"(2, 3); // "op:+"(II)I
+ * This is a place-holder class.  Some HotSpot implementations need to see it.
+ */
+final class InvokeDynamic {
+    private InvokeDynamic() { throw new InternalError(); }  // do not instantiate
 }
-static MethodHandle bootstrapDynamic(Class caller, String name, MethodType type) { ... }
-
- * Each of the above calls generates a single invokedynamic instruction - * with the name-and-type descriptors indicated in the comments. - *

- * The argument types are taken directly from the actual arguments, - * while the return type corresponds to the target of the assignment. - * (Currently, the return type must be given as a false type parameter. - * This type parameter is an irregular use of the generic type syntax, - * and is likely to change in favor of a convention based on target typing.) - *

- * The final example uses a special syntax for uttering non-Java names. - * Any name legal to the JVM may be given between the double quotes. - *

- * None of these calls is complete without a bootstrap method, - * which must be declared for the enclosing class or method. - * @author John Rose, JSR 292 EG - */ -@MethodHandle.PolymorphicSignature -public final class InvokeDynamic { - private InvokeDynamic() { throw new InternalError(); } // do not instantiate - - // no statically defined static methods -}