< prev index next >

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

Print this page

        

*** 22,34 **** --- 22,37 ---- * 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.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; + import java.util.Optional; import static java.lang.constant.ConstantDescs.BSM_INVOKE; import static java.lang.constant.ConstantDescs.CD_MethodHandle; import static java.util.Objects.requireNonNull;
*** 49,58 **** --- 52,62 ---- this.underlying = requireNonNull(underlying); this.type = requireNonNull(type); } @Override + @Foldable public MethodTypeDesc invocationType() { return type; } @Override
*** 65,70 **** --- 69,79 ---- @Override public String toString() { return String.format("%s.asType%s", underlying.toString(), type.displayDescriptor()); } + + @Override + public Optional<? extends ConstantDesc> describeConstable() { + return Optional.empty(); + } }
< prev index next >