Re: How to push a Custom Type Object on Stack
Zaree Faryal <zareefaryal_889 <at> yahoo.com>
2011-06-09 06:38:15 GMT
What i want to do is i have a class
class Automobile {
public void getEngine(int carNo,EngineClass engineClassObj){
System.out.println("EngineNo="+engineClassObj.sisNo);
}
}
Now when i load "Automobile" class in memory.
ilist = new InstructionList();
ilist.append(InstructionConstants.ALOAD_0);
ilist.append(new PUSH(pgen,345));
////Hear Now i have to also push the Object on Stack
ilist.append(ifact.createInvoke(_invoking_ClassName,
_invoking_MethodName, Type.INT,
new Type[] { Type.INT,Type.OBJECT }, Constants.INVOKEVIRTUAL));
ilist.append(InstructionConstants.IRETURN);
1-if i use createNew() method and generate new object then how i am going to
fill its fields value?
2-or if i firstly push all fields values of Engine type Obj on Stack using PUSH
then i can some how construct object on memory & then push it on Stack.
these are some solution i can think of.
so still need help...
________________________________
From: Martin von Gagern <Martin.vGagern <at> gmx.net>
(Continue reading)