質問

bcel のスタック上の整数を押すという問題に直面しています。 私はSOMECLASSすなわち「 mathclass

の方法を持っています。
    ilist = new InstructionList();
    ilist.append(InstructionConstants.ALOAD_0);
    ilist.append(new GETFIELD(findex));
   //I am trying to push some value using createLoad but it is not working 

     ilist.append(InstructionConstants.ALOAD_1);
    ilist.append(ifact.createInvoke("mathClass", _square, Type.INT,
       new Type[] { Type.INT }, Constants.INVOKEVIRTUAL));
.

ありがとう

役に立ちましたか?

解決

私は

を使います
new InstructionList.append(new PUSH(constantPool,23));
.

プッシュ方式は、スタック上のプリミティブ型データをプッシュするために使用します。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top