public class ConstantPool
extends java.lang.Object
Constant
Modifier and Type | Method and Description |
---|---|
Constant |
getConstant(int index)
Get constant from constant pool.
|
Constant |
getConstant(int index,
byte tag)
Get constant from constant pool and check whether it has the
expected type.
|
public Constant getConstant(int index)
index
- Index in constant poolConstant
public Constant getConstant(int index, byte tag) throws ClassFormatException
index
- Index in constant pooltag
- Tag of expected constant, i.e., its typeClassFormatException
- If the constant is not of the expected typeConstant
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.