package com.jpexs.asdec.action.swf5; import com.jpexs.asdec.action.Action; import com.jpexs.asdec.action.treemodel.CallMethodTreeItem; import com.jpexs.asdec.action.treemodel.ConstantPool; import com.jpexs.asdec.action.treemodel.TreeItem; import java.util.ArrayList; import java.util.List; import java.util.Stack; public class ActionCallMethod extends Action { public ActionCallMethod() { super(0x52, 0); } @Override public String toString() { return "CallMethod"; } @Override public void translate(Stack stack, ConstantPool constants, List output, java.util.HashMap regNames) { TreeItem methodName = stack.pop(); TreeItem scriptObject = stack.pop(); long numArgs = popLong(stack); List args = new ArrayList(); for (long l = 0; l < numArgs; l++) { args.add(stack.pop()); } stack.push(new CallMethodTreeItem(this, scriptObject, methodName, args)); } }