8334714: Implement JEP 484: Class-File API

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

View file

@ -33,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 extends PoolEntry> T readEntryOrNull(int offset, Class<T> cls);