ClassReader
. Exposes methods to decode and read javac entities
from the constant pool.
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Class and Description |
---|---|
pack-priv class | |
public static interface |
Modifier and Type | Field and Description |
---|---|
private final ByteBuffer | |
private static final BitSet | |
private static final BitSet | |
private static final BitSet | |
private static final BitSet | |
private final Names | |
private static final BitSet | |
private PoolReader. | |
private final ClassReader | |
private final Symtab | |
private static final BitSet | |
private final Convert. |
Access | Constructor and Description |
---|---|
pack-priv | |
pack-priv | |
pack-priv |
Modifier and Type | Method and Description |
---|---|
pack-priv Symbol. | |
pack-priv Object | |
pack-priv Symbol. | |
pack-priv Name | |
pack-priv PoolConstant. | |
pack-priv Symbol. | |
pack-priv Type | |
private <Z> Z | |
pack-priv boolean | |
pack-priv <Z> Z | |
private <Z> Z | |
pack-priv <Z> Z | |
pack-priv <Z> Z | peekName(int index, PoolReader.
Peek a name from the pool at given index without resolving. |
pack-priv <Z> Z | |
pack-priv int | readPool(ByteBuffer poolbuf, int offset)
Parse all constant pool entries, and keep track of their offsets. |
private int | |
private Object | |
private int |
buf | back to summary |
---|---|
private final ByteBuffer buf |
classCP | back to summary |
---|---|
private static final BitSet classCP |
constantCP | back to summary |
---|---|
private static final BitSet constantCP |
moduleCP | back to summary |
---|---|
private static final BitSet moduleCP |
nameAndTypeCP | back to summary |
---|---|
private static final BitSet nameAndTypeCP |
names | back to summary |
---|---|
private final Names names |
packageCP | back to summary |
---|---|
private static final BitSet packageCP |
pool | back to summary |
---|---|
private PoolReader. |
reader | back to summary |
---|---|
private final ClassReader reader |
syms | back to summary |
---|---|
private final Symtab syms |
utf8CP | back to summary |
---|---|
private static final BitSet utf8CP |
utf8validation | back to summary |
---|---|
private final Convert. |
PoolReader | back to summary |
---|---|
pack-priv PoolReader(ByteBuffer buf) |
PoolReader | back to summary |
---|---|
pack-priv PoolReader(ClassReader reader, Names names, Symtab syms) |
PoolReader | back to summary |
---|---|
pack-priv PoolReader(ClassReader reader, ByteBuffer buf, Names names, Symtab syms) |
getClass | back to summary |
---|---|
pack-priv Symbol. Get a class symbol from the pool at given index. |
getConstant | back to summary |
---|---|
pack-priv Object getConstant(int index) Get a class symbol from the pool at given index. |
getModule | back to summary |
---|---|
pack-priv Symbol. Get a module symbol from the pool at given index. |
getName | back to summary |
---|---|
pack-priv Name getName(int index) Get a name from the pool at given index. |
getNameAndType | back to summary |
---|---|
pack-priv PoolConstant. Get a name and type pair from the pool at given index. |
getPackage | back to summary |
---|---|
pack-priv Symbol. Get a module symbol from the pool at given index. |
getType | back to summary |
---|---|
pack-priv Type getType(int index) Get a type from the pool at given index. |
getUtf8 | back to summary |
---|---|
private <Z> Z getUtf8(int index, PoolReader. |
hasTag | back to summary |
---|---|
pack-priv boolean hasTag(int index, int tag) |
peekClassName | back to summary |
---|---|
pack-priv <Z> Z peekClassName(int index, PoolReader. Get class name without resolving |
peekItemName | back to summary |
---|---|
private <Z> Z peekItemName(int index, PoolReader. |
peekModuleName | back to summary |
---|---|
pack-priv <Z> Z peekModuleName(int index, PoolReader. Get module name without resolving |
peekName | back to summary |
---|---|
pack-priv <Z> Z peekName(int index, PoolReader. Peek a name from the pool at given index without resolving. |
peekPackageName | back to summary |
---|---|
pack-priv <Z> Z peekPackageName(int index, PoolReader. Get package name without resolving |
readPool | back to summary |
---|---|
pack-priv int readPool(ByteBuffer poolbuf, int offset) Parse all constant pool entries, and keep track of their offsets. For performance and laziness
reasons, it would be unwise to eagerly turn all pool entries into corresponding javac
entities. First, not all entries are actually going to be read/used by javac; secondly,
there are cases where creating a symbol too early might result in issues (hence methods like
|
readPoolInternal | back to summary |
---|---|
private int readPoolInternal(ByteBuffer poolbuf, int offset) throws UnderflowException |
resolve | back to summary |
---|---|
private Object resolve(ByteBuffer poolbuf, int tag, int offset) throws InvalidUtfException, UnderflowException |
sizeof | back to summary |
---|---|
private int sizeof(int tag) |
Modifier and Type | Field and Description |
---|---|
pack-priv final int[] | |
pack-priv final ByteBuffer | |
pack-priv final Object[] |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
private int | |
pack-priv int | |
pack-priv <P> P | |
pack-priv int |
offsets | back to summary |
---|---|
pack-priv final int[] offsets |
poolbuf | back to summary |
---|---|
pack-priv final ByteBuffer poolbuf |
values | back to summary |
---|---|
pack-priv final Object[] values |
ImmutablePoolHelper | back to summary |
---|---|
public ImmutablePoolHelper(ByteBuffer poolbuf, int[] offsets) |
checkIndex | back to summary |
---|---|
private int checkIndex(int index) |
offset | back to summary |
---|---|
pack-priv int offset(int index) |
readIfNeeded | back to summary |
---|---|
pack-priv <P> P readIfNeeded(int index, BitSet expectedTags)
|
tag | back to summary |
---|---|
pack-priv int tag(int index) |
Modifier and Type | Method and Description |
---|---|
public X |
map | back to summary |
---|---|
public X map(byte[] bytes, int offset, int len) throws InvalidUtfException |