Simplify.
There is no real need to convert every attribute name into numeric tag via lookup table, when there are only two attribute names that we recognize.

In the old code there was an average of (ATTRIBUTE_NAMES.length/2) = 11 String.equals() calls when looking up a numeric 'tag'.
In the new code there will be two String.equals() calls.

This is a backport of r1624586 from trunk

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1625515 13f79535-47bb-0310-9956-ffa450edef68
Remove constant_pool_count field.
The field is never read, and its value is known from the length of constant_pool array created in constructor.
Backport of r1624588 from trunk

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1625516 13f79535-47bb-0310-9956-ffa450edef68
Add 'final' modifiers to fields.
Remove several num_xxx fields that accompanied an xxx array.
Port of r1624592 from trunk

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1625536 13f79535-47bb-0310-9956-ffa450edef68
Remove RuntimeVisibleParameterAnnotations and its supporting classes.
The fields in these classes have no getters (especially ParameterAnnotationEntry.annotation_table).
As such, information stored in those classes was never read by Tomcat.
Port of r1624598 from trunk

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1625546 13f79535-47bb-0310-9956-ffa450edef68
Flatten class hierarchy.  The only subtype of Annotations class is RuntimeVisibleAnnotations.
Port of r1624605 from trunk

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1625547 13f79535-47bb-0310-9956-ffa450edef68
Get rid of ArrayList arithmetics in JavaClass.getAnnotationEntries()
Note that this changes return value of getAnnotationEntries() to be null instead of zero-length array by default.

This is based on the following:
- All annotation entries come from a "RuntimeVisibleAnnotations" attribute on a class file
- According to JVM specification, ch.4.7.16
"Each ClassFile, field_info, and method_info structure may contain at most one RuntimeVisibleAnnotations attribute"

Thus there is no need to create an array of attributes and enumerate all those, as there is either zero or one such attribute.
Port of r1624614 from trunk

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1625551 13f79535-47bb-0310-9956-ffa450edef68
Do not create an empty arrays when Class has no interfaces.
Skip creation of int[] indexes array and share the same empty String[] names array.
Port of r1624636 from trunk

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1625552 13f79535-47bb-0310-9956-ffa450edef68
Move int -> String mapping for class and interface names from JavaClass to ClassParser.
This avoids an intermediary int[] array.
Move commons classname lookup and compact code into a helper method.
Port of r1624642 from trunk

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1625553 13f79535-47bb-0310-9956-ffa450edef68
Inline ConstantPool.getConstantString() method.
Port of r1624645 from trunk

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1625554 13f79535-47bb-0310-9956-ffa450edef68
Remove class_name argument from constructor, as Tomcat does not provide the name.
Port of r1624647 from trunk

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1625555 13f79535-47bb-0310-9956-ffa450edef68