Adds a type in the type table of this symbol table. Does nothing if the type table already contains a similar type. @param value an internal class name. @return the index of a new or already existing type Symbol with the given value.
(final String value)
| 1146 | * @return the index of a new or already existing type Symbol with the given value. |
| 1147 | */ |
| 1148 | int addType(final String value) { |
| 1149 | int hashCode = hash(Symbol.TYPE_TAG, value); |
| 1150 | Entry entry = get(hashCode); |
| 1151 | while (entry != null) { |
| 1152 | if (entry.tag == Symbol.TYPE_TAG && entry.hashCode == hashCode && entry.value.equals(value)) { |
| 1153 | return entry.index; |
| 1154 | } |
| 1155 | entry = entry.next; |
| 1156 | } |
| 1157 | return addType(new Entry(typeCount, Symbol.TYPE_TAG, value, hashCode)); |
| 1158 | } |
| 1159 | |
| 1160 | /** |
| 1161 | * Adds an {@link Frame#ITEM_UNINITIALIZED} type in the type table of this symbol table. Does |
no test coverage detected