MCPcopy Create free account
hub / github.com/beanshell/beanshell / newNameType

Method newNameType

src/bsh/org/objectweb/asm/ClassWriter.java:887–896  ·  view source on GitHub ↗

Adds a name and type to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. @param name a name. @param desc a type descriptor. @return a new or already existing name and type item.

(final String name, final String desc)

Source from the content-addressed store, hash-verified

885 */
886
887 private Item newNameType (final String name, final String desc) {
888 key2.set(NAME_TYPE, name, desc, null);
889 Item result = get(key2);
890 if (result == null) {
891 put122(NAME_TYPE, newUTF8(name).index, newUTF8(desc).index);
892 result = new Item(index++, key2);
893 put(result);
894 }
895 return result;
896 }
897
898 /**
899 * Returns the constant pool's hash table item which is equal to the given

Callers 3

newFieldMethod · 0.95
newMethodMethod · 0.95
newItfMethodMethod · 0.95

Calls 5

getMethod · 0.95
put122Method · 0.95
newUTF8Method · 0.95
putMethod · 0.95
setMethod · 0.45

Tested by

no test coverage detected