ByteCode Engineering Library (by Apache) を使用して、別のクラスから出力クラスのコードを生成 (および変更) しようとしています。
String class_name = c_gen.getClassName();
Method[] Methods = c_gen.getMethods();
for (int i=0;i<Methods.length;i++)
{
MethodGen m_gen = new MethodGen(Methods[i], class_name, cpg);
InstructionList il = m_gen.getInstructionList();
InstructionHandle h;
il.insert(h,factory.createInvoke("ClassName","printSomething", Type.VOID,new Type[]{Type.STRING}, INVOKESTATIC));
}
そのため、すべてのメソッドに対して ClassName から printSomething を呼び出そうとしています。問題は、実際に文字列引数をメソッド printSomething に渡す方法がわからないことです。