public class ConstantPool extends Object
Constant| Modifier and Type | Method and Description |
|---|---|
Constant |
getConstant(int index)
Gets constant from constant pool.
|
Constant |
getConstant(int index,
byte tag)
Gets constant from constant pool and check whether it has the
expected type.
|
public Constant getConstant(int index)
index - Index in constant poolConstantpublic 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 typeConstantCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.