Is there a prefered way to read the entries in the constant pool? I could not
find one.
In the class ClassReader all necessary data is available but it's not accesible
(items are available via #getItem but #getItemCount is missing, field
#maxStringLength is private). To be able to read the data I would need at least
access via getter to this two attributes:
public int getItemCount() {
return items.length;
}
public int getMaxStringLength() {
return maxStringLength;
}
Since both methods do not allow to change attributes' values there is no risk
for adding this methods. On the other side the internal byte[] b is public
mutatable so there would be no increased risk to change items and
maxStringLength to public, too.
Regards Peter