8334714: Implement JEP 484: Class-File API

Reviewed-by: liach, vromero
This commit is contained in:
Adam Sotona 2024-11-15 14:38:17 +00:00
parent 6cdebf0e4c
commit 84ffb64cd7
165 changed files with 312 additions and 799 deletions

View file

@ -33,16 +33,14 @@ import java.lang.classfile.Opcode;
import jdk.internal.classfile.impl.AbstractInstruction;
import jdk.internal.classfile.impl.BytecodeHelpers;
import jdk.internal.classfile.impl.Util;
import jdk.internal.javac.PreviewFeature;
/**
* Models instruction discontinued from the {@code code} array of a {@code Code}
* attribute. Delivered as a {@link CodeElement} when traversing the elements of
* a {@link CodeModel}.
*
* @since 22
* @since 24
*/
@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API)
public sealed interface DiscontinuedInstruction extends Instruction {
/**
@ -52,9 +50,8 @@ public sealed interface DiscontinuedInstruction extends Instruction {
* {@link Opcode.Kind#DISCONTINUED_JSR}. Delivered as a {@link CodeElement}
* when traversing the elements of a {@link CodeModel}.
*
* @since 22
* @since 24
*/
@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API)
sealed interface JsrInstruction extends DiscontinuedInstruction
permits AbstractInstruction.BoundJsrInstruction,
AbstractInstruction.UnboundJsrInstruction {
@ -95,9 +92,8 @@ public sealed interface DiscontinuedInstruction extends Instruction {
* {@link Opcode.Kind#DISCONTINUED_RET}. Delivered as a {@link CodeElement}
* when traversing the elements of a {@link CodeModel}.
*
* @since 22
* @since 24
*/
@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API)
sealed interface RetInstruction extends DiscontinuedInstruction
permits AbstractInstruction.BoundRetInstruction,
AbstractInstruction.UnboundRetInstruction {