spring-framework / org.springframework.asm / ClassWriter / newField

newField

open fun newField(owner: String, name: String, desc: String): Int

Adds a field reference to the constant pool of the class being build. Does nothing if the constant pool already contains a similar item. This method is intended for Attribute sub classes, and is normally not needed by class generators or adapters.

Parameters

owner - the internal name of the field's owner class.

name - the field's name.

desc - the field's descriptor.

Return
the index of a new or already existing field reference item.