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

Method newField

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

Adds a field reference to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. @param owner the internal name of the field's owner class. @param name the field's name. @param desc the field's descriptor. @return a new or already existing fie

(
    final String owner,
    final String name,
    final String desc)

Source from the content-addressed store, hash-verified

714 */
715
716 Item newField (
717 final String owner,
718 final String name,
719 final String desc)
720 {
721 key3.set(FIELD, owner, name, desc);
722 Item result = get(key3);
723 if (result == null) {
724 put122(FIELD, newClass(owner).index, newNameType(name, desc).index);
725 result = new Item(index++, key3);
726 put(result);
727 }
728 return result;
729 }
730
731 /**
732 * Adds a method reference to the constant pool of the class being build. Does

Callers 1

visitFieldInsnMethod · 0.80

Calls 6

getMethod · 0.95
put122Method · 0.95
newClassMethod · 0.95
newNameTypeMethod · 0.95
putMethod · 0.95
setMethod · 0.45

Tested by

no test coverage detected