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

Method newString

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

Adds a string to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. @param value the String value. @return a new or already existing string item.

(final String value)

Source from the content-addressed store, hash-verified

865 */
866
867 private Item newString (final String value) {
868 key2.set(STR, value, null, null);
869 Item result = get(key2);
870 if (result == null) {
871 pool.put12(STR, newUTF8(value).index);
872 result = new Item(index++, key2);
873 put(result);
874 }
875 return result;
876 }
877
878 /**
879 * Adds a name and type to the constant pool of the class being build. Does

Callers 1

newCstMethod · 0.95

Calls 5

getMethod · 0.95
newUTF8Method · 0.95
putMethod · 0.95
put12Method · 0.80
setMethod · 0.45

Tested by

no test coverage detected