3

BCELのスタックに整数をプッシュするというコンテキストで問題に直面しています。someClassのメソッド_square、つまり「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));

ありがとう

4

1 に答える 1

1

私が使う

new InstructionList.append(new PUSH(constantPool,23));

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

于 2011-06-06T05:29:13.080 に答える