< prev index next >

src/java.base/share/classes/java/lang/constant/DynamicCallSiteDesc.java

Print this page

        

*** 22,31 **** --- 22,33 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ package java.lang.constant; + import jdk.internal.lang.annotation.Foldable; + import java.lang.invoke.CallSite; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.util.Arrays; import java.util.Objects;
*** 100,109 **** --- 102,112 ---- * @throws NullPointerException if any parameter is null * @throws IllegalArgumentException if the invocation name has the incorrect * format * @jvms 4.2.2 Unqualified Names */ + @Foldable public static DynamicCallSiteDesc of(DirectMethodHandleDesc bootstrapMethod, String invocationName, MethodTypeDesc invocationType, ConstantDesc... bootstrapArgs) { return new DynamicCallSiteDesc(bootstrapMethod, invocationName, invocationType, bootstrapArgs);
*** 121,130 **** --- 124,134 ---- * @return the nominal descriptor * @throws NullPointerException if any parameter is null * @throws IllegalArgumentException if the invocation name has the incorrect * format */ + @Foldable public static DynamicCallSiteDesc of(DirectMethodHandleDesc bootstrapMethod, String invocationName, MethodTypeDesc invocationType) { return new DynamicCallSiteDesc(bootstrapMethod, invocationName, invocationType, EMPTY_CONSTANTDESC); }
*** 140,149 **** --- 144,154 ---- * type that would appear in the {@code NameAndType} * operand of the {@code invokedynamic} * @return the nominal descriptor * @throws NullPointerException if any parameter is null */ + @Foldable public static DynamicCallSiteDesc of(DirectMethodHandleDesc bootstrapMethod, MethodTypeDesc invocationType) { return of(bootstrapMethod, ConstantDescs.DEFAULT_NAME, invocationType); }
*** 156,165 **** --- 161,171 ---- * to the bootstrap, that would appear in the * {@code BootstrapMethods} attribute * @return the nominal descriptor * @throws NullPointerException if any parameter is null */ + @Foldable public DynamicCallSiteDesc withArgs(ConstantDesc... bootstrapArgs) { return new DynamicCallSiteDesc(bootstrapMethod, invocationName, invocationType, bootstrapArgs); } /**
*** 176,185 **** --- 182,192 ---- * @throws NullPointerException if any parameter is null * @throws IllegalArgumentException if the invocation name has the incorrect * format * @jvms 4.2.2 Unqualified Names */ + @Foldable public DynamicCallSiteDesc withNameAndType(String invocationName, MethodTypeDesc invocationType) { return new DynamicCallSiteDesc(bootstrapMethod, invocationName, invocationType, bootstrapArgs); }
*** 187,216 **** --- 194,226 ---- * Returns the invocation name that would appear in the {@code NameAndType} * operand of the {@code invokedynamic}. * * @return the invocation name */ + @Foldable public String invocationName() { return invocationName; } /** * Returns a {@link MethodTypeDesc} describing the invocation type that * would appear in the {@code NameAndType} operand of the {@code invokedynamic}. * * @return the invocation type */ + @Foldable public MethodTypeDesc invocationType() { return invocationType; } /** * Returns a {@link MethodHandleDesc} describing the bootstrap method for * the {@code invokedynamic}. * * @return the bootstrap method for the {@code invokedynamic} */ + @Foldable public MethodHandleDesc bootstrapMethod() { return bootstrapMethod; } /** * Returns {@link ConstantDesc}s describing the bootstrap arguments for the * {@code invokedynamic}. The returned array is always non-null. A zero
< prev index next >