= new CodeAttribute(getCodeAttributeUtf8(),
1, // maxStack
2, // maxLocals
begin,
new ExceptionTable(),
new AttributeVector());
augmenter.addMethod(methodName, methodSig, accessFlags,
codeAttr, exceptAttr);
return;
}
affirm(keyClassName != null);
// TODO: support for single field identity
// push a newly created an instance of this class
insn = insn.append(
Insn.create(opc_new,
pool.addClass(keyClassName)));
insn = insn.append(Insn.create(opc_dup));
insn = insn.append(Insn.create(opc_aload_1));
insn = insn.append(Insn.create(opc_checkcast,
pool.addClass(JAVA_String_Path)));
insn = insn.append(
Insn.create(opc_invokespecial,
pool.addMethodRef(
keyClassName,
NameHelper.constructorName(),
NameHelper.constructorSig(JAVA_String_Sig))));
// end of method body
insn = insn.append(Insn.create(opc_areturn));
final CodeAttribute codeAttr
= new CodeAttribute(getCodeAttributeUtf8(),
3, // maxStack
2, // maxLocals
begin,
new ExceptionTable(),
new AttributeVector());
augmenter.addMethod(methodName, methodSig, accessFlags,
codeAttr, exceptAttr);
}