internal short AddFieldRef(string className, string fieldName, string fieldType)
{
FieldOrMethodRef @ref = new FieldOrMethodRef(className, fieldName, fieldType);
int theIndex = itsFieldRefHash.Get(@ref, -1);
if (theIndex == -1)
{
short ntIndex = AddNameAndType(fieldName, fieldType);
short classIndex = AddClass(className);
Ensure(5);
itsPool[itsTop++] = CONSTANT_Fieldref;
itsTop = ClassFileWriter.PutInt16(classIndex, itsPool, itsTop);
itsTop = ClassFileWriter.PutInt16(ntIndex, itsPool, itsTop);
theIndex = itsTopIndex++;
itsFieldRefHash.Put(@ref, theIndex);
}
SetConstantData(theIndex, @ref);
itsPoolTypes.Put(theIndex, CONSTANT_Fieldref);
return (short)theIndex;
}