--- old/src/java.base/share/classes/java/lang/invoke/package-info.java 2017-08-10 13:48:34.663511990 -0700 +++ new/src/java.base/share/classes/java/lang/invoke/package-info.java 2017-08-10 13:48:34.459503067 -0700 @@ -165,28 +165,33 @@ *

* Given these rules, here are examples of legal bootstrap method declarations, * given various numbers {@code N} of extra arguments. - * The first rows (marked {@code *}) will work for any number of extra arguments. - * + * The first row (marked {@code *}) will work for any number of extra arguments. + *
* - * - * - * - * - * - * - * - * + * + * + * + * + * + * - * - * - * - * + * + * *
Static argument types
NSample bootstrap method
*CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
* - * CallSite bootstrap(Object... args)
* - * CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)
0 - * CallSite bootstrap(Lookup caller, String name, MethodType type)
0 - * CallSite bootstrap(Lookup caller, Object... nameAndType)
1 + *
NSample bootstrap method
* + *
    + *
  • CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args) + *
  • CallSite bootstrap(Object... args) + *
  • CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs) + *
0 + *
    + *
  • CallSite bootstrap(Lookup caller, String name, MethodType type) + *
  • CallSite bootstrap(Lookup caller, Object... nameAndType) + *
1 * CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)
2 - * CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)
2 - * CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)
2CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)
2 + *
    + *
  • CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args) + *
  • CallSite bootstrap(Lookup caller, String name, MethodType type, String... args) + *
  • CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y) + *
* The last example assumes that the extra arguments are of type * {@code CONSTANT_String} and {@code CONSTANT_Integer}, respectively.