From 84ffb64cd73f8af11cf3670c6f19d282c2ac6961 Mon Sep 17 00:00:00 2001 From: Adam Sotona Date: Fri, 15 Nov 2024 14:38:17 +0000 Subject: [PATCH] 8334714: Implement JEP 484: Class-File API Reviewed-by: liach, vromero --- .../java/lang/classfile/AccessFlags.java | 4 +- .../java/lang/classfile/Annotation.java | 4 +- .../lang/classfile/AnnotationElement.java | 4 +- .../java/lang/classfile/AnnotationValue.java | 46 ++++++----------- .../java/lang/classfile/Attribute.java | 4 +- .../java/lang/classfile/AttributeMapper.java | 8 +-- .../lang/classfile/AttributedElement.java | 4 +- .../java/lang/classfile/Attributes.java | 42 +--------------- .../lang/classfile/BootstrapMethodEntry.java | 4 +- .../java/lang/classfile/BufWriter.java | 4 +- .../java/lang/classfile/ClassBuilder.java | 4 +- .../java/lang/classfile/ClassElement.java | 7 +-- .../java/lang/classfile/ClassFile.java | 47 ++++++------------ .../java/lang/classfile/ClassFileBuilder.java | 4 +- .../java/lang/classfile/ClassFileElement.java | 5 +- .../lang/classfile/ClassFileTransform.java | 5 +- .../java/lang/classfile/ClassFileVersion.java | 6 +-- .../classfile/ClassHierarchyResolver.java | 7 +-- .../java/lang/classfile/ClassModel.java | 4 +- .../java/lang/classfile/ClassReader.java | 5 +- .../java/lang/classfile/ClassSignature.java | 12 +---- .../java/lang/classfile/ClassTransform.java | 4 +- .../java/lang/classfile/CodeBuilder.java | 24 ++------- .../java/lang/classfile/CodeElement.java | 7 +-- .../java/lang/classfile/CodeModel.java | 4 +- .../java/lang/classfile/CodeTransform.java | 4 +- .../java/lang/classfile/CompoundElement.java | 5 +- .../java/lang/classfile/CustomAttribute.java | 4 +- .../java/lang/classfile/FieldBuilder.java | 4 +- .../java/lang/classfile/FieldElement.java | 7 +-- .../java/lang/classfile/FieldModel.java | 4 +- .../java/lang/classfile/FieldTransform.java | 4 +- .../java/lang/classfile/Instruction.java | 6 +-- .../java/lang/classfile/Interfaces.java | 6 +-- .../classes/java/lang/classfile/Label.java | 6 +-- .../java/lang/classfile/MethodBuilder.java | 4 +- .../java/lang/classfile/MethodElement.java | 7 +-- .../java/lang/classfile/MethodModel.java | 4 +- .../java/lang/classfile/MethodSignature.java | 4 +- .../java/lang/classfile/MethodTransform.java | 4 +- .../classes/java/lang/classfile/Opcode.java | 7 +-- .../lang/classfile/PseudoInstruction.java | 6 +-- .../java/lang/classfile/Signature.java | 42 +++++----------- .../java/lang/classfile/Superclass.java | 6 +-- .../java/lang/classfile/TypeAnnotation.java | 49 ++++++------------- .../classes/java/lang/classfile/TypeKind.java | 6 +-- .../attribute/AnnotationDefaultAttribute.java | 4 +- .../attribute/BootstrapMethodsAttribute.java | 4 +- .../attribute/CharacterRangeInfo.java | 4 +- .../CharacterRangeTableAttribute.java | 6 +-- .../classfile/attribute/CodeAttribute.java | 4 +- .../attribute/CompilationIDAttribute.java | 6 +-- .../attribute/ConstantValueAttribute.java | 4 +- .../attribute/DeprecatedAttribute.java | 4 +- .../attribute/EnclosingMethodAttribute.java | 4 +- .../attribute/ExceptionsAttribute.java | 4 +- .../classfile/attribute/InnerClassInfo.java | 6 +-- .../attribute/InnerClassesAttribute.java | 4 +- .../classfile/attribute/LineNumberInfo.java | 6 +-- .../attribute/LineNumberTableAttribute.java | 4 +- .../attribute/LocalVariableInfo.java | 6 +-- .../LocalVariableTableAttribute.java | 4 +- .../attribute/LocalVariableTypeInfo.java | 6 +-- .../LocalVariableTypeTableAttribute.java | 4 +- .../attribute/MethodParameterInfo.java | 6 +-- .../attribute/MethodParametersAttribute.java | 4 +- .../classfile/attribute/ModuleAttribute.java | 7 +-- .../classfile/attribute/ModuleExportInfo.java | 6 +-- .../classfile/attribute/ModuleHashInfo.java | 6 +-- .../attribute/ModuleHashesAttribute.java | 6 +-- .../attribute/ModuleMainClassAttribute.java | 4 +- .../classfile/attribute/ModuleOpenInfo.java | 6 +-- .../attribute/ModulePackagesAttribute.java | 4 +- .../attribute/ModuleProvideInfo.java | 6 +-- .../attribute/ModuleRequireInfo.java | 6 +-- .../attribute/ModuleResolutionAttribute.java | 6 +-- .../attribute/ModuleTargetAttribute.java | 6 +-- .../attribute/NestHostAttribute.java | 4 +- .../attribute/NestMembersAttribute.java | 4 +- .../PermittedSubclassesAttribute.java | 4 +- .../classfile/attribute/RecordAttribute.java | 4 +- .../attribute/RecordComponentInfo.java | 6 +-- .../RuntimeInvisibleAnnotationsAttribute.java | 4 +- ...nvisibleParameterAnnotationsAttribute.java | 4 +- ...timeInvisibleTypeAnnotationsAttribute.java | 4 +- .../RuntimeVisibleAnnotationsAttribute.java | 4 +- ...eVisibleParameterAnnotationsAttribute.java | 4 +- ...untimeVisibleTypeAnnotationsAttribute.java | 4 +- .../attribute/SignatureAttribute.java | 4 +- .../SourceDebugExtensionAttribute.java | 6 +-- .../attribute/SourceFileAttribute.java | 4 +- .../attribute/SourceIDAttribute.java | 6 +-- .../attribute/StackMapFrameInfo.java | 16 ++---- .../attribute/StackMapTableAttribute.java | 4 +- .../attribute/SyntheticAttribute.java | 4 +- .../classfile/attribute/UnknownAttribute.java | 6 +-- .../classfile/attribute/package-info.java | 6 +-- .../classfile/components/ClassPrinter.java | 21 +++----- .../classfile/components/ClassRemapper.java | 4 +- .../components/CodeLocalsShifter.java | 6 +-- .../classfile/components/CodeRelabeler.java | 4 +- .../components/CodeStackTracker.java | 4 +- .../classfile/components/package-info.java | 6 +-- .../AnnotationConstantValueEntry.java | 5 +- .../classfile/constantpool/ClassEntry.java | 6 +-- .../constantpool/ConstantDynamicEntry.java | 6 +-- .../classfile/constantpool/ConstantPool.java | 6 +-- .../constantpool/ConstantPoolBuilder.java | 4 +- .../constantpool/ConstantPoolException.java | 6 +-- .../constantpool/ConstantValueEntry.java | 5 +- .../classfile/constantpool/DoubleEntry.java | 4 +- .../DynamicConstantPoolEntry.java | 7 +-- .../classfile/constantpool/FieldRefEntry.java | 6 +-- .../classfile/constantpool/FloatEntry.java | 4 +- .../classfile/constantpool/IntegerEntry.java | 4 +- .../constantpool/InterfaceMethodRefEntry.java | 6 +-- .../constantpool/InvokeDynamicEntry.java | 6 +-- .../constantpool/LoadableConstantEntry.java | 5 +- .../classfile/constantpool/LongEntry.java | 4 +- .../constantpool/MemberRefEntry.java | 6 +-- .../constantpool/MethodHandleEntry.java | 4 +- .../constantpool/MethodRefEntry.java | 6 +-- .../constantpool/MethodTypeEntry.java | 6 +-- .../classfile/constantpool/ModuleEntry.java | 6 +-- .../constantpool/NameAndTypeEntry.java | 6 +-- .../classfile/constantpool/PackageEntry.java | 6 +-- .../classfile/constantpool/PoolEntry.java | 5 +- .../classfile/constantpool/StringEntry.java | 6 +-- .../classfile/constantpool/Utf8Entry.java | 6 +-- .../classfile/constantpool/package-info.java | 6 +-- .../instruction/ArrayLoadInstruction.java | 4 +- .../instruction/ArrayStoreInstruction.java | 4 +- .../instruction/BranchInstruction.java | 6 +-- .../classfile/instruction/CharacterRange.java | 4 +- .../instruction/ConstantInstruction.java | 13 ++--- .../instruction/ConvertInstruction.java | 6 +-- .../instruction/DiscontinuedInstruction.java | 10 ++-- .../classfile/instruction/ExceptionCatch.java | 6 +-- .../instruction/FieldInstruction.java | 6 +-- .../instruction/IncrementInstruction.java | 6 +-- .../instruction/InvokeDynamicInstruction.java | 6 +-- .../instruction/InvokeInstruction.java | 4 +- .../classfile/instruction/LabelTarget.java | 6 +-- .../classfile/instruction/LineNumber.java | 6 +-- .../instruction/LoadInstruction.java | 6 +-- .../classfile/instruction/LocalVariable.java | 4 +- .../instruction/LocalVariableType.java | 4 +- .../instruction/LookupSwitchInstruction.java | 6 +-- .../instruction/MonitorInstruction.java | 6 +-- .../instruction/NewMultiArrayInstruction.java | 6 +-- .../instruction/NewObjectInstruction.java | 6 +-- .../NewPrimitiveArrayInstruction.java | 4 +- .../NewReferenceArrayInstruction.java | 6 +-- .../classfile/instruction/NopInstruction.java | 6 +-- .../instruction/OperatorInstruction.java | 6 +-- .../instruction/ReturnInstruction.java | 6 +-- .../instruction/StackInstruction.java | 6 +-- .../instruction/StoreInstruction.java | 6 +-- .../classfile/instruction/SwitchCase.java | 6 +-- .../instruction/TableSwitchInstruction.java | 6 +-- .../instruction/ThrowInstruction.java | 6 +-- .../instruction/TypeCheckInstruction.java | 6 +-- .../classfile/instruction/package-info.java | 6 +-- .../java/lang/classfile/package-info.java | 5 +- .../jdk/internal/javac/PreviewFeature.java | 2 - 165 files changed, 312 insertions(+), 799 deletions(-) diff --git a/src/java.base/share/classes/java/lang/classfile/AccessFlags.java b/src/java.base/share/classes/java/lang/classfile/AccessFlags.java index 4abe17c1cf5..b1d026f52e4 100644 --- a/src/java.base/share/classes/java/lang/classfile/AccessFlags.java +++ b/src/java.base/share/classes/java/lang/classfile/AccessFlags.java @@ -28,16 +28,14 @@ import java.lang.reflect.AccessFlag; import java.util.Set; import jdk.internal.classfile.impl.AccessFlagsImpl; -import jdk.internal.javac.PreviewFeature; /** * Models the access flags for a class, method, or field. Delivered as a * {@link ClassElement}, {@link FieldElement}, or {@link MethodElement} * when traversing the corresponding model type. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface AccessFlags extends ClassElement, MethodElement, FieldElement permits AccessFlagsImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/Annotation.java b/src/java.base/share/classes/java/lang/classfile/Annotation.java index 4f222084cb7..98b6ea783d5 100644 --- a/src/java.base/share/classes/java/lang/classfile/Annotation.java +++ b/src/java.base/share/classes/java/lang/classfile/Annotation.java @@ -35,7 +35,6 @@ import java.util.List; import jdk.internal.classfile.impl.AnnotationImpl; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models an {@code annotation} structure (JVMS {@jvms 4.7.16}) or part of a {@code @@ -63,9 +62,8 @@ import jdk.internal.javac.PreviewFeature; * @see RuntimeVisibleParameterAnnotationsAttribute * @see RuntimeInvisibleParameterAnnotationsAttribute * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface Annotation permits AnnotationImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/AnnotationElement.java b/src/java.base/share/classes/java/lang/classfile/AnnotationElement.java index 7c4283c49bf..4381bb9733a 100644 --- a/src/java.base/share/classes/java/lang/classfile/AnnotationElement.java +++ b/src/java.base/share/classes/java/lang/classfile/AnnotationElement.java @@ -29,7 +29,6 @@ import java.lang.constant.ClassDesc; import jdk.internal.classfile.impl.AnnotationImpl; import jdk.internal.classfile.impl.TemporaryConstantPool; -import jdk.internal.javac.PreviewFeature; /** * Models an element-value pair in the {@code element_value_pairs} @@ -43,9 +42,8 @@ import jdk.internal.javac.PreviewFeature; * @see Annotation * @see AnnotationValue * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface AnnotationElement permits AnnotationImpl.AnnotationElementImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/AnnotationValue.java b/src/java.base/share/classes/java/lang/classfile/AnnotationValue.java index e1e91f2c9ed..8e92ef59a50 100644 --- a/src/java.base/share/classes/java/lang/classfile/AnnotationValue.java +++ b/src/java.base/share/classes/java/lang/classfile/AnnotationValue.java @@ -33,7 +33,6 @@ import java.util.List; import jdk.internal.classfile.impl.AnnotationImpl; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; @@ -48,18 +47,16 @@ import static java.util.Objects.requireNonNull; * @see AnnotationElement * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface AnnotationValue { /** * Models an annotation value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_ANNOTATION}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfAnnotation extends AnnotationValue permits AnnotationImpl.OfAnnotationImpl { /** {@return the annotation value} */ @@ -70,9 +67,8 @@ public sealed interface AnnotationValue { * Models an array value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_ARRAY}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfArray extends AnnotationValue permits AnnotationImpl.OfArrayImpl { /** @@ -91,9 +87,8 @@ public sealed interface AnnotationValue { * Models a constant value of an element-value pair. * * @sealedGraph - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfConstant extends AnnotationValue { /** * {@return the constant pool entry backing this constant element} @@ -128,9 +123,8 @@ public sealed interface AnnotationValue { * Models a string value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_STRING}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfString extends OfConstant permits AnnotationImpl.OfStringImpl { /** {@return the backing UTF8 entry} */ @@ -156,9 +150,8 @@ public sealed interface AnnotationValue { * Models a double value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_DOUBLE}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfDouble extends OfConstant permits AnnotationImpl.OfDoubleImpl { /** {@return the backing double entry} */ @@ -184,9 +177,8 @@ public sealed interface AnnotationValue { * Models a float value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_FLOAT}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfFloat extends OfConstant permits AnnotationImpl.OfFloatImpl { /** {@return the backing float entry} */ @@ -212,9 +204,8 @@ public sealed interface AnnotationValue { * Models a long value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_LONG}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfLong extends OfConstant permits AnnotationImpl.OfLongImpl { /** {@return the backing long entry} */ @@ -240,9 +231,8 @@ public sealed interface AnnotationValue { * Models an int value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_INT}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfInt extends OfConstant permits AnnotationImpl.OfIntImpl { /** {@return the backing integer entry} */ @@ -268,9 +258,8 @@ public sealed interface AnnotationValue { * Models a short value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_SHORT}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfShort extends OfConstant permits AnnotationImpl.OfShortImpl { /** {@return the backing integer entry} */ @@ -299,9 +288,8 @@ public sealed interface AnnotationValue { * Models a char value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_CHAR}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfChar extends OfConstant permits AnnotationImpl.OfCharImpl { /** {@return the backing integer entry} */ @@ -330,9 +318,8 @@ public sealed interface AnnotationValue { * Models a byte value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_BYTE}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfByte extends OfConstant permits AnnotationImpl.OfByteImpl { /** {@return the backing integer entry} */ @@ -361,9 +348,8 @@ public sealed interface AnnotationValue { * Models a boolean value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_BOOLEAN}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfBoolean extends OfConstant permits AnnotationImpl.OfBooleanImpl { /** {@return the backing integer entry} */ @@ -392,9 +378,8 @@ public sealed interface AnnotationValue { * Models a class value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_CLASS}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfClass extends AnnotationValue permits AnnotationImpl.OfClassImpl { /** {@return the class descriptor string} */ @@ -410,9 +395,8 @@ public sealed interface AnnotationValue { * Models an enum value of an element-value pair. * The {@linkplain #tag tag} of this value is {@value TAG_ENUM}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OfEnum extends AnnotationValue permits AnnotationImpl.OfEnumImpl { /** {@return the enum class descriptor string} */ diff --git a/src/java.base/share/classes/java/lang/classfile/Attribute.java b/src/java.base/share/classes/java/lang/classfile/Attribute.java index 2d559552684..bb5c7bdf8ea 100644 --- a/src/java.base/share/classes/java/lang/classfile/Attribute.java +++ b/src/java.base/share/classes/java/lang/classfile/Attribute.java @@ -29,7 +29,6 @@ import java.lang.classfile.constantpool.Utf8Entry; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models a classfile attribute (JVMS {@jvms 4.7}). Many, though not all, subtypes of @@ -42,9 +41,8 @@ import jdk.internal.javac.PreviewFeature; * @param the attribute type * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface Attribute> extends ClassFileElement permits AnnotationDefaultAttribute, BootstrapMethodsAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/AttributeMapper.java b/src/java.base/share/classes/java/lang/classfile/AttributeMapper.java index 0b46055423a..993da9aa4a8 100644 --- a/src/java.base/share/classes/java/lang/classfile/AttributeMapper.java +++ b/src/java.base/share/classes/java/lang/classfile/AttributeMapper.java @@ -24,8 +24,6 @@ */ package java.lang.classfile; -import jdk.internal.javac.PreviewFeature; - /** * Bidirectional mapper between the classfile representation of an attribute and * how that attribute is modeled in the API. The attribute mapper is used @@ -37,17 +35,15 @@ import jdk.internal.javac.PreviewFeature; * CustomAttribute}. * @param the attribute type * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public interface AttributeMapper> { /** * Attribute stability indicator * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) enum AttributeStability { /** diff --git a/src/java.base/share/classes/java/lang/classfile/AttributedElement.java b/src/java.base/share/classes/java/lang/classfile/AttributedElement.java index fb1bf817480..478ad1e3f0a 100644 --- a/src/java.base/share/classes/java/lang/classfile/AttributedElement.java +++ b/src/java.base/share/classes/java/lang/classfile/AttributedElement.java @@ -31,7 +31,6 @@ import java.util.List; import java.util.Optional; import jdk.internal.classfile.impl.AbstractUnboundModel; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; @@ -40,9 +39,8 @@ import static java.util.Objects.requireNonNull; * as a class, field, method, code attribute, or record component. * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface AttributedElement extends ClassFileElement permits ClassModel, CodeModel, FieldModel, MethodModel, RecordComponentInfo, AbstractUnboundModel { diff --git a/src/java.base/share/classes/java/lang/classfile/Attributes.java b/src/java.base/share/classes/java/lang/classfile/Attributes.java index ad63eec75de..24684a36b02 100644 --- a/src/java.base/share/classes/java/lang/classfile/Attributes.java +++ b/src/java.base/share/classes/java/lang/classfile/Attributes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ import java.lang.classfile.AttributeMapper.AttributeStability; import java.lang.classfile.attribute.*; import jdk.internal.classfile.impl.AbstractAttributeMapper.*; -import jdk.internal.javac.PreviewFeature; /** * Attribute mappers for standard classfile attributes. @@ -89,9 +88,8 @@ import jdk.internal.javac.PreviewFeature; * * @see AttributeMapper * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public final class Attributes { /** AnnotationDefault */ @@ -207,7 +205,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code AnnotationDefault} attribute} - * @since 23 */ public static AttributeMapper annotationDefault() { return AnnotationDefaultMapper.INSTANCE; @@ -215,7 +212,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code BootstrapMethods} attribute} - * @since 23 */ public static AttributeMapper bootstrapMethods() { return BootstrapMethodsMapper.INSTANCE; @@ -224,7 +220,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code CharacterRangeTable} attribute} * The mapper permits multiple instances in a given location. - * @since 23 */ public static AttributeMapper characterRangeTable() { return CharacterRangeTableMapper.INSTANCE; @@ -232,7 +227,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code Code} attribute} - * @since 23 */ public static AttributeMapper code() { return CodeMapper.INSTANCE; @@ -240,7 +234,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code CompilationID} attribute} - * @since 23 */ public static AttributeMapper compilationId() { return CompilationIDMapper.INSTANCE; @@ -248,7 +241,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code ConstantValue} attribute} - * @since 23 */ public static AttributeMapper constantValue() { return ConstantValueMapper.INSTANCE; @@ -257,7 +249,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code Deprecated} attribute} * The mapper permits multiple instances in a given location. - * @since 23 */ public static AttributeMapper deprecated() { return DeprecatedMapper.INSTANCE; @@ -265,7 +256,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code EnclosingMethod} attribute} - * @since 23 */ public static AttributeMapper enclosingMethod() { return EnclosingMethodMapper.INSTANCE; @@ -273,7 +263,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code Exceptions} attribute} - * @since 23 */ public static AttributeMapper exceptions() { return ExceptionsMapper.INSTANCE; @@ -281,7 +270,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code InnerClasses} attribute} - * @since 23 */ public static AttributeMapper innerClasses() { return InnerClassesMapper.INSTANCE; @@ -290,7 +278,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code LineNumberTable} attribute} * The mapper permits multiple instances in a given location. - * @since 23 */ public static AttributeMapper lineNumberTable() { return LineNumberTableMapper.INSTANCE; @@ -299,7 +286,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code LocalVariableTable} attribute} * The mapper permits multiple instances in a given location. - * @since 23 */ public static AttributeMapper localVariableTable() { return LocalVariableTableMapper.INSTANCE; @@ -308,7 +294,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code LocalVariableTypeTable} attribute} * The mapper permits multiple instances in a given location. - * @since 23 */ public static AttributeMapper localVariableTypeTable() { return LocalVariableTypeTableMapper.INSTANCE; @@ -316,7 +301,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code MethodParameters} attribute} - * @since 23 */ public static AttributeMapper methodParameters() { return MethodParametersMapper.INSTANCE; @@ -324,7 +308,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code Module} attribute} - * @since 23 */ public static AttributeMapper module() { return ModuleMapper.INSTANCE; @@ -332,7 +315,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code ModuleHashes} attribute} - * @since 23 */ public static AttributeMapper moduleHashes() { return ModuleHashesMapper.INSTANCE; @@ -340,7 +322,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code ModuleMainClass} attribute} - * @since 23 */ public static AttributeMapper moduleMainClass() { return ModuleMainClassMapper.INSTANCE; @@ -348,7 +329,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code ModulePackages} attribute} - * @since 23 */ public static AttributeMapper modulePackages() { return ModulePackagesMapper.INSTANCE; @@ -356,7 +336,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code ModuleResolution} attribute} - * @since 23 */ public static AttributeMapper moduleResolution() { return ModuleResolutionMapper.INSTANCE; @@ -364,7 +343,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code ModuleTarget} attribute} - * @since 23 */ public static AttributeMapper moduleTarget() { return ModuleTargetMapper.INSTANCE; @@ -372,7 +350,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code NestHost} attribute} - * @since 23 */ public static AttributeMapper nestHost() { return NestHostMapper.INSTANCE; @@ -380,7 +357,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code NestMembers} attribute} - * @since 23 */ public static AttributeMapper nestMembers() { return NestMembersMapper.INSTANCE; @@ -388,7 +364,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code PermittedSubclasses} attribute} - * @since 23 */ public static AttributeMapper permittedSubclasses() { return PermittedSubclassesMapper.INSTANCE; @@ -396,7 +371,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code Record} attribute} - * @since 23 */ public static AttributeMapper record() { return RecordMapper.INSTANCE; @@ -404,7 +378,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code RuntimeInvisibleAnnotations} attribute} - * @since 23 */ public static AttributeMapper runtimeInvisibleAnnotations() { return RuntimeInvisibleAnnotationsMapper.INSTANCE; @@ -412,7 +385,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code RuntimeInvisibleParameterAnnotations} attribute} - * @since 23 */ public static AttributeMapper runtimeInvisibleParameterAnnotations() { return RuntimeInvisibleParameterAnnotationsMapper.INSTANCE; @@ -420,7 +392,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code RuntimeInvisibleTypeAnnotations} attribute} - * @since 23 */ public static AttributeMapper runtimeInvisibleTypeAnnotations() { return RuntimeInvisibleTypeAnnotationsMapper.INSTANCE; @@ -428,7 +399,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code RuntimeVisibleAnnotations} attribute} - * @since 23 */ public static AttributeMapper runtimeVisibleAnnotations() { return RuntimeVisibleAnnotationsMapper.INSTANCE; @@ -436,7 +406,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code RuntimeVisibleParameterAnnotations} attribute} - * @since 23 */ public static AttributeMapper runtimeVisibleParameterAnnotations() { return RuntimeVisibleParameterAnnotationsMapper.INSTANCE; @@ -444,7 +413,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code RuntimeVisibleTypeAnnotations} attribute} - * @since 23 */ public static AttributeMapper runtimeVisibleTypeAnnotations() { return RuntimeVisibleTypeAnnotationsMapper.INSTANCE; @@ -452,7 +420,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code Signature} attribute} - * @since 23 */ public static AttributeMapper signature() { return SignatureMapper.INSTANCE; @@ -460,7 +427,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code SourceDebugExtension} attribute} - * @since 23 */ public static AttributeMapper sourceDebugExtension() { return SourceDebugExtensionMapper.INSTANCE; @@ -468,7 +434,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code SourceFile} attribute} - * @since 23 */ public static AttributeMapper sourceFile() { return SourceFileMapper.INSTANCE; @@ -476,7 +441,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code SourceID} attribute} - * @since 23 */ public static AttributeMapper sourceId() { return SourceIDMapper.INSTANCE; @@ -484,7 +448,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code StackMapTable} attribute} - * @since 23 */ public static AttributeMapper stackMapTable() { return StackMapTableMapper.INSTANCE; @@ -493,7 +456,6 @@ public final class Attributes { /** * {@return Attribute mapper for the {@code Synthetic} attribute} * The mapper permits multiple instances in a given location. - * @since 23 */ public static AttributeMapper synthetic() { return SyntheticMapper.INSTANCE; diff --git a/src/java.base/share/classes/java/lang/classfile/BootstrapMethodEntry.java b/src/java.base/share/classes/java/lang/classfile/BootstrapMethodEntry.java index 964976e0fd5..1608e77bee6 100644 --- a/src/java.base/share/classes/java/lang/classfile/BootstrapMethodEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/BootstrapMethodEntry.java @@ -31,7 +31,6 @@ import java.lang.classfile.constantpool.MethodHandleEntry; import java.util.List; import jdk.internal.classfile.impl.BootstrapMethodEntryImpl; -import jdk.internal.javac.PreviewFeature; /** * Models an entry in the bootstrap method table. The bootstrap method table @@ -39,9 +38,8 @@ import jdk.internal.javac.PreviewFeature; * the {@link ConstantPool}, since the bootstrap method table is logically * part of the constant pool. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface BootstrapMethodEntry permits BootstrapMethodEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/BufWriter.java b/src/java.base/share/classes/java/lang/classfile/BufWriter.java index d60447c1388..c6779583eb1 100644 --- a/src/java.base/share/classes/java/lang/classfile/BufWriter.java +++ b/src/java.base/share/classes/java/lang/classfile/BufWriter.java @@ -29,16 +29,14 @@ import java.lang.classfile.constantpool.ConstantPoolBuilder; import java.lang.classfile.constantpool.PoolEntry; import jdk.internal.classfile.impl.BufWriterImpl; -import jdk.internal.javac.PreviewFeature; /** * Supports writing portions of a classfile to a growable buffer. Methods * are provided to write various standard entities (e.g., {@code u2}, {@code u4}) * to the end of the buffer, as well as to create constant pool entries. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface BufWriter permits BufWriterImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/ClassBuilder.java b/src/java.base/share/classes/java/lang/classfile/ClassBuilder.java index 71f1cc53194..996c63ddd01 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassBuilder.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassBuilder.java @@ -39,7 +39,6 @@ import jdk.internal.classfile.impl.AccessFlagsImpl; import jdk.internal.classfile.impl.ChainedClassBuilder; import jdk.internal.classfile.impl.DirectClassBuilder; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * A builder for classfiles. Builders are not created directly; they are passed @@ -50,9 +49,8 @@ import jdk.internal.javac.PreviewFeature; * * @see ClassTransform * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassBuilder extends ClassFileBuilder permits ChainedClassBuilder, DirectClassBuilder { diff --git a/src/java.base/share/classes/java/lang/classfile/ClassElement.java b/src/java.base/share/classes/java/lang/classfile/ClassElement.java index 6c918b7de4a..c39ab3c4a64 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassElement.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,16 +26,13 @@ package java.lang.classfile; import java.lang.classfile.attribute.*; -import jdk.internal.javac.PreviewFeature; - /** * A marker interface for elements that can appear when traversing * a {@link ClassModel} or be presented to a {@link ClassBuilder}. * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassElement extends ClassFileElement permits AccessFlags, Superclass, Interfaces, ClassFileVersion, FieldModel, MethodModel, diff --git a/src/java.base/share/classes/java/lang/classfile/ClassFile.java b/src/java.base/share/classes/java/lang/classfile/ClassFile.java index 7051228c827..db293f41588 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassFile.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassFile.java @@ -43,7 +43,6 @@ import java.util.function.Function; import jdk.internal.classfile.impl.ClassFileImpl; import jdk.internal.classfile.impl.TemporaryConstantPool; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; import static jdk.internal.constant.ConstantUtils.CD_module_info; @@ -53,9 +52,8 @@ import static jdk.internal.constant.ConstantUtils.CD_module_info; * A {@code ClassFile} has a set of options that condition how parsing and * generation is done. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassFile permits ClassFileImpl { @@ -84,9 +82,8 @@ public sealed interface ClassFile * An option that affects the parsing and writing of classfiles. * * @sealedGraph - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface Option { } @@ -94,9 +91,8 @@ public sealed interface ClassFile * Option describing attribute mappers for custom attributes. * Default is only to process standard attributes. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface AttributeMapperOption extends Option permits ClassFileImpl.AttributeMapperOptionImpl { @@ -119,9 +115,8 @@ public sealed interface ClassFile * Option describing the class hierarchy resolver to use when generating * stack maps. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface ClassHierarchyResolverOption extends Option permits ClassFileImpl.ClassHierarchyResolverOptionImpl { @@ -150,9 +145,8 @@ public sealed interface ClassFile * Default is {@code SHARED_POOL} to preserve the original constant * pool. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) enum ConstantPoolSharingOption implements Option { /** Preserves the original constant pool when transforming classfile */ @@ -167,9 +161,8 @@ public sealed interface ClassFile * Default is {@code PATCH_DEAD_CODE} to automatically patch out unreachable * code with NOPs. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) enum DeadCodeOption implements Option { /** Patch unreachable code */ @@ -188,9 +181,8 @@ public sealed interface ClassFile * Setting this option to {@code DROP_DEAD_LABELS} filters the above * elements instead. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) enum DeadLabelsOption implements Option { /** Fail on unresolved labels */ @@ -207,9 +199,8 @@ public sealed interface ClassFile * reduce the overhead of parsing or transforming classfiles. * Default is {@code PASS_DEBUG} to process debug elements. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) enum DebugElementsOption implements Option { /** Process debug elements */ @@ -225,9 +216,8 @@ public sealed interface ClassFile * classfiles. * Default is {@code PASS_LINE_NUMBERS} to process line numbers. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) enum LineNumbersOption implements Option { /** Process line numbers */ @@ -243,9 +233,8 @@ public sealed interface ClassFile * Default is {@code FIX_SHORT_JUMPS} to automatically rewrite jump * instructions. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) enum ShortJumpsOption implements Option { /** Automatically convert short jumps to long when necessary */ @@ -262,9 +251,8 @@ public sealed interface ClassFile * {@link #JAVA_6_VERSION} the stack maps may not be generated. * @jvms 4.10.1 Verification by Type Checking * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) enum StackMapsOption implements Option { /** Generate stack maps when required */ @@ -284,9 +272,8 @@ public sealed interface ClassFile * Default is {@code PASS_ALL_ATTRIBUTES} to process all original attributes. * @see AttributeMapper.AttributeStability * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) enum AttributesProcessingOption implements Option { /** Process all original attributes during transformation */ @@ -648,16 +635,10 @@ public sealed interface ClassFile /** The class major version of JAVA_22. */ int JAVA_22_VERSION = 66; - /** - * The class major version of JAVA_23. - * @since 23 - */ + /** The class major version of JAVA_23. */ int JAVA_23_VERSION = 67; - /** - * The class major version of JAVA_24. - * @since 24 - */ + /** The class major version of JAVA_24. */ int JAVA_24_VERSION = 68; /** diff --git a/src/java.base/share/classes/java/lang/classfile/ClassFileBuilder.java b/src/java.base/share/classes/java/lang/classfile/ClassFileBuilder.java index 8b3f6544fff..01eeefd0b9b 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassFileBuilder.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassFileBuilder.java @@ -29,7 +29,6 @@ import java.lang.constant.ClassDesc; import java.util.function.Consumer; import jdk.internal.classfile.impl.TransformImpl; -import jdk.internal.javac.PreviewFeature; /** * A builder for a classfile or portion of a classfile. Builders are rarely @@ -44,9 +43,8 @@ import jdk.internal.javac.PreviewFeature; * @see ClassFileTransform * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassFileBuilder> extends Consumer permits ClassBuilder, FieldBuilder, MethodBuilder, CodeBuilder { diff --git a/src/java.base/share/classes/java/lang/classfile/ClassFileElement.java b/src/java.base/share/classes/java/lang/classfile/ClassFileElement.java index a4a8203038f..ed84eb39d53 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassFileElement.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassFileElement.java @@ -24,8 +24,6 @@ */ package java.lang.classfile; -import jdk.internal.javac.PreviewFeature; - /** * Immutable model for a portion of (or the entirety of) a classfile. Elements * that model parts of the classfile that have attributes will implement {@link @@ -35,9 +33,8 @@ import jdk.internal.javac.PreviewFeature; * will implement {@link ClassElement}, {@link MethodElement}, etc. * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassFileElement permits AttributedElement, CompoundElement, Attribute, ClassElement, CodeElement, FieldElement, MethodElement { diff --git a/src/java.base/share/classes/java/lang/classfile/ClassFileTransform.java b/src/java.base/share/classes/java/lang/classfile/ClassFileTransform.java index b9c5210881c..9fdafdf4331 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassFileTransform.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassFileTransform.java @@ -27,8 +27,6 @@ package java.lang.classfile; import java.lang.classfile.attribute.RuntimeVisibleAnnotationsAttribute; import java.util.function.Supplier; -import jdk.internal.javac.PreviewFeature; - /** * A transformation on streams of elements. Transforms are used during * transformation of classfile entities; a transform is provided to a method like @@ -73,9 +71,8 @@ import jdk.internal.javac.PreviewFeature; * @param the builder type * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassFileTransform< C extends ClassFileTransform, E extends ClassFileElement, diff --git a/src/java.base/share/classes/java/lang/classfile/ClassFileVersion.java b/src/java.base/share/classes/java/lang/classfile/ClassFileVersion.java index b6ef3e57f61..1916a185cc8 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassFileVersion.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassFileVersion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,16 +25,14 @@ package java.lang.classfile; import jdk.internal.classfile.impl.ClassFileVersionImpl; -import jdk.internal.javac.PreviewFeature; /** * Models the classfile version information for a class. Delivered as a {@link * java.lang.classfile.ClassElement} when traversing the elements of a {@link * ClassModel}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassFileVersion extends ClassElement permits ClassFileVersionImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/ClassHierarchyResolver.java b/src/java.base/share/classes/java/lang/classfile/ClassHierarchyResolver.java index c2719e7aae0..2c612854a64 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassHierarchyResolver.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassHierarchyResolver.java @@ -37,7 +37,6 @@ import jdk.internal.classfile.impl.ClassHierarchyImpl; import jdk.internal.classfile.impl.ClassHierarchyImpl.ClassLoadingClassHierarchyResolver; import jdk.internal.classfile.impl.ClassHierarchyImpl.StaticClassHierarchyResolver; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; import static java.lang.constant.ConstantDescs.CD_Object; import static java.util.Objects.requireNonNull; @@ -46,9 +45,8 @@ import static java.util.Objects.requireNonNull; * Provides class hierarchy information for generating correct stack maps * during code building. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) @FunctionalInterface public interface ClassHierarchyResolver { @@ -71,9 +69,8 @@ public interface ClassHierarchyResolver { /** * Information about a resolved class. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface ClassHierarchyInfo permits ClassHierarchyImpl.ClassHierarchyInfoImpl { /** diff --git a/src/java.base/share/classes/java/lang/classfile/ClassModel.java b/src/java.base/share/classes/java/lang/classfile/ClassModel.java index 915b662b488..db804348cfe 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassModel.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassModel.java @@ -31,16 +31,14 @@ import java.util.List; import java.util.Optional; import jdk.internal.classfile.impl.ClassImpl; -import jdk.internal.javac.PreviewFeature; /** * Models a classfile. The contents of the classfile can be traversed via * a streaming view, or via random access (e.g., * {@link #flags()}), or by freely mixing the two. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassModel extends CompoundElement, AttributedElement permits ClassImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/ClassReader.java b/src/java.base/share/classes/java/lang/classfile/ClassReader.java index 58ee2aae5e5..93f2ac5c810 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassReader.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassReader.java @@ -33,7 +33,6 @@ import java.util.Optional; import java.util.function.Function; import jdk.internal.classfile.impl.ClassReaderImpl; -import jdk.internal.javac.PreviewFeature; /** * Supports reading from a classfile. Methods are provided to read data of @@ -42,9 +41,8 @@ import jdk.internal.javac.PreviewFeature; * Encapsulates additional reading context such as mappers for custom attributes * and processing options. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassReader extends ConstantPool permits ClassReaderImpl { @@ -122,7 +120,6 @@ public sealed interface ClassReader extends ConstantPool * @param cls the entry type * @throws ConstantPoolException if the index is out of range of the * constant pool size, or zero, or the entry is not of the given type - * @since 23 */ T readEntryOrNull(int offset, Class cls); diff --git a/src/java.base/share/classes/java/lang/classfile/ClassSignature.java b/src/java.base/share/classes/java/lang/classfile/ClassSignature.java index 5a57144c4ab..0e1329fd167 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassSignature.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassSignature.java @@ -27,27 +27,21 @@ package java.lang.classfile; import java.util.List; import jdk.internal.classfile.impl.SignaturesImpl; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; /** * Models the generic signature of a class file, as defined by JVMS {@jvms 4.7.9}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassSignature permits SignaturesImpl.ClassSignatureImpl { /** {@return the type parameters of this class} */ List typeParameters(); - /** - * {@return the instantiation of the superclass in this signature} - * - * @since 23 - */ + /** {@return the instantiation of the superclass in this signature} */ Signature.ClassTypeSig superclassSignature(); /** {@return the instantiation of the interfaces in this signature} */ @@ -60,7 +54,6 @@ public sealed interface ClassSignature * {@return a class signature} * @param superclassSignature the superclass * @param superinterfaceSignatures the interfaces - * @since 23 */ public static ClassSignature of(Signature.ClassTypeSig superclassSignature, Signature.ClassTypeSig... superinterfaceSignatures) { @@ -72,7 +65,6 @@ public sealed interface ClassSignature * @param typeParameters the type parameters * @param superclassSignature the superclass * @param superinterfaceSignatures the interfaces - * @since 23 */ public static ClassSignature of(List typeParameters, Signature.ClassTypeSig superclassSignature, diff --git a/src/java.base/share/classes/java/lang/classfile/ClassTransform.java b/src/java.base/share/classes/java/lang/classfile/ClassTransform.java index f512683a9b6..82b61a15089 100644 --- a/src/java.base/share/classes/java/lang/classfile/ClassTransform.java +++ b/src/java.base/share/classes/java/lang/classfile/ClassTransform.java @@ -30,7 +30,6 @@ import java.util.function.Predicate; import java.util.function.Supplier; import jdk.internal.classfile.impl.TransformImpl; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; @@ -39,9 +38,8 @@ import static java.util.Objects.requireNonNull; * * @see ClassFileTransform * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) @FunctionalInterface public non-sealed interface ClassTransform extends ClassFileTransform { diff --git a/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java b/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java index 11e83550d23..1a074c1554a 100644 --- a/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java +++ b/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java @@ -39,7 +39,6 @@ import java.util.Optional; import java.util.function.Consumer; import jdk.internal.classfile.impl.*; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; import static jdk.internal.classfile.impl.BytecodeHelpers.handleDescToHandleInfo; @@ -75,9 +74,8 @@ import static jdk.internal.classfile.impl.BytecodeHelpers.handleDescToHandleInfo * * @see CodeTransform * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CodeBuilder extends ClassFileBuilder permits CodeBuilder.BlockCodeBuilder, ChainedCodeBuilder, TerminalCodeBuilder, NonterminalCodeBuilder { @@ -149,9 +147,8 @@ public sealed interface CodeBuilder /** * A builder for blocks of code. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface BlockCodeBuilder extends CodeBuilder permits BlockCodeBuilderImpl { /** @@ -290,9 +287,8 @@ public sealed interface CodeBuilder * * @see #trying * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface CatchBuilder permits CatchBuilderImpl { /** * Adds a catch block that catches an exception of the given type. @@ -385,7 +381,6 @@ public sealed interface CodeBuilder * @return this builder * @throws IllegalArgumentException if {@code tk} is {@link TypeKind#VOID void} * or {@code slot} is out of range - * @since 23 */ default CodeBuilder loadLocal(TypeKind tk, int slot) { return with(LoadInstruction.of(tk, slot)); @@ -398,7 +393,6 @@ public sealed interface CodeBuilder * @return this builder * @throws IllegalArgumentException if {@code tk} is {@link TypeKind#VOID void} * or {@code slot} is out of range - * @since 23 */ default CodeBuilder storeLocal(TypeKind tk, int slot) { return with(StoreInstruction.of(tk, slot)); @@ -410,7 +404,6 @@ public sealed interface CodeBuilder * @param op the branch opcode * @param target the branch target * @return this builder - * @since 23 */ default CodeBuilder branch(Opcode op, Label target) { return with(BranchInstruction.of(op, target)); @@ -420,7 +413,6 @@ public sealed interface CodeBuilder * Generate return instruction * @param tk the return type * @return this builder - * @since 23 */ default CodeBuilder return_(TypeKind tk) { return with(ReturnInstruction.of(tk)); @@ -432,7 +424,6 @@ public sealed interface CodeBuilder * @param opcode the field access opcode * @param ref the field reference * @return this builder - * @since 23 */ default CodeBuilder fieldAccess(Opcode opcode, FieldRefEntry ref) { return with(FieldInstruction.of(opcode, ref)); @@ -446,7 +437,6 @@ public sealed interface CodeBuilder * @param name the field name * @param type the field type * @return this builder - * @since 23 */ default CodeBuilder fieldAccess(Opcode opcode, ClassDesc owner, String name, ClassDesc type) { return fieldAccess(opcode, constantPool().fieldRefEntry(owner, name, type)); @@ -458,7 +448,6 @@ public sealed interface CodeBuilder * @param opcode the invoke opcode * @param ref the interface method or method reference * @return this builder - * @since 23 */ default CodeBuilder invoke(Opcode opcode, MemberRefEntry ref) { return with(InvokeInstruction.of(opcode, ref)); @@ -473,7 +462,6 @@ public sealed interface CodeBuilder * @param desc the method type * @param isInterface the interface method invocation indication * @return this builder - * @since 23 */ default CodeBuilder invoke(Opcode opcode, ClassDesc owner, String name, MethodTypeDesc desc, boolean isInterface) { return invoke(opcode, @@ -485,7 +473,6 @@ public sealed interface CodeBuilder * Generate an instruction to load from an array * @param tk the array element type * @return this builder - * @since 23 */ default CodeBuilder arrayLoad(TypeKind tk) { Opcode opcode = BytecodeHelpers.arrayLoadOpcode(tk); @@ -496,7 +483,6 @@ public sealed interface CodeBuilder * Generate an instruction to store into an array * @param tk the array element type * @return this builder - * @since 23 */ default CodeBuilder arrayStore(TypeKind tk) { Opcode opcode = BytecodeHelpers.arrayStoreOpcode(tk); @@ -510,7 +496,6 @@ public sealed interface CodeBuilder * @return this builder * @throws IllegalArgumentException for conversions of {@link TypeKind#VOID void} or * {@link TypeKind#REFERENCE reference} - * @since 23 */ default CodeBuilder conversion(TypeKind fromType, TypeKind toType) { var computationalFrom = fromType.asLoadable(); @@ -566,7 +551,6 @@ public sealed interface CodeBuilder * Generate an instruction pushing a constant onto the operand stack * @param value the constant value * @return this builder - * @since 23 */ default CodeBuilder loadConstant(ConstantDesc value) { //avoid switch expressions here @@ -1740,7 +1724,6 @@ public sealed interface CodeBuilder * * @param target the target type * @return this builder - * @since 23 */ default CodeBuilder instanceOf(ClassEntry target) { return with(TypeCheckInstruction.of(Opcode.INSTANCEOF, target)); @@ -1756,7 +1739,6 @@ public sealed interface CodeBuilder * @param target the target type * @return this builder * @throws IllegalArgumentException if {@code target} represents a primitive type - * @since 23 */ default CodeBuilder instanceOf(ClassDesc target) { return instanceOf(constantPool().classEntry(target)); diff --git a/src/java.base/share/classes/java/lang/classfile/CodeElement.java b/src/java.base/share/classes/java/lang/classfile/CodeElement.java index 1cec4b8e604..63669d41014 100644 --- a/src/java.base/share/classes/java/lang/classfile/CodeElement.java +++ b/src/java.base/share/classes/java/lang/classfile/CodeElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,8 +28,6 @@ import java.lang.classfile.attribute.RuntimeInvisibleTypeAnnotationsAttribute; import java.lang.classfile.attribute.RuntimeVisibleTypeAnnotationsAttribute; import java.lang.classfile.attribute.StackMapTableAttribute; -import jdk.internal.javac.PreviewFeature; - /** * A marker interface for elements that can appear when traversing * a {@link CodeModel} or be presented to a {@link CodeBuilder}. Code elements @@ -39,9 +37,8 @@ import jdk.internal.javac.PreviewFeature; * exception metadata, label target metadata, etc. * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CodeElement extends ClassFileElement permits Instruction, PseudoInstruction, CustomAttribute, RuntimeVisibleTypeAnnotationsAttribute, RuntimeInvisibleTypeAnnotationsAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/CodeModel.java b/src/java.base/share/classes/java/lang/classfile/CodeModel.java index 759aacc18c9..644f7660564 100644 --- a/src/java.base/share/classes/java/lang/classfile/CodeModel.java +++ b/src/java.base/share/classes/java/lang/classfile/CodeModel.java @@ -31,15 +31,13 @@ import java.util.List; import java.util.Optional; import jdk.internal.classfile.impl.BufferedCodeBuilder; -import jdk.internal.javac.PreviewFeature; /** * Models the body of a method (the {@code Code} attribute). The instructions * of the method body are accessed via a streaming view. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CodeModel extends CompoundElement, AttributedElement, MethodElement permits CodeAttribute, BufferedCodeBuilder.Model { diff --git a/src/java.base/share/classes/java/lang/classfile/CodeTransform.java b/src/java.base/share/classes/java/lang/classfile/CodeTransform.java index 0474e0c9c67..b76c02bf5fb 100644 --- a/src/java.base/share/classes/java/lang/classfile/CodeTransform.java +++ b/src/java.base/share/classes/java/lang/classfile/CodeTransform.java @@ -28,7 +28,6 @@ import java.util.function.Consumer; import java.util.function.Supplier; import jdk.internal.classfile.impl.TransformImpl; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; @@ -37,9 +36,8 @@ import static java.util.Objects.requireNonNull; * * @see ClassFileTransform * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) @FunctionalInterface public non-sealed interface CodeTransform extends ClassFileTransform { diff --git a/src/java.base/share/classes/java/lang/classfile/CompoundElement.java b/src/java.base/share/classes/java/lang/classfile/CompoundElement.java index 5dfeac6f00d..38d149623e1 100644 --- a/src/java.base/share/classes/java/lang/classfile/CompoundElement.java +++ b/src/java.base/share/classes/java/lang/classfile/CompoundElement.java @@ -34,8 +34,6 @@ import java.util.function.Consumer; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import jdk.internal.javac.PreviewFeature; - /** * A {@link ClassFileElement} that has complex structure defined in terms of * other classfile elements, such as a method, field, method body, or entire @@ -46,9 +44,8 @@ import jdk.internal.javac.PreviewFeature; * @param the element type * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CompoundElement extends ClassFileElement, Iterable permits ClassModel, CodeModel, FieldModel, MethodModel, jdk.internal.classfile.impl.AbstractUnboundModel { diff --git a/src/java.base/share/classes/java/lang/classfile/CustomAttribute.java b/src/java.base/share/classes/java/lang/classfile/CustomAttribute.java index 6c3a0de2b7a..f47ce9f055b 100644 --- a/src/java.base/share/classes/java/lang/classfile/CustomAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/CustomAttribute.java @@ -26,7 +26,6 @@ package java.lang.classfile; import java.lang.classfile.constantpool.Utf8Entry; import jdk.internal.classfile.impl.TemporaryConstantPool; -import jdk.internal.javac.PreviewFeature; /** * Models a non-standard attribute of a classfile. Clients should extend @@ -35,9 +34,8 @@ import jdk.internal.javac.PreviewFeature; * format and the {@linkplain CustomAttribute} representation. * @param the custom attribute type * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public abstract non-sealed class CustomAttribute> implements Attribute, CodeElement, ClassElement, MethodElement, FieldElement { diff --git a/src/java.base/share/classes/java/lang/classfile/FieldBuilder.java b/src/java.base/share/classes/java/lang/classfile/FieldBuilder.java index d3183644657..c473e09cab7 100644 --- a/src/java.base/share/classes/java/lang/classfile/FieldBuilder.java +++ b/src/java.base/share/classes/java/lang/classfile/FieldBuilder.java @@ -32,7 +32,6 @@ import java.util.function.Consumer; import jdk.internal.classfile.impl.AccessFlagsImpl; import jdk.internal.classfile.impl.ChainedFieldBuilder; import jdk.internal.classfile.impl.TerminalFieldBuilder; -import jdk.internal.javac.PreviewFeature; /** * A builder for fields. Builders are not created directly; they are passed @@ -43,9 +42,8 @@ import jdk.internal.javac.PreviewFeature; * * @see FieldTransform * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface FieldBuilder extends ClassFileBuilder permits TerminalFieldBuilder, ChainedFieldBuilder { diff --git a/src/java.base/share/classes/java/lang/classfile/FieldElement.java b/src/java.base/share/classes/java/lang/classfile/FieldElement.java index b4af9971981..a2c1b22751e 100644 --- a/src/java.base/share/classes/java/lang/classfile/FieldElement.java +++ b/src/java.base/share/classes/java/lang/classfile/FieldElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,16 +26,13 @@ package java.lang.classfile; import java.lang.classfile.attribute.*; -import jdk.internal.javac.PreviewFeature; - /** * A marker interface for elements that can appear when traversing * a {@link FieldModel} or be presented to a {@link FieldBuilder}. * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface FieldElement extends ClassFileElement permits AccessFlags, CustomAttribute, ConstantValueAttribute, DeprecatedAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/FieldModel.java b/src/java.base/share/classes/java/lang/classfile/FieldModel.java index c45f3e88d5d..89fa1e192b0 100644 --- a/src/java.base/share/classes/java/lang/classfile/FieldModel.java +++ b/src/java.base/share/classes/java/lang/classfile/FieldModel.java @@ -32,16 +32,14 @@ import java.util.Optional; import jdk.internal.classfile.impl.BufferedFieldBuilder; import jdk.internal.classfile.impl.FieldImpl; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a field. The contents of the field can be traversed via * a streaming view, or via random access (e.g., * {@link #flags()}), or by freely mixing the two. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface FieldModel extends CompoundElement, AttributedElement, ClassElement permits BufferedFieldBuilder.Model, FieldImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/FieldTransform.java b/src/java.base/share/classes/java/lang/classfile/FieldTransform.java index 78a6f5ead2f..90313ae48f0 100644 --- a/src/java.base/share/classes/java/lang/classfile/FieldTransform.java +++ b/src/java.base/share/classes/java/lang/classfile/FieldTransform.java @@ -29,7 +29,6 @@ import java.util.function.Predicate; import java.util.function.Supplier; import jdk.internal.classfile.impl.TransformImpl; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; @@ -38,9 +37,8 @@ import static java.util.Objects.requireNonNull; * * @see ClassFileTransform * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) @FunctionalInterface public non-sealed interface FieldTransform extends ClassFileTransform { diff --git a/src/java.base/share/classes/java/lang/classfile/Instruction.java b/src/java.base/share/classes/java/lang/classfile/Instruction.java index 210c1e1b0da..2fe0ec5a588 100644 --- a/src/java.base/share/classes/java/lang/classfile/Instruction.java +++ b/src/java.base/share/classes/java/lang/classfile/Instruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,14 +28,12 @@ package java.lang.classfile; import java.lang.classfile.instruction.*; import jdk.internal.classfile.impl.AbstractInstruction; -import jdk.internal.javac.PreviewFeature; /** * Models an executable instruction in a method body. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface Instruction extends CodeElement permits ArrayLoadInstruction, ArrayStoreInstruction, BranchInstruction, ConstantInstruction, ConvertInstruction, DiscontinuedInstruction, diff --git a/src/java.base/share/classes/java/lang/classfile/Interfaces.java b/src/java.base/share/classes/java/lang/classfile/Interfaces.java index ff1dda17de8..2c0e5b2e54b 100644 --- a/src/java.base/share/classes/java/lang/classfile/Interfaces.java +++ b/src/java.base/share/classes/java/lang/classfile/Interfaces.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,15 +31,13 @@ import java.util.List; import jdk.internal.classfile.impl.InterfacesImpl; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models the interfaces of a class. Delivered as a {@link * java.lang.classfile.ClassElement} when traversing a {@link ClassModel}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface Interfaces extends ClassElement permits InterfacesImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/Label.java b/src/java.base/share/classes/java/lang/classfile/Label.java index 5069b935935..e958e116084 100644 --- a/src/java.base/share/classes/java/lang/classfile/Label.java +++ b/src/java.base/share/classes/java/lang/classfile/Label.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,6 @@ package java.lang.classfile; import jdk.internal.classfile.impl.LabelImpl; -import jdk.internal.javac.PreviewFeature; /** * A marker for a position within the instructions of a method body. The @@ -40,9 +39,8 @@ import jdk.internal.javac.PreviewFeature; * can be bound to the current position within a {@linkplain CodeBuilder} via * {@link CodeBuilder#labelBinding(Label)} or {@link CodeBuilder#with(ClassFileElement)}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface Label permits LabelImpl { } diff --git a/src/java.base/share/classes/java/lang/classfile/MethodBuilder.java b/src/java.base/share/classes/java/lang/classfile/MethodBuilder.java index 6607d19b0ac..747cbe2e107 100644 --- a/src/java.base/share/classes/java/lang/classfile/MethodBuilder.java +++ b/src/java.base/share/classes/java/lang/classfile/MethodBuilder.java @@ -32,7 +32,6 @@ import java.util.function.Consumer; import jdk.internal.classfile.impl.AccessFlagsImpl; import jdk.internal.classfile.impl.ChainedMethodBuilder; import jdk.internal.classfile.impl.TerminalMethodBuilder; -import jdk.internal.javac.PreviewFeature; /** * A builder for methods. Builders are not created directly; they are passed @@ -43,9 +42,8 @@ import jdk.internal.javac.PreviewFeature; * * @see MethodTransform * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface MethodBuilder extends ClassFileBuilder permits ChainedMethodBuilder, TerminalMethodBuilder { diff --git a/src/java.base/share/classes/java/lang/classfile/MethodElement.java b/src/java.base/share/classes/java/lang/classfile/MethodElement.java index dd23548c360..77254a6a82c 100644 --- a/src/java.base/share/classes/java/lang/classfile/MethodElement.java +++ b/src/java.base/share/classes/java/lang/classfile/MethodElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,16 +26,13 @@ package java.lang.classfile; import java.lang.classfile.attribute.*; -import jdk.internal.javac.PreviewFeature; - /** * A marker interface for elements that can appear when traversing * a {@link MethodModel} or be presented to a {@link MethodBuilder}. * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface MethodElement extends ClassFileElement permits AccessFlags, CodeModel, CustomAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/MethodModel.java b/src/java.base/share/classes/java/lang/classfile/MethodModel.java index 568036e464d..d88051a5eb3 100644 --- a/src/java.base/share/classes/java/lang/classfile/MethodModel.java +++ b/src/java.base/share/classes/java/lang/classfile/MethodModel.java @@ -32,16 +32,14 @@ import java.util.Optional; import jdk.internal.classfile.impl.BufferedMethodBuilder; import jdk.internal.classfile.impl.MethodImpl; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a method. The contents of the method can be traversed via * a streaming view, or via random access (e.g., * {@link #flags()}), or by freely mixing the two. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface MethodModel extends CompoundElement, AttributedElement, ClassElement permits BufferedMethodBuilder.Model, MethodImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/MethodSignature.java b/src/java.base/share/classes/java/lang/classfile/MethodSignature.java index 7235c368a45..e3889395e32 100644 --- a/src/java.base/share/classes/java/lang/classfile/MethodSignature.java +++ b/src/java.base/share/classes/java/lang/classfile/MethodSignature.java @@ -29,16 +29,14 @@ import java.util.List; import jdk.internal.classfile.impl.SignaturesImpl; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; /** * Models the generic signature of a method, as defined by JVMS {@jvms 4.7.9}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface MethodSignature permits SignaturesImpl.MethodSignatureImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/MethodTransform.java b/src/java.base/share/classes/java/lang/classfile/MethodTransform.java index bf5786f3dc7..865fadbae87 100644 --- a/src/java.base/share/classes/java/lang/classfile/MethodTransform.java +++ b/src/java.base/share/classes/java/lang/classfile/MethodTransform.java @@ -29,7 +29,6 @@ import java.util.function.Predicate; import java.util.function.Supplier; import jdk.internal.classfile.impl.TransformImpl; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; @@ -38,9 +37,8 @@ import static java.util.Objects.requireNonNull; * * @see ClassFileTransform * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) @FunctionalInterface public non-sealed interface MethodTransform extends ClassFileTransform { diff --git a/src/java.base/share/classes/java/lang/classfile/Opcode.java b/src/java.base/share/classes/java/lang/classfile/Opcode.java index 735510dbcea..4d333400001 100644 --- a/src/java.base/share/classes/java/lang/classfile/Opcode.java +++ b/src/java.base/share/classes/java/lang/classfile/Opcode.java @@ -25,7 +25,6 @@ package java.lang.classfile; import jdk.internal.classfile.impl.RawBytecodeHelper; -import jdk.internal.javac.PreviewFeature; /** * Describes the opcodes of the JVM instruction set, as described in JVMS {@jvms 6.5}. @@ -35,9 +34,8 @@ import jdk.internal.javac.PreviewFeature; * @see Instruction * @see PseudoInstruction * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public enum Opcode { /** Do nothing */ @@ -697,9 +695,8 @@ public enum Opcode { /** * Kinds of opcodes. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public static enum Kind { /** diff --git a/src/java.base/share/classes/java/lang/classfile/PseudoInstruction.java b/src/java.base/share/classes/java/lang/classfile/PseudoInstruction.java index b152756acfd..456bce04c80 100644 --- a/src/java.base/share/classes/java/lang/classfile/PseudoInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/PseudoInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,6 @@ import java.lang.classfile.instruction.LocalVariable; import java.lang.classfile.instruction.LocalVariableType; import jdk.internal.classfile.impl.AbstractPseudoInstruction; -import jdk.internal.javac.PreviewFeature; /** * Models metadata about a {@link CodeAttribute}, such as entries in the @@ -43,9 +42,8 @@ import jdk.internal.javac.PreviewFeature; * pseudo-instructions can be disabled by modifying the value of classfile * options (e.g., {@link ClassFile.DebugElementsOption}). * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface PseudoInstruction extends CodeElement permits CharacterRange, ExceptionCatch, LabelTarget, LineNumber, LocalVariable, LocalVariableType, AbstractPseudoInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/Signature.java b/src/java.base/share/classes/java/lang/classfile/Signature.java index 7255a41528c..ad2dca0ad46 100644 --- a/src/java.base/share/classes/java/lang/classfile/Signature.java +++ b/src/java.base/share/classes/java/lang/classfile/Signature.java @@ -30,7 +30,6 @@ import java.util.Optional; import jdk.internal.classfile.impl.SignaturesImpl; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; @@ -38,9 +37,8 @@ import static java.util.Objects.requireNonNull; * Models generic Java type signatures, as defined in JVMS {@jvms 4.7.9.1}. * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface Signature { /** {@return the raw signature string} */ @@ -71,9 +69,8 @@ public sealed interface Signature { /** * Models the signature of a primitive type or void * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface BaseTypeSig extends Signature permits SignaturesImpl.BaseTypeSigImpl { @@ -108,9 +105,8 @@ public sealed interface Signature { * type variable, or array type. * * @sealedGraph - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface RefTypeSig extends Signature permits ArrayTypeSig, ClassTypeSig, TypeVarSig { @@ -119,9 +115,8 @@ public sealed interface Signature { /** * Models the signature of a possibly-parameterized class or interface type. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassTypeSig extends RefTypeSig, ThrowableSig permits SignaturesImpl.ClassTypeSigImpl { @@ -187,31 +182,27 @@ public sealed interface Signature { * Models the type argument. * * @sealedGraph - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface TypeArg { /** * Models an unbounded type argument {@code *}. - * @since 23 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface Unbounded extends TypeArg permits SignaturesImpl.UnboundedTypeArgImpl { } /** * Models a type argument with an explicit bound type. - * @since 23 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface Bounded extends TypeArg permits SignaturesImpl.TypeArgImpl { /** * Models a type argument's wildcard indicator. - * @since 23 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public enum WildcardIndicator { /** @@ -243,7 +234,6 @@ public sealed interface Signature { /** * {@return a bounded type arg} * @param boundType the bound - * @since 23 */ public static TypeArg.Bounded of(RefTypeSig boundType) { requireNonNull(boundType); @@ -252,7 +242,6 @@ public sealed interface Signature { /** * {@return an unbounded type arg} - * @since 23 */ public static TypeArg.Unbounded unbounded() { return SignaturesImpl.UnboundedTypeArgImpl.INSTANCE; @@ -261,7 +250,6 @@ public sealed interface Signature { /** * {@return an upper-bounded type arg} * @param boundType the upper bound - * @since 23 */ public static TypeArg.Bounded extendsOf(RefTypeSig boundType) { requireNonNull(boundType); @@ -271,7 +259,6 @@ public sealed interface Signature { /** * {@return a lower-bounded type arg} * @param boundType the lower bound - * @since 23 */ public static TypeArg.Bounded superOf(RefTypeSig boundType) { requireNonNull(boundType); @@ -282,7 +269,6 @@ public sealed interface Signature { * {@return a bounded type arg} * @param wildcard the wild card * @param boundType optional bound type - * @since 23 */ public static TypeArg.Bounded bounded(Bounded.WildcardIndicator wildcard, RefTypeSig boundType) { requireNonNull(wildcard); @@ -294,9 +280,8 @@ public sealed interface Signature { /** * Models the signature of a type variable. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface TypeVarSig extends RefTypeSig, ThrowableSig permits SignaturesImpl.TypeVarSigImpl { @@ -316,9 +301,8 @@ public sealed interface Signature { /** * Models the signature of an array type. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ArrayTypeSig extends RefTypeSig permits SignaturesImpl.ArrayTypeSigImpl { @@ -352,9 +336,8 @@ public sealed interface Signature { /** * Models a signature for a type parameter of a generic class or method. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface TypeParam permits SignaturesImpl.TypeParamImpl { @@ -398,9 +381,8 @@ public sealed interface Signature { * Models a signature for a throwable type. * * @sealedGraph - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ThrowableSig extends Signature { } } diff --git a/src/java.base/share/classes/java/lang/classfile/Superclass.java b/src/java.base/share/classes/java/lang/classfile/Superclass.java index a69fac6341a..fe30fe8a8e3 100644 --- a/src/java.base/share/classes/java/lang/classfile/Superclass.java +++ b/src/java.base/share/classes/java/lang/classfile/Superclass.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,15 +27,13 @@ package java.lang.classfile; import java.lang.classfile.constantpool.ClassEntry; import jdk.internal.classfile.impl.SuperclassImpl; -import jdk.internal.javac.PreviewFeature; /** * Models the superclass of a class. Delivered as a {@link * java.lang.classfile.ClassElement} when traversing a {@link ClassModel}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface Superclass extends ClassElement permits SuperclassImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/TypeAnnotation.java b/src/java.base/share/classes/java/lang/classfile/TypeAnnotation.java index 38e5ea09a93..9353b30a643 100644 --- a/src/java.base/share/classes/java/lang/classfile/TypeAnnotation.java +++ b/src/java.base/share/classes/java/lang/classfile/TypeAnnotation.java @@ -31,7 +31,6 @@ import java.util.List; import jdk.internal.classfile.impl.TargetInfoImpl; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; import static java.lang.classfile.TypeAnnotation.TargetInfo.*; @@ -52,18 +51,16 @@ import static java.lang.classfile.TypeAnnotation.TargetInfo.*; * @see RuntimeVisibleTypeAnnotationsAttribute * @see RuntimeInvisibleTypeAnnotationsAttribute * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface TypeAnnotation permits UnboundAttribute.UnboundTypeAnnotation { /** * The kind of target on which the annotation appears, as defined in JVMS {@jvms 4.7.20.1}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public enum TargetType { /** For annotations on a class type parameter declaration. */ CLASS_TYPE_PARAMETER(TARGET_CLASS_TYPE_PARAMETER, 1), @@ -193,9 +190,8 @@ public sealed interface TypeAnnotation * Specifies which type in a declaration or expression is being annotated. * * @sealedGraph - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface TargetInfo { /** @@ -611,9 +607,8 @@ public sealed interface TypeAnnotation * parameter of a generic class, generic interface, generic method, or * generic constructor. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface TypeParameterTarget extends TargetInfo permits TargetInfoImpl.TypeParameterTargetImpl { @@ -630,9 +625,8 @@ public sealed interface TypeAnnotation * Indicates that an annotation appears on a type in the extends or implements * clause of a class or interface declaration. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface SupertypeTarget extends TargetInfo permits TargetInfoImpl.SupertypeTargetImpl { @@ -654,9 +648,8 @@ public sealed interface TypeAnnotation * type parameter declaration of a generic class, interface, method, or * constructor. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface TypeParameterBoundTarget extends TargetInfo permits TargetInfoImpl.TypeParameterBoundTargetImpl { @@ -680,9 +673,8 @@ public sealed interface TypeAnnotation * declaration, the return type of a method, the type of a newly constructed * object, or the receiver type of a method or constructor. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface EmptyTarget extends TargetInfo permits TargetInfoImpl.EmptyTargetImpl { } @@ -691,9 +683,8 @@ public sealed interface TypeAnnotation * Indicates that an annotation appears on the type in a formal parameter * declaration of a method, constructor, or lambda expression. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface FormalParameterTarget extends TargetInfo permits TargetInfoImpl.FormalParameterTargetImpl { @@ -710,9 +701,8 @@ public sealed interface TypeAnnotation * Indicates that an annotation appears on the i'th type in the throws * clause of a method or constructor declaration. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface ThrowsTarget extends TargetInfo permits TargetInfoImpl.ThrowsTargetImpl { @@ -730,9 +720,8 @@ public sealed interface TypeAnnotation * Indicates that an annotation appears on the type in a local variable declaration, * including a variable declared as a resource in a try-with-resources statement. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface LocalVarTarget extends TargetInfo permits TargetInfoImpl.LocalVarTargetImpl { @@ -747,9 +736,8 @@ public sealed interface TypeAnnotation * has a value, and the index into the local variable array of the current * frame at which that local variable can be found. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface LocalVarTargetInfo permits TargetInfoImpl.LocalVarTargetInfoImpl { @@ -794,9 +782,8 @@ public sealed interface TypeAnnotation * Indicates that an annotation appears on the i'th type in an exception parameter * declaration. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface CatchTarget extends TargetInfo permits TargetInfoImpl.CatchTargetImpl { @@ -813,9 +800,8 @@ public sealed interface TypeAnnotation * Indicates that an annotation appears on either the type in an instanceof expression * or a new expression, or the type before the :: in a method reference expression. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface OffsetTarget extends TargetInfo permits TargetInfoImpl.OffsetTargetImpl { @@ -835,9 +821,8 @@ public sealed interface TypeAnnotation * expression, an explicit constructor invocation statement, a method invocation expression, or a method reference * expression. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface TypeArgumentTarget extends TargetInfo permits TargetInfoImpl.TypeArgumentTargetImpl { @@ -871,18 +856,16 @@ public sealed interface TypeAnnotation * JVMS: Type_path structure identifies which part of the type is annotated, * as defined in JVMS {@jvms 4.7.20.2} * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface TypePathComponent permits UnboundAttribute.TypePathComponentImpl { /** * Type path kind, as defined in JVMS {@jvms 4.7.20.2} * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public enum Kind { /** Annotation is deeper in an array type */ diff --git a/src/java.base/share/classes/java/lang/classfile/TypeKind.java b/src/java.base/share/classes/java/lang/classfile/TypeKind.java index bdbea7c8c54..5a6475aa801 100644 --- a/src/java.base/share/classes/java/lang/classfile/TypeKind.java +++ b/src/java.base/share/classes/java/lang/classfile/TypeKind.java @@ -30,7 +30,6 @@ import java.lang.constant.ClassDesc; import java.lang.constant.ConstantDescs; import java.lang.invoke.TypeDescriptor; -import jdk.internal.javac.PreviewFeature; import jdk.internal.vm.annotation.Stable; /** @@ -54,9 +53,8 @@ import jdk.internal.vm.annotation.Stable; * * @jvms 2.2 Data Types * @jvms 2.11.1 Types and the Java Virtual Machine - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public enum TypeKind { // Elements are grouped so frequently used switch ranges such as // primitives (boolean - double) and computational (int - void) are together. @@ -166,7 +164,6 @@ public enum TypeKind { /** * {@return the code used by the {@link Opcode#NEWARRAY newarray} instruction to create an array * of this component type, or {@code -1} if this type is not supported by {@code newarray}} - * @since 23 * @jvms 6.5.newarray newarray */ public int newarrayCode() { @@ -198,7 +195,6 @@ public enum TypeKind { * newarray}} * @param newarrayCode the operand of the {@code newarray} instruction * @throws IllegalArgumentException if the code is invalid - * @since 23 * @jvms 6.5.newarray newarray */ public static TypeKind fromNewarrayCode(int newarrayCode) { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/AnnotationDefaultAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/AnnotationDefaultAttribute.java index 4f147b0d63a..206c0a84087 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/AnnotationDefaultAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/AnnotationDefaultAttribute.java @@ -32,7 +32,6 @@ import java.lang.classfile.MethodModel; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code AnnotationDefault} attribute (JVMS {@jvms 4.7.22}), which can @@ -46,9 +45,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 5.0. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface AnnotationDefaultAttribute extends Attribute, MethodElement permits BoundAttribute.BoundAnnotationDefaultAttr, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/BootstrapMethodsAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/BootstrapMethodsAttribute.java index 26ef1d3ddaf..bbea96dc162 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/BootstrapMethodsAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/BootstrapMethodsAttribute.java @@ -32,7 +32,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code BootstrapMethods} attribute (JVMS {@jvms 4.7.23}), which serves as @@ -45,9 +44,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 7. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface BootstrapMethodsAttribute extends Attribute permits BoundAttribute.BoundBootstrapMethodsAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/CharacterRangeInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/CharacterRangeInfo.java index 126ba1037ce..ab37c372c29 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/CharacterRangeInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/CharacterRangeInfo.java @@ -27,14 +27,12 @@ package java.lang.classfile.attribute; import java.lang.classfile.instruction.CharacterRange; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models a single character range in the {@link CharacterRangeTableAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CharacterRangeInfo permits UnboundAttribute.UnboundCharacterRangeInfo { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/CharacterRangeTableAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/CharacterRangeTableAttribute.java index a4b79be62f0..42a8443f2f6 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/CharacterRangeTableAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/CharacterRangeTableAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * The CharacterRangeTable attribute is an optional variable-length attribute in @@ -58,9 +57,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute permits multiple instances in a given location. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CharacterRangeTableAttribute extends Attribute permits BoundAttribute.BoundCharacterRangeTableAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/CodeAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/CodeAttribute.java index 3342c2648ed..9bc9e975d12 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/CodeAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/CodeAttribute.java @@ -30,7 +30,6 @@ import java.lang.classfile.CodeModel; import java.lang.classfile.Label; import jdk.internal.classfile.impl.BoundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code Code} attribute (JVMS {@jvms 4.7.3}), appears on non-native, @@ -42,9 +41,8 @@ import jdk.internal.javac.PreviewFeature; * Subsequent occurrence of the attribute takes precedence during the attributed * element build or transformation. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CodeAttribute extends Attribute, CodeModel permits BoundAttribute.BoundCodeAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/CompilationIDAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/CompilationIDAttribute.java index 292b449c628..8311a8e045c 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/CompilationIDAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/CompilationIDAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,6 @@ import java.lang.classfile.constantpool.Utf8Entry; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code CompilationID} attribute (@@@ need reference), which can @@ -44,9 +43,8 @@ import jdk.internal.javac.PreviewFeature; * Subsequent occurrence of the attribute takes precedence during the attributed * element build or transformation. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CompilationIDAttribute extends Attribute, ClassElement permits BoundAttribute.BoundCompilationIDAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ConstantValueAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/ConstantValueAttribute.java index cd874648551..54f4742ab0c 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ConstantValueAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ConstantValueAttribute.java @@ -32,7 +32,6 @@ import java.lang.constant.ConstantDesc; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code ConstantValue} attribute (JVMS {@jvms 4.7.2}), which can appear on @@ -44,9 +43,8 @@ import jdk.internal.javac.PreviewFeature; * Subsequent occurrence of the attribute takes precedence during the attributed * element build or transformation. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ConstantValueAttribute extends Attribute, FieldElement permits BoundAttribute.BoundConstantValueAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/DeprecatedAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/DeprecatedAttribute.java index 47c85c4b6c1..9e470711e1f 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/DeprecatedAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/DeprecatedAttribute.java @@ -31,7 +31,6 @@ import java.lang.classfile.MethodElement; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code Deprecated} attribute (JVMS {@jvms 4.7.15}), which can appear on @@ -41,9 +40,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute permits multiple instances in a given location. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface DeprecatedAttribute extends Attribute, ClassElement, MethodElement, FieldElement diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/EnclosingMethodAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/EnclosingMethodAttribute.java index c760fdee04b..06ded8c82a5 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/EnclosingMethodAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/EnclosingMethodAttribute.java @@ -37,7 +37,6 @@ import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code EnclosingMethod} attribute (JVMS {@jvms 4.7.7}), which can appear @@ -51,9 +50,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 5.0. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface EnclosingMethodAttribute extends Attribute, ClassElement permits BoundAttribute.BoundEnclosingMethodAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ExceptionsAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/ExceptionsAttribute.java index 91f07d94de9..67732e10e81 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ExceptionsAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ExceptionsAttribute.java @@ -34,7 +34,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code Exceptions} attribute (JVMS {@jvms 4.7.5}), which can appear on @@ -46,9 +45,8 @@ import jdk.internal.javac.PreviewFeature; * Subsequent occurrence of the attribute takes precedence during the attributed * element build or transformation. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ExceptionsAttribute extends Attribute, MethodElement permits BoundAttribute.BoundExceptionsAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/InnerClassInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/InnerClassInfo.java index fca8cce7faa..6965d5fdfd2 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/InnerClassInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/InnerClassInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,14 +34,12 @@ import java.util.Set; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a single inner class in the {@link InnerClassesAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface InnerClassInfo permits UnboundAttribute.UnboundInnerClassInfo { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/InnerClassesAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/InnerClassesAttribute.java index 3b5d63822c4..463a29f9398 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/InnerClassesAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/InnerClassesAttribute.java @@ -31,7 +31,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code InnerClasses} attribute (JVMS {@jvms 4.7.6}), which can @@ -43,9 +42,8 @@ import jdk.internal.javac.PreviewFeature; * Subsequent occurrence of the attribute takes precedence during the attributed * element build or transformation. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface InnerClassesAttribute extends Attribute, ClassElement permits BoundAttribute.BoundInnerClassesAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/LineNumberInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/LineNumberInfo.java index 6e83284f6b1..7e148cec9c1 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/LineNumberInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/LineNumberInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,14 +25,12 @@ package java.lang.classfile.attribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models a single line number in the {@link LineNumberTableAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LineNumberInfo permits UnboundAttribute.UnboundLineNumberInfo { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/LineNumberTableAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/LineNumberTableAttribute.java index bb636a8113f..1c00745218a 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/LineNumberTableAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/LineNumberTableAttribute.java @@ -29,7 +29,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code LineNumberTable} attribute (JVMS {@jvms 4.7.12}), which can appear @@ -41,9 +40,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute permits multiple instances in a given location. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LineNumberTableAttribute extends Attribute permits BoundAttribute.BoundLineNumberTableAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableInfo.java index 177fc842483..2b4030b46a6 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,14 +30,12 @@ import java.lang.constant.ClassDesc; import jdk.internal.classfile.impl.BoundLocalVariable; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a single local variable in the {@link LocalVariableTableAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LocalVariableInfo permits UnboundAttribute.UnboundLocalVariableInfo, BoundLocalVariable { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTableAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTableAttribute.java index ad4e732073e..8f44ab2905f 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTableAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTableAttribute.java @@ -29,7 +29,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code LocalVariableTable} attribute (JVMS {@jvms 4.7.13}), which can appear @@ -41,9 +40,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute permits multiple instances in a given location. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LocalVariableTableAttribute extends Attribute permits BoundAttribute.BoundLocalVariableTableAttribute, UnboundAttribute.UnboundLocalVariableTableAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTypeInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTypeInfo.java index 6ba5b409b5b..e7a137102ae 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTypeInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTypeInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,14 +28,12 @@ import java.lang.classfile.constantpool.Utf8Entry; import jdk.internal.classfile.impl.BoundLocalVariableType; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models a single local variable in the {@link LocalVariableTypeTableAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LocalVariableTypeInfo permits UnboundAttribute.UnboundLocalVariableTypeInfo, BoundLocalVariableType { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTypeTableAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTypeTableAttribute.java index 084b72d6838..2bf7b7a87b3 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTypeTableAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/LocalVariableTypeTableAttribute.java @@ -30,7 +30,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code LocalVariableTypeTable} attribute (JVMS {@jvms 4.7.14}), which can appear @@ -44,9 +43,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 5.0. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LocalVariableTypeTableAttribute extends Attribute permits BoundAttribute.BoundLocalVariableTypeTableAttribute, UnboundAttribute.UnboundLocalVariableTypeTableAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/MethodParameterInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/MethodParameterInfo.java index b0961bf1476..35301a30284 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/MethodParameterInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/MethodParameterInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,14 +33,12 @@ import java.util.Set; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a single method parameter in the {@link MethodParametersAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface MethodParameterInfo permits UnboundAttribute.UnboundMethodParameterInfo { /** diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/MethodParametersAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/MethodParametersAttribute.java index 43a43d25bb7..3b3bacbbca5 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/MethodParametersAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/MethodParametersAttribute.java @@ -31,7 +31,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code MethodParameters} attribute (JVMS {@jvms 4.7.24}), which can @@ -45,9 +44,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 8. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface MethodParametersAttribute extends Attribute, MethodElement permits BoundAttribute.BoundMethodParametersAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleAttribute.java index 7091bbd5c42..07e0f2baa12 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleAttribute.java @@ -43,7 +43,6 @@ import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.ModuleAttributeBuilderImpl; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code Module} attribute (JVMS {@jvms 4.7.25}), which can @@ -57,9 +56,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 9. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleAttribute extends Attribute, ClassElement permits BoundAttribute.BoundModuleAttribute, UnboundAttribute.UnboundModuleAttribute { @@ -172,9 +170,8 @@ public sealed interface ModuleAttribute /** * A builder for module attributes. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleAttributeBuilder permits ModuleAttributeBuilderImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleExportInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleExportInfo.java index 4a534894e9e..69290c55994 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleExportInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleExportInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,14 +37,12 @@ import java.util.Set; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a single "exports" declaration in the {@link ModuleAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleExportInfo permits UnboundAttribute.UnboundModuleExportInfo { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleHashInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleHashInfo.java index 0c85dd14125..07616757daa 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleHashInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleHashInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,14 +29,12 @@ import java.lang.constant.ModuleDesc; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models hash information for a single module in the {@link ModuleHashesAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleHashInfo permits UnboundAttribute.UnboundModuleHashInfo { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleHashesAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleHashesAttribute.java index 0d2eb701484..918d18bda1e 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleHashesAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleHashesAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code ModuleHashes} attribute, which can @@ -68,9 +67,8 @@ import jdk.internal.javac.PreviewFeature; * Subsequent occurrence of the attribute takes precedence during the attributed * element build or transformation. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleHashesAttribute extends Attribute, ClassElement permits BoundAttribute.BoundModuleHashesAttribute, UnboundAttribute.UnboundModuleHashesAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleMainClassAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleMainClassAttribute.java index 67d6e5cc15c..7f06eb0f95b 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleMainClassAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleMainClassAttribute.java @@ -33,7 +33,6 @@ import java.lang.constant.ClassDesc; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code ModuleMainClass} attribute (JVMS {@jvms 4.7.27}), which can @@ -47,9 +46,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 9. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleMainClassAttribute extends Attribute, ClassElement permits BoundAttribute.BoundModuleMainClassAttribute, UnboundAttribute.UnboundModuleMainClassAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleOpenInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleOpenInfo.java index 7c5fe948d78..a16c9973627 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleOpenInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleOpenInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,14 +36,12 @@ import java.util.Set; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a single "opens" declaration in the {@link ModuleAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleOpenInfo permits UnboundAttribute.UnboundModuleOpenInfo { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ModulePackagesAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/ModulePackagesAttribute.java index f2b34ad107d..ec0a65742b4 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ModulePackagesAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ModulePackagesAttribute.java @@ -34,7 +34,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code ModulePackages} attribute (JVMS {@jvms 4.7.26}), which can @@ -48,9 +47,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 9. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModulePackagesAttribute extends Attribute, ClassElement permits BoundAttribute.BoundModulePackagesAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleProvideInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleProvideInfo.java index 266c73de04f..ce68848d4dc 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleProvideInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleProvideInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,14 +32,12 @@ import java.util.List; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a single "provides" declaration in the {@link ModuleAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleProvideInfo permits UnboundAttribute.UnboundModuleProvideInfo { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleRequireInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleRequireInfo.java index d072d0fead8..578a783f277 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleRequireInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleRequireInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,14 +35,12 @@ import java.util.Set; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a single "requires" declaration in the {@link ModuleAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleRequireInfo permits UnboundAttribute.UnboundModuleRequiresInfo { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleResolutionAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleResolutionAttribute.java index a6b17fa4041..3457cb8073e 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleResolutionAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleResolutionAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,6 @@ import java.lang.classfile.ClassElement; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code ModuleResolution} attribute, which can @@ -63,9 +62,8 @@ import jdk.internal.javac.PreviewFeature; * Subsequent occurrence of the attribute takes precedence during the attributed * element build or transformation. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleResolutionAttribute extends Attribute, ClassElement permits BoundAttribute.BoundModuleResolutionAttribute, UnboundAttribute.UnboundModuleResolutionAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleTargetAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleTargetAttribute.java index 226412eccf3..ac390c3d391 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/ModuleTargetAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/ModuleTargetAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,6 @@ import java.lang.classfile.constantpool.Utf8Entry; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code ModuleTarget} attribute, which can @@ -58,9 +57,8 @@ import jdk.internal.javac.PreviewFeature; * Subsequent occurrence of the attribute takes precedence during the attributed * element build or transformation. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleTargetAttribute extends Attribute, ClassElement permits BoundAttribute.BoundModuleTargetAttribute, UnboundAttribute.UnboundModuleTargetAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/NestHostAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/NestHostAttribute.java index 6b69f9cbe08..ccfb61242cd 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/NestHostAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/NestHostAttribute.java @@ -33,7 +33,6 @@ import java.lang.constant.ClassDesc; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code NestHost} attribute (JVMS {@jvms 4.7.28}), which can @@ -47,9 +46,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 11. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface NestHostAttribute extends Attribute, ClassElement permits BoundAttribute.BoundNestHostAttribute, UnboundAttribute.UnboundNestHostAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/NestMembersAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/NestMembersAttribute.java index 8826b4953a5..b01c05542de 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/NestMembersAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/NestMembersAttribute.java @@ -34,7 +34,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code NestMembers} attribute (JVMS {@jvms 4.7.29}), which can @@ -48,9 +47,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 11. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface NestMembersAttribute extends Attribute, ClassElement permits BoundAttribute.BoundNestMembersAttribute, UnboundAttribute.UnboundNestMembersAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/PermittedSubclassesAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/PermittedSubclassesAttribute.java index 1242bc6e045..dac63c73435 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/PermittedSubclassesAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/PermittedSubclassesAttribute.java @@ -34,7 +34,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code PermittedSubclasses} attribute (JVMS {@jvms 4.7.31}), which can @@ -48,9 +47,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 17. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface PermittedSubclassesAttribute extends Attribute, ClassElement permits BoundAttribute.BoundPermittedSubclassesAttribute, UnboundAttribute.UnboundPermittedSubclassesAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/RecordAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/RecordAttribute.java index 7ef3b6f41b6..b0c4fa7c61c 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/RecordAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/RecordAttribute.java @@ -31,7 +31,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code Record} attribute (JVMS {@jvms 4.7.30}), which can @@ -45,9 +44,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 16. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface RecordAttribute extends Attribute, ClassElement permits BoundAttribute.BoundRecordAttribute, UnboundAttribute.UnboundRecordAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/RecordComponentInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/RecordComponentInfo.java index ef6385653ed..73e4497915e 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/RecordComponentInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/RecordComponentInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,14 +34,12 @@ import jdk.internal.classfile.impl.BoundRecordComponentInfo; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a single record component in the {@link java.lang.classfile.attribute.RecordAttribute}. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface RecordComponentInfo extends AttributedElement permits BoundRecordComponentInfo, UnboundAttribute.UnboundRecordComponentInfo { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleAnnotationsAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleAnnotationsAttribute.java index 05635af4beb..58903859464 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleAnnotationsAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleAnnotationsAttribute.java @@ -34,7 +34,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code RuntimeInvisibleAnnotations} attribute (JVMS {@jvms 4.7.17}), which @@ -48,9 +47,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 5.0. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface RuntimeInvisibleAnnotationsAttribute extends Attribute, ClassElement, MethodElement, FieldElement diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleParameterAnnotationsAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleParameterAnnotationsAttribute.java index edb82c49900..f1c02b77e1e 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleParameterAnnotationsAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleParameterAnnotationsAttribute.java @@ -33,7 +33,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code RuntimeInvisibleParameterAnnotations} attribute @@ -46,9 +45,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 5.0. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface RuntimeInvisibleParameterAnnotationsAttribute extends Attribute, MethodElement permits BoundAttribute.BoundRuntimeInvisibleParameterAnnotationsAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleTypeAnnotationsAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleTypeAnnotationsAttribute.java index df3a035d620..7500d39fc19 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleTypeAnnotationsAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeInvisibleTypeAnnotationsAttribute.java @@ -35,7 +35,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code RuntimeInvisibleTypeAnnotations} attribute (JVMS {@jvms 4.7.21}), which @@ -50,9 +49,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 8. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface RuntimeInvisibleTypeAnnotationsAttribute extends Attribute, ClassElement, MethodElement, FieldElement, CodeElement diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleAnnotationsAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleAnnotationsAttribute.java index 69095188818..d41fcf3794b 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleAnnotationsAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleAnnotationsAttribute.java @@ -34,7 +34,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code RuntimeVisibleAnnotations} attribute (JVMS {@jvms 4.7.16}), which @@ -48,9 +47,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 5.0. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface RuntimeVisibleAnnotationsAttribute extends Attribute, ClassElement, MethodElement, FieldElement diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleParameterAnnotationsAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleParameterAnnotationsAttribute.java index ef58d21f14a..5ed9817eeb9 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleParameterAnnotationsAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleParameterAnnotationsAttribute.java @@ -33,7 +33,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code RuntimeVisibleParameterAnnotations} attribute (JVMS {@jvms 4.7.18}), which @@ -46,9 +45,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 5.0. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface RuntimeVisibleParameterAnnotationsAttribute extends Attribute, MethodElement permits BoundAttribute.BoundRuntimeVisibleParameterAnnotationsAttribute, diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleTypeAnnotationsAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleTypeAnnotationsAttribute.java index 20dc89d700c..a4e780c4536 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleTypeAnnotationsAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/RuntimeVisibleTypeAnnotationsAttribute.java @@ -35,7 +35,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code RuntimeVisibleTypeAnnotations} attribute (JVMS {@jvms 4.7.20}), which @@ -50,9 +49,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 8. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface RuntimeVisibleTypeAnnotationsAttribute extends Attribute, ClassElement, MethodElement, FieldElement, CodeElement diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/SignatureAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/SignatureAttribute.java index ca4cc62852a..8f06e16a1b1 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/SignatureAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/SignatureAttribute.java @@ -31,7 +31,6 @@ import java.lang.classfile.constantpool.Utf8Entry; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code Signature} attribute (JVMS {@jvms 4.7.9}), which @@ -46,9 +45,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 5.0. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface SignatureAttribute extends Attribute, ClassElement, MethodElement, FieldElement diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/SourceDebugExtensionAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/SourceDebugExtensionAttribute.java index e181b7fb14a..0e6b7267263 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/SourceDebugExtensionAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/SourceDebugExtensionAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,6 @@ import java.lang.classfile.ClassElement; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code SourceDebugExtension} attribute. @@ -43,9 +42,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 5.0. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface SourceDebugExtensionAttribute extends Attribute, ClassElement permits BoundAttribute.BoundSourceDebugExtensionAttribute, UnboundAttribute.UnboundSourceDebugExtensionAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/SourceFileAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/SourceFileAttribute.java index d6c40058e7b..70f3d1e72ce 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/SourceFileAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/SourceFileAttribute.java @@ -33,7 +33,6 @@ import java.lang.classfile.constantpool.Utf8Entry; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code SourceFile} attribute (JVMS {@jvms 4.7.10}), which @@ -44,9 +43,8 @@ import jdk.internal.javac.PreviewFeature; * Subsequent occurrence of the attribute takes precedence during the attributed * element build or transformation. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface SourceFileAttribute extends Attribute, ClassElement permits BoundAttribute.BoundSourceFileAttribute, UnboundAttribute.UnboundSourceFileAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/SourceIDAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/SourceIDAttribute.java index 69ff3bf57fd..71fd9d5b059 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/SourceIDAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/SourceIDAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,6 @@ import java.lang.classfile.constantpool.Utf8Entry; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code SourceID} attribute, which can @@ -44,9 +43,8 @@ import jdk.internal.javac.PreviewFeature; * Subsequent occurrence of the attribute takes precedence during the attributed * element build or transformation. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface SourceIDAttribute extends Attribute, ClassElement permits BoundAttribute.BoundSourceIDAttribute, UnboundAttribute.UnboundSourceIDAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/StackMapFrameInfo.java b/src/java.base/share/classes/java/lang/classfile/attribute/StackMapFrameInfo.java index d041a73c58a..920db8ac9d7 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/StackMapFrameInfo.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/StackMapFrameInfo.java @@ -32,14 +32,12 @@ import java.util.List; import jdk.internal.classfile.impl.StackMapDecoder; import jdk.internal.classfile.impl.TemporaryConstantPool; -import jdk.internal.javac.PreviewFeature; /** * Models stack map frame of {@code StackMapTable} attribute (JVMS {@jvms 4.7.4}). * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface StackMapFrameInfo permits StackMapDecoder.StackMapFrameImpl { @@ -79,9 +77,8 @@ public sealed interface StackMapFrameInfo /** * The type of a stack value. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface VerificationTypeInfo { /** The {@link #tag() tag} for verification type info {@link SimpleVerificationTypeInfo#TOP TOP}. */ @@ -124,9 +121,8 @@ public sealed interface StackMapFrameInfo /** * A simple stack value. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public enum SimpleVerificationTypeInfo implements VerificationTypeInfo { /** verification type top */ @@ -166,9 +162,8 @@ public sealed interface StackMapFrameInfo /** * A stack value for an object type. Its {@link #tag() tag} is {@value #ITEM_OBJECT}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface ObjectVerificationTypeInfo extends VerificationTypeInfo permits StackMapDecoder.ObjectVerificationTypeInfoImpl { @@ -205,9 +200,8 @@ public sealed interface StackMapFrameInfo /** * An uninitialized stack value. Its {@link #tag() tag} is {@value #ITEM_UNINITIALIZED}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface UninitializedVerificationTypeInfo extends VerificationTypeInfo permits StackMapDecoder.UninitializedVerificationTypeInfoImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/StackMapTableAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/StackMapTableAttribute.java index a8aef4795d7..0d577fb6cd5 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/StackMapTableAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/StackMapTableAttribute.java @@ -31,7 +31,6 @@ import java.util.List; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code StackMapTable} attribute (JVMS {@jvms 4.7.4}), which can appear @@ -43,9 +42,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute was introduced in the Java SE Platform version 6. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface StackMapTableAttribute extends Attribute, CodeElement permits BoundAttribute.BoundStackMapTableAttribute, UnboundAttribute.UnboundStackMapTableAttribute { diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/SyntheticAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/SyntheticAttribute.java index e5b5da7fbfe..1e6b706ec08 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/SyntheticAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/SyntheticAttribute.java @@ -32,7 +32,6 @@ import java.lang.classfile.MethodElement; import jdk.internal.classfile.impl.BoundAttribute; import jdk.internal.classfile.impl.UnboundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models the {@code Synthetic} attribute (JVMS {@jvms 4.7.8}), which can appear on @@ -42,9 +41,8 @@ import jdk.internal.javac.PreviewFeature; *

* The attribute permits multiple instances in a given location. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface SyntheticAttribute extends Attribute, ClassElement, MethodElement, FieldElement diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/UnknownAttribute.java b/src/java.base/share/classes/java/lang/classfile/attribute/UnknownAttribute.java index 5c1369e1308..ad47f35a856 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/UnknownAttribute.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/UnknownAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,14 +31,12 @@ import java.lang.classfile.FieldElement; import java.lang.classfile.MethodElement; import jdk.internal.classfile.impl.BoundAttribute; -import jdk.internal.javac.PreviewFeature; /** * Models an unknown attribute on a class, method, or field. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface UnknownAttribute extends Attribute, ClassElement, MethodElement, FieldElement diff --git a/src/java.base/share/classes/java/lang/classfile/attribute/package-info.java b/src/java.base/share/classes/java/lang/classfile/attribute/package-info.java index 3047ef659e5..08bd28cbc58 100644 --- a/src/java.base/share/classes/java/lang/classfile/attribute/package-info.java +++ b/src/java.base/share/classes/java/lang/classfile/attribute/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,9 +28,7 @@ * * The {@code java.lang.classfile.attribute} package contains interfaces describing classfile attributes. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) package java.lang.classfile.attribute; -import jdk.internal.javac.PreviewFeature; diff --git a/src/java.base/share/classes/java/lang/classfile/components/ClassPrinter.java b/src/java.base/share/classes/java/lang/classfile/components/ClassPrinter.java index 85768cbe6a4..7237dc54580 100644 --- a/src/java.base/share/classes/java/lang/classfile/components/ClassPrinter.java +++ b/src/java.base/share/classes/java/lang/classfile/components/ClassPrinter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,6 @@ import java.util.function.Consumer; import java.util.stream.Stream; import jdk.internal.classfile.impl.ClassPrinterImpl; -import jdk.internal.javac.PreviewFeature; /** * A printer of classfiles and its elements. @@ -60,9 +59,8 @@ import jdk.internal.javac.PreviewFeature; * Another use case for {@link ClassPrinter} is to simplify writing of automated tests: * {@snippet lang="java" class="PackageSnippets" region="printNodesInTest"} * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public final class ClassPrinter { private ClassPrinter() { @@ -71,9 +69,8 @@ public final class ClassPrinter { /** * Level of detail to print or export. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public enum Verbosity { /** @@ -106,9 +103,8 @@ public final class ClassPrinter { /** * Named, traversable, and printable node parent. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface Node { /** @@ -151,9 +147,8 @@ public final class ClassPrinter { /** * A leaf node holding single printable value. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LeafNode extends Node permits ClassPrinterImpl.LeafNodeImpl { @@ -167,9 +162,8 @@ public final class ClassPrinter { /** * A tree node holding {@link List} of nested nodes. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ListNode extends Node, List permits ClassPrinterImpl.ListNodeImpl { } @@ -179,9 +173,8 @@ public final class ClassPrinter { *

* Each {@link Map.Entry#getKey()} == {@link Map.Entry#getValue()}.{@link #name()}. * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface MapNode extends Node, Map permits ClassPrinterImpl.MapNodeImpl { } diff --git a/src/java.base/share/classes/java/lang/classfile/components/ClassRemapper.java b/src/java.base/share/classes/java/lang/classfile/components/ClassRemapper.java index 4f7bd3199d5..4a2808ad4f0 100644 --- a/src/java.base/share/classes/java/lang/classfile/components/ClassRemapper.java +++ b/src/java.base/share/classes/java/lang/classfile/components/ClassRemapper.java @@ -35,7 +35,6 @@ import java.util.Map; import java.util.function.Function; import jdk.internal.classfile.impl.ClassRemapperImpl; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; @@ -55,9 +54,8 @@ import static java.util.Objects.requireNonNull; * Arrays of reference types are always decomposed, mapped as the base reference * types and composed back to arrays. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassRemapper extends ClassTransform permits ClassRemapperImpl { /** diff --git a/src/java.base/share/classes/java/lang/classfile/components/CodeLocalsShifter.java b/src/java.base/share/classes/java/lang/classfile/components/CodeLocalsShifter.java index 49838722461..9db85f54a45 100644 --- a/src/java.base/share/classes/java/lang/classfile/components/CodeLocalsShifter.java +++ b/src/java.base/share/classes/java/lang/classfile/components/CodeLocalsShifter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,6 @@ import java.lang.constant.MethodTypeDesc; import java.lang.reflect.AccessFlag; import jdk.internal.classfile.impl.CodeLocalsShifterImpl; -import jdk.internal.javac.PreviewFeature; /** * {@link CodeLocalsShifter} is a {@link CodeTransform} shifting locals to @@ -39,9 +38,8 @@ import jdk.internal.javac.PreviewFeature; * Locals pointing to the receiver or to method arguments slots are never shifted. * All locals pointing beyond the method arguments are re-indexed in order of appearance. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CodeLocalsShifter extends CodeTransform permits CodeLocalsShifterImpl { /** diff --git a/src/java.base/share/classes/java/lang/classfile/components/CodeRelabeler.java b/src/java.base/share/classes/java/lang/classfile/components/CodeRelabeler.java index 247d712e4f3..4ef82adfdb9 100644 --- a/src/java.base/share/classes/java/lang/classfile/components/CodeRelabeler.java +++ b/src/java.base/share/classes/java/lang/classfile/components/CodeRelabeler.java @@ -32,7 +32,6 @@ import java.util.Map; import java.util.function.BiFunction; import jdk.internal.classfile.impl.CodeRelabelerImpl; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; @@ -46,9 +45,8 @@ import static java.util.Objects.requireNonNull; * Repeated injection of the same code block must be relabeled, so each instance of * {@link java.lang.classfile.Label} is bound in the target bytecode exactly once. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CodeRelabeler extends CodeTransform permits CodeRelabelerImpl { /** diff --git a/src/java.base/share/classes/java/lang/classfile/components/CodeStackTracker.java b/src/java.base/share/classes/java/lang/classfile/components/CodeStackTracker.java index 1ee0b0948e1..3761e53ff19 100644 --- a/src/java.base/share/classes/java/lang/classfile/components/CodeStackTracker.java +++ b/src/java.base/share/classes/java/lang/classfile/components/CodeStackTracker.java @@ -31,7 +31,6 @@ import java.util.Collection; import java.util.Optional; import jdk.internal.classfile.impl.CodeStackTrackerImpl; -import jdk.internal.javac.PreviewFeature; /** * {@link CodeStackTracker} is a {@link CodeTransform} tracking stack content @@ -51,9 +50,8 @@ import jdk.internal.javac.PreviewFeature; * }); * } * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CodeStackTracker extends CodeTransform permits CodeStackTrackerImpl { /** diff --git a/src/java.base/share/classes/java/lang/classfile/components/package-info.java b/src/java.base/share/classes/java/lang/classfile/components/package-info.java index 98a0095587d..be650f4c77c 100644 --- a/src/java.base/share/classes/java/lang/classfile/components/package-info.java +++ b/src/java.base/share/classes/java/lang/classfile/components/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -111,9 +111,7 @@ * instrumenting transformation: * {@snippet lang="java" class="PackageSnippets" region="classInstrumentation"} * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) package java.lang.classfile.components; -import jdk.internal.javac.PreviewFeature; diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/AnnotationConstantValueEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/AnnotationConstantValueEntry.java index 6365fc3636a..5255ceb1ef7 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/AnnotationConstantValueEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/AnnotationConstantValueEntry.java @@ -27,8 +27,6 @@ package java.lang.classfile.constantpool; import java.lang.classfile.AnnotationValue; import java.lang.constant.ConstantDesc; -import jdk.internal.javac.PreviewFeature; - /** * A constant pool entry that may be used by annotation constant values, * which includes the four kinds of primitive constants and UTF8 constants. @@ -43,9 +41,8 @@ import jdk.internal.javac.PreviewFeature; * * @see AnnotationValue.OfConstant * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface AnnotationConstantValueEntry extends PoolEntry permits DoubleEntry, FloatEntry, IntegerEntry, LongEntry, Utf8Entry { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/ClassEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/ClassEntry.java index 9e5f1f52049..2a3bd95da22 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/ClassEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/ClassEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,16 +28,14 @@ import java.lang.constant.ClassDesc; import java.lang.constant.ConstantDesc; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_Class_info} constant in the constant pool of a * classfile. * @jvms 4.4.1 The CONSTANT_Class_info Structure * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ClassEntry extends LoadableConstantEntry permits AbstractPoolEntry.ClassEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantDynamicEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantDynamicEntry.java index 7c55a09f3f4..72050cd9b8f 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantDynamicEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantDynamicEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,16 +31,14 @@ import java.lang.constant.DynamicConstantDesc; import jdk.internal.classfile.impl.AbstractPoolEntry; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_Dynamic_info} constant in the constant pool of a * classfile. * @jvms 4.4.10 The CONSTANT_Dynamic_info and CONSTANT_InvokeDynamic_info Structures * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ConstantDynamicEntry extends DynamicConstantPoolEntry, LoadableConstantEntry permits AbstractPoolEntry.ConstantDynamicEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPool.java b/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPool.java index 0225f6ec77d..91dc8906b7b 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPool.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPool.java @@ -30,17 +30,14 @@ import java.lang.classfile.ClassReader; import java.util.Iterator; import java.util.NoSuchElementException; -import jdk.internal.javac.PreviewFeature; - /** * Provides read access to the constant pool and bootstrap method table of a * classfile. * @jvms 4.4 The Constant Pool * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ConstantPool extends Iterable permits ClassReader, ConstantPoolBuilder { @@ -70,7 +67,6 @@ public sealed interface ConstantPool extends Iterable * @param cls the entry type * @throws ConstantPoolException if the index is out of range of the * constant pool, or the entry is not of the given type - * @since 23 */ T entryByIndex(int index, Class cls); diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPoolBuilder.java b/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPoolBuilder.java index 0ce4a6868c8..2dc2a390bd1 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPoolBuilder.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPoolBuilder.java @@ -35,7 +35,6 @@ import jdk.internal.classfile.impl.ClassReaderImpl; import jdk.internal.classfile.impl.SplitConstantPool; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; import static java.util.Objects.requireNonNull; @@ -48,9 +47,8 @@ import static java.util.Objects.requireNonNull; * The {@linkplain ConstantPoolBuilder} also provides access to some of the * state of the {@linkplain ClassBuilder}, such as classfile processing options. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ConstantPoolBuilder extends ConstantPool permits SplitConstantPool, TemporaryConstantPool { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPoolException.java b/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPoolException.java index 260c9af64d4..ce5ed26c4c9 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPoolException.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantPoolException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,15 +24,13 @@ */ package java.lang.classfile.constantpool; -import jdk.internal.javac.PreviewFeature; /** * Thrown to indicate that requested entry cannot be obtained from the constant * pool. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public class ConstantPoolException extends IllegalArgumentException { @java.io.Serial diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantValueEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantValueEntry.java index 924d0aca710..ae746042aa4 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantValueEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/ConstantValueEntry.java @@ -27,17 +27,14 @@ package java.lang.classfile.constantpool; import java.lang.classfile.Attributes; import java.lang.constant.ConstantDesc; -import jdk.internal.javac.PreviewFeature; - /** * Models a constant pool entry that can be used as the constant in a * {@link Attributes#constantValue() ConstantValue} attribute; this includes the four * primitive constant types and {@linkplain String} constants. * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ConstantValueEntry extends LoadableConstantEntry permits DoubleEntry, FloatEntry, IntegerEntry, LongEntry, StringEntry { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/DoubleEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/DoubleEntry.java index 8dd4ba1ffd9..ebc3a837bb0 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/DoubleEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/DoubleEntry.java @@ -27,16 +27,14 @@ package java.lang.classfile.constantpool; import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_Double_info} constant in the constant pool of a * classfile. * @jvms 4.4.5 The CONSTANT_Long_info and CONSTANT_Double_info Structures * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface DoubleEntry extends AnnotationConstantValueEntry, ConstantValueEntry permits AbstractPoolEntry.DoubleEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/DynamicConstantPoolEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/DynamicConstantPoolEntry.java index ac763049410..3ec4fbbdbee 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/DynamicConstantPoolEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/DynamicConstantPoolEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,17 +26,14 @@ package java.lang.classfile.constantpool; import java.lang.classfile.BootstrapMethodEntry; -import jdk.internal.javac.PreviewFeature; - /** * Models a dynamic constant pool entry, which is either {@link ConstantDynamicEntry} * or {@link InvokeDynamicEntry}. * @jvms 4.4.10 The CONSTANT_Dynamic_info and CONSTANT_InvokeDynamic_info Structures * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface DynamicConstantPoolEntry extends PoolEntry permits ConstantDynamicEntry, InvokeDynamicEntry { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/FieldRefEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/FieldRefEntry.java index ab122f410b6..47f5b6710d8 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/FieldRefEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/FieldRefEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,16 +28,14 @@ import java.lang.constant.ClassDesc; import jdk.internal.classfile.impl.AbstractPoolEntry; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_Fieldref_info} constant in the constant pool of a * classfile. * @jvms 4.4.2 The CONSTANT_Fieldref_info, CONSTANT_Methodref_info, and CONSTANT_InterfaceMethodref_info Structures * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface FieldRefEntry extends MemberRefEntry permits AbstractPoolEntry.FieldRefEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/FloatEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/FloatEntry.java index 7a91dd11153..eeb44e92b7c 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/FloatEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/FloatEntry.java @@ -27,16 +27,14 @@ package java.lang.classfile.constantpool; import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_Float_info} constant in the constant pool of a * classfile. * @jvms 4.4.4 The CONSTANT_Integer_info and CONSTANT_Float_info Structures * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface FloatEntry extends AnnotationConstantValueEntry, ConstantValueEntry permits AbstractPoolEntry.FloatEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/IntegerEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/IntegerEntry.java index 7cd21e37db8..908f17d1cb7 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/IntegerEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/IntegerEntry.java @@ -27,16 +27,14 @@ package java.lang.classfile.constantpool; import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_Integer_info} constant in the constant pool of a * classfile. * @jvms 4.4.4 The CONSTANT_Integer_info and CONSTANT_Float_info Structures * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface IntegerEntry extends AnnotationConstantValueEntry, ConstantValueEntry permits AbstractPoolEntry.IntegerEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/InterfaceMethodRefEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/InterfaceMethodRefEntry.java index 8f15053e5b7..7b1a94f123a 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/InterfaceMethodRefEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/InterfaceMethodRefEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,16 +28,14 @@ import java.lang.constant.MethodTypeDesc; import jdk.internal.classfile.impl.AbstractPoolEntry; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_InterfaceMethodRef_info} constant in the constant pool of a * classfile. * @jvms 4.4.2 The CONSTANT_Fieldref_info, CONSTANT_Methodref_info, and CONSTANT_InterfaceMethodref_info Structures * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface InterfaceMethodRefEntry extends MemberRefEntry permits AbstractPoolEntry.InterfaceMethodRefEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/InvokeDynamicEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/InvokeDynamicEntry.java index f06c3d4c782..0cc8b6823df 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/InvokeDynamicEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/InvokeDynamicEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,15 +30,13 @@ import java.lang.constant.MethodTypeDesc; import jdk.internal.classfile.impl.AbstractPoolEntry; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a constant pool entry for a dynamic call site. * @jvms 4.4.10 The CONSTANT_Dynamic_info and CONSTANT_InvokeDynamic_info Structures * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface InvokeDynamicEntry extends DynamicConstantPoolEntry permits AbstractPoolEntry.InvokeDynamicEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/LoadableConstantEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/LoadableConstantEntry.java index c963e2425ea..32f85f64c7e 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/LoadableConstantEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/LoadableConstantEntry.java @@ -27,16 +27,13 @@ package java.lang.classfile.constantpool; import java.lang.classfile.TypeKind; import java.lang.constant.ConstantDesc; -import jdk.internal.javac.PreviewFeature; - /** * Marker interface for constant pool entries suitable for loading via the * {@code LDC} instructions. * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LoadableConstantEntry extends PoolEntry permits ClassEntry, ConstantDynamicEntry, ConstantValueEntry, MethodHandleEntry, MethodTypeEntry { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/LongEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/LongEntry.java index 75e02b19441..cd38dcfe014 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/LongEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/LongEntry.java @@ -27,16 +27,14 @@ package java.lang.classfile.constantpool; import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_Long_info} constant in the constant pool of a * classfile. * @jvms 4.4.5 The CONSTANT_Long_info and CONSTANT_Double_info Structures * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LongEntry extends AnnotationConstantValueEntry, ConstantValueEntry permits AbstractPoolEntry.LongEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/MemberRefEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/MemberRefEntry.java index 7c9292c8f04..12d68796dd7 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/MemberRefEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/MemberRefEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,16 +25,14 @@ package java.lang.classfile.constantpool; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a member reference constant in the constant pool of a classfile, * which includes references to fields, methods, and interface methods. * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface MemberRefEntry extends PoolEntry permits FieldRefEntry, InterfaceMethodRefEntry, MethodRefEntry, AbstractPoolEntry.AbstractMemberRefEntry { /** diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/MethodHandleEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/MethodHandleEntry.java index 37ec30648ab..d2e08ef178c 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/MethodHandleEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/MethodHandleEntry.java @@ -28,16 +28,14 @@ import java.lang.constant.ConstantDesc; import java.lang.constant.DirectMethodHandleDesc; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_MethodHandle_info} constant in the constant pool of a * classfile. * @jvms 4.4.8 The CONSTANT_MethodHandle_info Structure * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface MethodHandleEntry extends LoadableConstantEntry permits AbstractPoolEntry.MethodHandleEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/MethodRefEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/MethodRefEntry.java index ff3f5e5220c..5be9e88fa2f 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/MethodRefEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/MethodRefEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,16 +28,14 @@ import java.lang.constant.MethodTypeDesc; import jdk.internal.classfile.impl.AbstractPoolEntry; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_MethodRef_info} constant in the constant pool of a * classfile. * @jvms 4.4.2 The CONSTANT_Fieldref_info, CONSTANT_Methodref_info, and CONSTANT_InterfaceMethodref_info Structures * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface MethodRefEntry extends MemberRefEntry permits AbstractPoolEntry.MethodRefEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/MethodTypeEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/MethodTypeEntry.java index d626aeb4900..b6fad856358 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/MethodTypeEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/MethodTypeEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,16 +28,14 @@ import java.lang.constant.ConstantDesc; import java.lang.constant.MethodTypeDesc; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_MethodType_info} constant in the constant pool of a * classfile. * @jvms 4.4.9 The CONSTANT_MethodType_info Structure * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface MethodTypeEntry extends LoadableConstantEntry permits AbstractPoolEntry.MethodTypeEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/ModuleEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/ModuleEntry.java index db7aa1f76fe..d0cdae5678f 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/ModuleEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/ModuleEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,16 +27,14 @@ package java.lang.classfile.constantpool; import java.lang.constant.ModuleDesc; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_Module_info} constant in the constant pool of a * classfile. * @jvms 4.4.11 The CONSTANT_Module_info Structure * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ModuleEntry extends PoolEntry permits AbstractPoolEntry.ModuleEntryImpl { /** diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/NameAndTypeEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/NameAndTypeEntry.java index d4beff2aff7..eff7e3456d1 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/NameAndTypeEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/NameAndTypeEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,16 +25,14 @@ package java.lang.classfile.constantpool; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_NameAndType_info} constant in the constant pool of a * classfile. * @jvms 4.4.6 The CONSTANT_NameAndType_info Structure * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface NameAndTypeEntry extends PoolEntry permits AbstractPoolEntry.NameAndTypeEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/PackageEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/PackageEntry.java index 5725d411028..54ea2fc38e5 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/PackageEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/PackageEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,16 +27,14 @@ package java.lang.classfile.constantpool; import java.lang.constant.PackageDesc; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_Package_info} constant in the constant pool of a * classfile. * @jvms 4.4.12 The CONSTANT_Package_info Structure * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface PackageEntry extends PoolEntry permits AbstractPoolEntry.PackageEntryImpl { /** diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/PoolEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/PoolEntry.java index d2af4c7c11a..fdb8b497ff9 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/PoolEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/PoolEntry.java @@ -24,15 +24,12 @@ */ package java.lang.classfile.constantpool; -import jdk.internal.javac.PreviewFeature; - /** * Models an entry in the constant pool of a classfile. * * @sealedGraph - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface PoolEntry permits AnnotationConstantValueEntry, DynamicConstantPoolEntry, LoadableConstantEntry, MemberRefEntry, ModuleEntry, NameAndTypeEntry, diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/StringEntry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/StringEntry.java index 65f75a6a062..03ff7652f67 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/StringEntry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/StringEntry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,16 +25,14 @@ package java.lang.classfile.constantpool; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_String_info} constant in the constant pool of a * classfile. * @jvms 4.4.3 The CONSTANT_String_info Structure * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface StringEntry extends ConstantValueEntry permits AbstractPoolEntry.StringEntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/Utf8Entry.java b/src/java.base/share/classes/java/lang/classfile/constantpool/Utf8Entry.java index b379854cfcb..db03bf6a403 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/Utf8Entry.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/Utf8Entry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,16 +25,14 @@ package java.lang.classfile.constantpool; import jdk.internal.classfile.impl.AbstractPoolEntry; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code CONSTANT_UTF8_info} constant in the constant pool of a * classfile. * @jvms 4.4.7 The CONSTANT_Utf8_info Structure * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface Utf8Entry extends CharSequence, AnnotationConstantValueEntry permits AbstractPoolEntry.Utf8EntryImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/constantpool/package-info.java b/src/java.base/share/classes/java/lang/classfile/constantpool/package-info.java index 1ba2b63b6a1..83039c6565c 100644 --- a/src/java.base/share/classes/java/lang/classfile/constantpool/package-info.java +++ b/src/java.base/share/classes/java/lang/classfile/constantpool/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,9 +28,7 @@ * * The {@code java.lang.classfile.constantpool} package contains interfaces describing classfile constant pool entries. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) package java.lang.classfile.constantpool; -import jdk.internal.javac.PreviewFeature; diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/ArrayLoadInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/ArrayLoadInstruction.java index b66627ef212..cc0e0b89f80 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/ArrayLoadInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/ArrayLoadInstruction.java @@ -32,7 +32,6 @@ import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models an array load instruction in the {@code code} array of a {@code Code} @@ -40,9 +39,8 @@ import jdk.internal.javac.PreviewFeature; * Opcode.Kind#ARRAY_LOAD}. 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 ArrayLoadInstruction extends Instruction permits AbstractInstruction.UnboundArrayLoadInstruction { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/ArrayStoreInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/ArrayStoreInstruction.java index f009cfca361..c350b3a5928 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/ArrayStoreInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/ArrayStoreInstruction.java @@ -32,7 +32,6 @@ import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models an array store instruction in the {@code code} array of a {@code Code} @@ -40,9 +39,8 @@ import jdk.internal.javac.PreviewFeature; * Opcode.Kind#ARRAY_STORE}. 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 ArrayStoreInstruction extends Instruction permits AbstractInstruction.UnboundArrayStoreInstruction { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/BranchInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/BranchInstruction.java index 6b2142fa0e1..2fdc00fced1 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/BranchInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/BranchInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,6 @@ import java.lang.classfile.Opcode; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a branching instruction (conditional or unconditional) in the {@code @@ -40,9 +39,8 @@ import jdk.internal.javac.PreviewFeature; * {@code kind} of {@link Opcode.Kind#BRANCH}. 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 BranchInstruction extends Instruction permits AbstractInstruction.BoundBranchInstruction, AbstractInstruction.UnboundBranchInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/CharacterRange.java b/src/java.base/share/classes/java/lang/classfile/instruction/CharacterRange.java index 3d04473ab37..d47639d7dd7 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/CharacterRange.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/CharacterRange.java @@ -34,7 +34,6 @@ import java.lang.classfile.attribute.CharacterRangeTableAttribute; import jdk.internal.classfile.impl.AbstractPseudoInstruction; import jdk.internal.classfile.impl.BoundCharacterRange; -import jdk.internal.javac.PreviewFeature; /** * A pseudo-instruction which models a single entry in the @@ -42,9 +41,8 @@ import jdk.internal.javac.PreviewFeature; * during traversal of the elements of a {@link CodeModel}, according to * the setting of the {@link ClassFile.DebugElementsOption} option. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface CharacterRange extends PseudoInstruction permits AbstractPseudoInstruction.UnboundCharacterRange, BoundCharacterRange { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/ConstantInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/ConstantInstruction.java index c41793c614e..312c1868f19 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/ConstantInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/ConstantInstruction.java @@ -35,7 +35,6 @@ import java.lang.constant.ConstantDesc; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.BytecodeHelpers; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a constant-load instruction in the {@code code} array of a {@code @@ -45,9 +44,8 @@ import jdk.internal.javac.PreviewFeature; * a {@code kind} of {@link Opcode.Kind#CONSTANT}. 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 ConstantInstruction extends Instruction { /** @@ -64,9 +62,8 @@ public sealed interface ConstantInstruction extends Instruction { * Models an "intrinsic constant" instruction (e.g., {@code * iconst_0}). * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface IntrinsicConstantInstruction extends ConstantInstruction permits AbstractInstruction.UnboundIntrinsicConstantInstruction { @@ -83,9 +80,8 @@ public sealed interface ConstantInstruction extends Instruction { * Models an "argument constant" instruction (e.g., {@code * bipush}). * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface ArgumentConstantInstruction extends ConstantInstruction permits AbstractInstruction.BoundArgumentConstantInstruction, AbstractInstruction.UnboundArgumentConstantInstruction { @@ -106,9 +102,8 @@ public sealed interface ConstantInstruction extends Instruction { * Models a "load constant" instruction (e.g., {@code * ldc}). * - * @since 22 + * @since 24 */ - @PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) sealed interface LoadConstantInstruction extends ConstantInstruction permits AbstractInstruction.BoundLoadConstantInstruction, AbstractInstruction.UnboundLoadConstantInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/ConvertInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/ConvertInstruction.java index ec48c2f4663..468685779b9 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/ConvertInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/ConvertInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,6 @@ import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.BytecodeHelpers; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a primitive conversion instruction in the {@code code} array of a @@ -41,9 +40,8 @@ import jdk.internal.javac.PreviewFeature; * a {@code kind} of {@link Opcode.Kind#CONVERT}. 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 ConvertInstruction extends Instruction permits AbstractInstruction.UnboundConvertInstruction { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/DiscontinuedInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/DiscontinuedInstruction.java index 0e4718a1c77..4e8ddcef385 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/DiscontinuedInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/DiscontinuedInstruction.java @@ -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 { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/ExceptionCatch.java b/src/java.base/share/classes/java/lang/classfile/instruction/ExceptionCatch.java index 22b6f632abc..885f029d108 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/ExceptionCatch.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/ExceptionCatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,6 @@ import java.lang.classfile.constantpool.ClassEntry; import java.util.Optional; import jdk.internal.classfile.impl.AbstractPseudoInstruction; -import jdk.internal.javac.PreviewFeature; /** * A pseudo-instruction modeling an entry in the exception table of a code @@ -42,9 +41,8 @@ import jdk.internal.javac.PreviewFeature; * * @see PseudoInstruction * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface ExceptionCatch extends PseudoInstruction permits AbstractPseudoInstruction.ExceptionCatchImpl { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/FieldInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/FieldInstruction.java index c8a82fe7dfa..b547abd18ab 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/FieldInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/FieldInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,6 @@ import java.lang.constant.ClassDesc; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a field access instruction in the {@code code} array of a {@code Code} @@ -45,9 +44,8 @@ import jdk.internal.javac.PreviewFeature; * Opcode.Kind#FIELD_ACCESS}. 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 FieldInstruction extends Instruction permits AbstractInstruction.BoundFieldInstruction, AbstractInstruction.UnboundFieldInstruction { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/IncrementInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/IncrementInstruction.java index 74fd6a4465a..7ea516c7cc5 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/IncrementInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/IncrementInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,6 @@ import java.lang.classfile.Instruction; import java.lang.classfile.Opcode; import jdk.internal.classfile.impl.AbstractInstruction; -import jdk.internal.javac.PreviewFeature; /** * Models a local variable increment instruction in the {@code code} array of a @@ -38,9 +37,8 @@ import jdk.internal.javac.PreviewFeature; * {@link Opcode.Kind#INCREMENT}. 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 IncrementInstruction extends Instruction permits AbstractInstruction.BoundIncrementInstruction, AbstractInstruction.UnboundIncrementInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/InvokeDynamicInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/InvokeDynamicInstruction.java index 6df960b88fa..43907b2a518 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/InvokeDynamicInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/InvokeDynamicInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,16 +38,14 @@ import java.util.function.Function; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models an {@code invokedynamic} instruction in 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 InvokeDynamicInstruction extends Instruction permits AbstractInstruction.BoundInvokeDynamicInstruction, AbstractInstruction.UnboundInvokeDynamicInstruction { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/InvokeInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/InvokeInstruction.java index 41ca5fd1519..904a17375ac 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/InvokeInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/InvokeInstruction.java @@ -39,7 +39,6 @@ import java.lang.constant.MethodTypeDesc; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a method invocation instruction in the {@code code} array of a {@code @@ -47,9 +46,8 @@ import jdk.internal.javac.PreviewFeature; * will have a {@code kind} of {@link Opcode.Kind#INVOKE}. 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 InvokeInstruction extends Instruction permits AbstractInstruction.BoundInvokeInterfaceInstruction, AbstractInstruction.BoundInvokeInstruction, AbstractInstruction.UnboundInvokeInstruction { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/LabelTarget.java b/src/java.base/share/classes/java/lang/classfile/instruction/LabelTarget.java index 8682d0ee508..bc1deffc98b 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/LabelTarget.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/LabelTarget.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,6 @@ import java.lang.classfile.Label; import java.lang.classfile.PseudoInstruction; import jdk.internal.classfile.impl.LabelImpl; -import jdk.internal.javac.PreviewFeature; /** * A pseudo-instruction which indicates that the specified label corresponds to @@ -39,9 +38,8 @@ import jdk.internal.javac.PreviewFeature; * * @see PseudoInstruction * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LabelTarget extends PseudoInstruction permits LabelImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/LineNumber.java b/src/java.base/share/classes/java/lang/classfile/instruction/LineNumber.java index a06e7cfceba..a9a497708c0 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/LineNumber.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/LineNumber.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,6 @@ import java.lang.classfile.PseudoInstruction; import java.lang.classfile.attribute.LineNumberTableAttribute; import jdk.internal.classfile.impl.LineNumberImpl; -import jdk.internal.javac.PreviewFeature; /** * A pseudo-instruction which models a single entry in the @@ -41,9 +40,8 @@ import jdk.internal.javac.PreviewFeature; * * @see PseudoInstruction * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LineNumber extends PseudoInstruction permits LineNumberImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/LoadInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/LoadInstruction.java index ce6463ef924..c499dcc9944 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/LoadInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/LoadInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,6 @@ import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.BytecodeHelpers; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a local variable load instruction in the {@code code} array of a @@ -41,9 +40,8 @@ import jdk.internal.javac.PreviewFeature; * {@link Opcode.Kind#LOAD}. 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 LoadInstruction extends Instruction permits AbstractInstruction.BoundLoadInstruction, AbstractInstruction.UnboundLoadInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/LocalVariable.java b/src/java.base/share/classes/java/lang/classfile/instruction/LocalVariable.java index 390034bd666..0f8cb672e51 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/LocalVariable.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/LocalVariable.java @@ -37,7 +37,6 @@ import jdk.internal.classfile.impl.AbstractPseudoInstruction; import jdk.internal.classfile.impl.BoundLocalVariable; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * A pseudo-instruction which models a single entry in the @@ -47,9 +46,8 @@ import jdk.internal.javac.PreviewFeature; * * @see PseudoInstruction * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LocalVariable extends PseudoInstruction permits AbstractPseudoInstruction.UnboundLocalVariable, BoundLocalVariable { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/LocalVariableType.java b/src/java.base/share/classes/java/lang/classfile/instruction/LocalVariableType.java index d0d2cd1581f..c9427491733 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/LocalVariableType.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/LocalVariableType.java @@ -36,7 +36,6 @@ import java.lang.classfile.constantpool.Utf8Entry; import jdk.internal.classfile.impl.AbstractPseudoInstruction; import jdk.internal.classfile.impl.BoundLocalVariableType; import jdk.internal.classfile.impl.TemporaryConstantPool; -import jdk.internal.javac.PreviewFeature; /** * A pseudo-instruction which models a single entry in the {@link @@ -44,9 +43,8 @@ import jdk.internal.javac.PreviewFeature; * traversal of the elements of a {@link CodeModel}, according to the setting of * the {@link ClassFile.DebugElementsOption} option. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface LocalVariableType extends PseudoInstruction permits AbstractPseudoInstruction.UnboundLocalVariableType, BoundLocalVariableType { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/LookupSwitchInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/LookupSwitchInstruction.java index ce6c0cce109..7b286e9cfd2 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/LookupSwitchInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/LookupSwitchInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,16 +31,14 @@ import java.lang.classfile.Label; import java.util.List; import jdk.internal.classfile.impl.AbstractInstruction; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code lookupswitch} instruction in 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 LookupSwitchInstruction extends Instruction permits AbstractInstruction.BoundLookupSwitchInstruction, AbstractInstruction.UnboundLookupSwitchInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/MonitorInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/MonitorInstruction.java index 9bec7805339..1c8268cddd6 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/MonitorInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/MonitorInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,16 +31,14 @@ import java.lang.classfile.Opcode; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code monitorenter} or {@code monitorexit} instruction in 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 MonitorInstruction extends Instruction permits AbstractInstruction.UnboundMonitorInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/NewMultiArrayInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/NewMultiArrayInstruction.java index f5e0129205c..4a1f6cfd170 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/NewMultiArrayInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/NewMultiArrayInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,16 +31,14 @@ import java.lang.classfile.constantpool.ClassEntry; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.BytecodeHelpers; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code multianewarray} invocation instruction in 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 NewMultiArrayInstruction extends Instruction permits AbstractInstruction.BoundNewMultidimensionalArrayInstruction, AbstractInstruction.UnboundNewMultidimensionalArrayInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/NewObjectInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/NewObjectInstruction.java index e6e8fc64d17..f063733b64f 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/NewObjectInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/NewObjectInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,16 +30,14 @@ import java.lang.classfile.Instruction; import java.lang.classfile.constantpool.ClassEntry; import jdk.internal.classfile.impl.AbstractInstruction; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code new} instruction in 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 NewObjectInstruction extends Instruction permits AbstractInstruction.BoundNewObjectInstruction, AbstractInstruction.UnboundNewObjectInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/NewPrimitiveArrayInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/NewPrimitiveArrayInstruction.java index 4adc7536c2c..411bf7f6b55 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/NewPrimitiveArrayInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/NewPrimitiveArrayInstruction.java @@ -30,16 +30,14 @@ import java.lang.classfile.Instruction; import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractInstruction; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code newarray} invocation instruction in 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 NewPrimitiveArrayInstruction extends Instruction permits AbstractInstruction.BoundNewPrimitiveArrayInstruction, AbstractInstruction.UnboundNewPrimitiveArrayInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/NewReferenceArrayInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/NewReferenceArrayInstruction.java index b622f915c46..c85ed9dd3d9 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/NewReferenceArrayInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/NewReferenceArrayInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,16 +30,14 @@ import java.lang.classfile.Instruction; import java.lang.classfile.constantpool.ClassEntry; import jdk.internal.classfile.impl.AbstractInstruction; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code anewarray} invocation instruction in 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 NewReferenceArrayInstruction extends Instruction permits AbstractInstruction.BoundNewReferenceArrayInstruction, AbstractInstruction.UnboundNewReferenceArrayInstruction { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/NopInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/NopInstruction.java index 3183ad88816..3c11803109a 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/NopInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/NopInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,16 +29,14 @@ import java.lang.classfile.CodeModel; import java.lang.classfile.Instruction; import jdk.internal.classfile.impl.AbstractInstruction; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code nop} invocation instruction in 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 NopInstruction extends Instruction permits AbstractInstruction.UnboundNopInstruction { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/OperatorInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/OperatorInstruction.java index 602f34ec03e..d1eb8aa1a3d 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/OperatorInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/OperatorInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,6 @@ import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models an arithmetic operator instruction in the {@code code} array of a @@ -40,9 +39,8 @@ import jdk.internal.javac.PreviewFeature; * {@link Opcode.Kind#OPERATOR}. 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 OperatorInstruction extends Instruction permits AbstractInstruction.UnboundOperatorInstruction { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/ReturnInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/ReturnInstruction.java index 6596404a582..3bbb96b1cbe 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/ReturnInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/ReturnInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,6 @@ import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.BytecodeHelpers; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a return-from-method instruction in the {@code code} array of a @@ -41,9 +40,8 @@ import jdk.internal.javac.PreviewFeature; * {@link Opcode.Kind#RETURN}. 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 ReturnInstruction extends Instruction permits AbstractInstruction.UnboundReturnInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/StackInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/StackInstruction.java index 17e9496652b..b01b206e368 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/StackInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/StackInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,6 @@ import java.lang.classfile.Opcode; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a stack manipulation instruction in the {@code code} array of a @@ -39,9 +38,8 @@ import jdk.internal.javac.PreviewFeature; * {@link Opcode.Kind#STACK}. 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 StackInstruction extends Instruction permits AbstractInstruction.UnboundStackInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/StoreInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/StoreInstruction.java index 68bf54e61c2..1d7bdce1fdf 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/StoreInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/StoreInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,6 @@ import java.lang.classfile.TypeKind; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.BytecodeHelpers; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models a local variable store instruction in the {@code code} array of a @@ -41,9 +40,8 @@ import jdk.internal.javac.PreviewFeature; * {@link Opcode.Kind#STORE}. 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 StoreInstruction extends Instruction permits AbstractInstruction.BoundStoreInstruction, AbstractInstruction.UnboundStoreInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/SwitchCase.java b/src/java.base/share/classes/java/lang/classfile/instruction/SwitchCase.java index 6149945532b..3f5f91031b6 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/SwitchCase.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/SwitchCase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,6 @@ package java.lang.classfile.instruction; import java.lang.classfile.Label; import jdk.internal.classfile.impl.AbstractInstruction; -import jdk.internal.javac.PreviewFeature; /** * Models a single case in a {@code lookupswitch} or {@code tableswitch} @@ -36,9 +35,8 @@ import jdk.internal.javac.PreviewFeature; * @see LookupSwitchInstruction * @see TableSwitchInstruction * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) public sealed interface SwitchCase permits AbstractInstruction.SwitchCaseImpl { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/TableSwitchInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/TableSwitchInstruction.java index a8bce119db2..bbe7a4d6c0c 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/TableSwitchInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/TableSwitchInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,16 +31,14 @@ import java.lang.classfile.Label; import java.util.List; import jdk.internal.classfile.impl.AbstractInstruction; -import jdk.internal.javac.PreviewFeature; /** * Models a {@code tableswitch} instruction in 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 TableSwitchInstruction extends Instruction permits AbstractInstruction.BoundTableSwitchInstruction, AbstractInstruction.UnboundTableSwitchInstruction { /** diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/ThrowInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/ThrowInstruction.java index 68d861ba06d..ec6fdc38626 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/ThrowInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/ThrowInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,16 +29,14 @@ import java.lang.classfile.CodeModel; import java.lang.classfile.Instruction; import jdk.internal.classfile.impl.AbstractInstruction; -import jdk.internal.javac.PreviewFeature; /** * Models an {@code athrow} instruction in 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 ThrowInstruction extends Instruction permits AbstractInstruction.UnboundThrowInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/TypeCheckInstruction.java b/src/java.base/share/classes/java/lang/classfile/instruction/TypeCheckInstruction.java index a4b9818a4be..032e7a8462b 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/TypeCheckInstruction.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/TypeCheckInstruction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,16 +34,14 @@ import java.lang.constant.ClassDesc; import jdk.internal.classfile.impl.AbstractInstruction; import jdk.internal.classfile.impl.TemporaryConstantPool; import jdk.internal.classfile.impl.Util; -import jdk.internal.javac.PreviewFeature; /** * Models an {@code instanceof} or {@code checkcast} instruction in 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 TypeCheckInstruction extends Instruction permits AbstractInstruction.BoundTypeCheckInstruction, AbstractInstruction.UnboundTypeCheckInstruction { diff --git a/src/java.base/share/classes/java/lang/classfile/instruction/package-info.java b/src/java.base/share/classes/java/lang/classfile/instruction/package-info.java index 2bb35494da0..d2a36e16615 100644 --- a/src/java.base/share/classes/java/lang/classfile/instruction/package-info.java +++ b/src/java.base/share/classes/java/lang/classfile/instruction/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,9 +28,7 @@ * * The {@code java.lang.classfile.attribute} package contains interfaces describing code instructions. * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) package java.lang.classfile.instruction; -import jdk.internal.javac.PreviewFeature; diff --git a/src/java.base/share/classes/java/lang/classfile/package-info.java b/src/java.base/share/classes/java/lang/classfile/package-info.java index 6e9ecfe4819..2d6a8959a2d 100644 --- a/src/java.base/share/classes/java/lang/classfile/package-info.java +++ b/src/java.base/share/classes/java/lang/classfile/package-info.java @@ -546,9 +546,6 @@ * | CharacterRange(int rangeStart, int rangeEnd, int flags, Label startScope, Label endScope) * } * - * @since 22 + * @since 24 */ -@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API) package java.lang.classfile; - -import jdk.internal.javac.PreviewFeature; diff --git a/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java b/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java index 0dff7c8ce42..269a9a8416e 100644 --- a/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java +++ b/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java @@ -74,8 +74,6 @@ public @interface PreviewFeature { SCOPED_VALUES, @JEP(number=480, title="Structured Concurrency", status="Third Preview") STRUCTURED_CONCURRENCY, - @JEP(number=466, title="ClassFile API", status="Second Preview") - CLASSFILE_API, STREAM_GATHERERS, @JEP(number=494, title="Module Import Declarations", status="Second Preview") MODULE_IMPORTS,