public class ConstantPool extends Object
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
Constant
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.