< prev index next >
src/java.base/share/classes/java/lang/StringConcatHelper.java
Print this page
rev 58565 : 8238358: Implementation of JEP 371: Hidden Classes
Reviewed-by: duke
Contributed-by: mandy.chung@oracle.com, lois.foltan@oracle.com, david.holmes@oracle.com, harold.seigel@oracle.com, serguei.spitsyn@oracle.com, alex.buckley@oracle.com, jamsheed.c.m@oracle.com
*** 26,35 ****
--- 26,39 ----
package java.lang;
import jdk.internal.misc.Unsafe;
import jdk.internal.vm.annotation.ForceInline;
+ import java.lang.invoke.MethodHandle;
+ import java.lang.invoke.MethodHandles;
+ import java.lang.invoke.MethodType;
+
/**
* Helper for string concatenation. These methods are mostly looked up with private lookups
* from {@link java.lang.invoke.StringConcatFactory}, and used in {@link java.lang.invoke.MethodHandle}
* combinators there.
*/
*** 464,469 ****
--- 468,482 ----
*/
static long initialCoder() {
return String.COMPACT_STRINGS ? LATIN1 : UTF16;
}
+ static MethodHandle lookupStatic(String name, MethodType methodType) {
+ try {
+ return MethodHandles.lookup().findStatic(StringConcatHelper.class, name, methodType);
+ } catch (NoSuchMethodException|IllegalAccessException e) {
+ throw new AssertionError(e);
+ }
+ }
+
+
}
< prev index next >