Adds a CONSTANT_Class_info, CONSTANT_String_info, CONSTANT_MethodType_info, CONSTANT_Module_info or CONSTANT_Package_info to the constant pool of this symbol table. Does nothing if the constant pool already contains a similar item. @param tag one of Symbol#CONSTANT_CLASS_TAG, {@link Symbol#
(final int tag, final String value)
| 1009 | * @return a new or already existing Symbol with the given value. |
| 1010 | */ |
| 1011 | private Symbol addConstantUtf8Reference(final int tag, final String value) { |
| 1012 | int hashCode = hash(tag, value); |
| 1013 | Entry entry = get(hashCode); |
| 1014 | while (entry != null) { |
| 1015 | if (entry.tag == tag && entry.hashCode == hashCode && entry.value.equals(value)) { |
| 1016 | return entry; |
| 1017 | } |
| 1018 | entry = entry.next; |
| 1019 | } |
| 1020 | constantPool.put12(tag, addConstantUtf8(value)); |
| 1021 | return put(new Entry(constantPoolCount++, tag, value, hashCode)); |
| 1022 | } |
| 1023 | |
| 1024 | /** |
| 1025 | * Adds a new CONSTANT_Class_info, CONSTANT_String_info, CONSTANT_MethodType_info, |
no test coverage detected