affirm(insn.opcode() == opc_getfield || insn.opcode() == opc_putfield);
final boolean isGet = (insn.opcode() == opc_getfield);
// get the instruction arguments
final InsnConstOp fieldInsn = (InsnConstOp)insn;
final ConstFieldRef fieldRef = (ConstFieldRef)fieldInsn.value();
final ConstNameAndType fieldNameAndType = fieldRef.nameAndType();
final String fieldName = fieldNameAndType.name().asString();
final String fieldType = fieldNameAndType.signature().asString();
final String qualifyingClassName = fieldRef.className().asString();
// get the field's declaring class from the model
final String declClassName =
meta.getDeclaringClass(qualifyingClassName, fieldName);
affirm(declClassName != null, "Cannot get declaring class of "
+ qualifyingClassName + "." + fieldName);