Constant
| Modifier and Type | Field and Description |
|---|---|
| private final Constant[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public < A T extends Constant> TConstant subclass | Returns: Constant valueIndex in constant pool index)Gets constant from constant pool. |
| public < A T extends Constant> TConstant subclass | Returns: Constant valueIndex in constant pool index, final byte Tag of expected constant, i.e., its type tag)Gets constant from constant pool and check whether it has the expected type. |
| public < A T extends Constant> TConstant subclass | Returns: Constant valueIndex in constant pool index, final Class<T> The castTo)Constant subclass to cast to.Gets constant from constant pool. |
| public ConstantInteger | Returns: ConstantInteger valueIndex in constant pool index)Gets constant from constant pool and check whether it has the expected type. |
| public ConstantUtf8 | Returns: ConstantUtf8 valueIndex in constant pool index)Gets constant from constant pool and check whether it has the expected type. |
| constantPool | back to summary |
|---|---|
| private final Constant[] constantPool | |
| ConstantPool | back to summary |
|---|---|
| pack-priv ConstantPool(final DataInput input) throws IOException, ClassFormatException Reads constants from given input stream.
| |
| getConstant | back to summary |
|---|---|
| public <T extends Constant> T getConstant(final int index) throws ClassFormatException Gets constant from constant pool.
| |
| getConstant | back to summary |
|---|---|
| public <T extends Constant> T getConstant(final int index, final byte tag) throws ClassFormatException Gets constant from constant pool and check whether it has the expected type.
| |
| getConstant | back to summary |
|---|---|
| public <T extends Constant> T getConstant(final int index, final Class<T> castTo) throws ClassFormatException Gets constant from constant pool.
| |
| getConstantInteger | back to summary |
|---|---|
| public ConstantInteger getConstantInteger(final int index) Gets constant from constant pool and check whether it has the expected type.
| |
| getConstantUtf8 | back to summary |
|---|---|
| public ConstantUtf8 getConstantUtf8(final int index) throws ClassFormatException Gets constant from constant pool and check whether it has the expected type.
| |