mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8334734: Remove specialized readXxxEntry methods from ClassReader
Reviewed-by: asotona
This commit is contained in:
parent
3a2d426489
commit
8a664a4c35
9 changed files with 58 additions and 168 deletions
|
@ -27,10 +27,6 @@ package java.lang.classfile;
|
|||
import java.lang.classfile.constantpool.ClassEntry;
|
||||
import java.lang.classfile.constantpool.ConstantPool;
|
||||
import java.lang.classfile.constantpool.ConstantPoolException;
|
||||
import java.lang.classfile.constantpool.MethodHandleEntry;
|
||||
import java.lang.classfile.constantpool.ModuleEntry;
|
||||
import java.lang.classfile.constantpool.NameAndTypeEntry;
|
||||
import java.lang.classfile.constantpool.PackageEntry;
|
||||
import java.lang.classfile.constantpool.PoolEntry;
|
||||
import java.lang.classfile.constantpool.Utf8Entry;
|
||||
import jdk.internal.classfile.impl.ClassReaderImpl;
|
||||
|
@ -130,77 +126,6 @@ public sealed interface ClassReader extends ConstantPool
|
|||
*/
|
||||
<T extends PoolEntry> T readEntryOrNull(int offset, Class<T> cls);
|
||||
|
||||
/**
|
||||
* {@return the UTF8 entry whose index is given at the specified
|
||||
* offset within the classfile}
|
||||
* @param offset the offset of the index within the classfile
|
||||
* @throws ConstantPoolException if the index is out of range of the
|
||||
* constant pool size, or zero, or the index does not correspond to
|
||||
* a UTF8 entry
|
||||
*/
|
||||
Utf8Entry readUtf8Entry(int offset);
|
||||
|
||||
/**
|
||||
* {@return the UTF8 entry whose index is given at the specified
|
||||
* offset within the classfile, or null if the index at the specified
|
||||
* offset is zero}
|
||||
* @param offset the offset of the index within the classfile
|
||||
* @throws ConstantPoolException if the index is out of range of the
|
||||
* constant pool size, or the index does not correspond to
|
||||
* a UTF8 entry
|
||||
*/
|
||||
Utf8Entry readUtf8EntryOrNull(int offset);
|
||||
|
||||
/**
|
||||
* {@return the module entry whose index is given at the specified
|
||||
* offset within the classfile}
|
||||
* @param offset the offset of the index within the classfile
|
||||
* @throws ConstantPoolException if the index is out of range of the
|
||||
* constant pool size, or zero, or the index does not correspond to
|
||||
* a module entry
|
||||
*/
|
||||
ModuleEntry readModuleEntry(int offset);
|
||||
|
||||
/**
|
||||
* {@return the package entry whose index is given at the specified
|
||||
* offset within the classfile}
|
||||
* @param offset the offset of the index within the classfile
|
||||
* @throws ConstantPoolException if the index is out of range of the
|
||||
* constant pool size, or zero, or the index does not correspond to
|
||||
* a package entry
|
||||
*/
|
||||
PackageEntry readPackageEntry(int offset);
|
||||
|
||||
/**
|
||||
* {@return the class entry whose index is given at the specified
|
||||
* offset within the classfile}
|
||||
* @param offset the offset of the index within the classfile
|
||||
* @throws ConstantPoolException if the index is out of range of the
|
||||
* constant pool size, or zero, or the index does not correspond to
|
||||
* a class entry
|
||||
*/
|
||||
ClassEntry readClassEntry(int offset);
|
||||
|
||||
/**
|
||||
* {@return the name-and-type entry whose index is given at the specified
|
||||
* offset within the classfile}
|
||||
* @param offset the offset of the index within the classfile
|
||||
* @throws ConstantPoolException if the index is out of range of the
|
||||
* constant pool size, or zero, or the index does not correspond to
|
||||
* a name-and-type entry
|
||||
*/
|
||||
NameAndTypeEntry readNameAndTypeEntry(int offset);
|
||||
|
||||
/**
|
||||
* {@return the method handle entry whose index is given at the specified
|
||||
* offset within the classfile}
|
||||
* @param offset the offset of the index within the classfile
|
||||
* @throws ConstantPoolException if the index is out of range of the
|
||||
* constant pool size, or zero, or the index does not correspond to
|
||||
* a method handle entry
|
||||
*/
|
||||
MethodHandleEntry readMethodHandleEntry(int offset);
|
||||
|
||||
/**
|
||||
* {@return the unsigned byte at the specified offset within the classfile}
|
||||
* @param offset the offset within the classfile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue