mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 06:21:16 +00:00
Initial version based on previous work. (Version alpha 7)
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2010. JPEXS
|
||||
*/
|
||||
|
||||
package com.jpexs.asdec.abc.avm2.treemodel;
|
||||
|
||||
import com.jpexs.asdec.abc.avm2.ConstantPool;
|
||||
import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction;
|
||||
import com.jpexs.asdec.helpers.Highlighting;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class ConstructSuperTreeItem extends TreeItem {
|
||||
public TreeItem object;
|
||||
public List<TreeItem> args;
|
||||
|
||||
public ConstructSuperTreeItem(AVM2Instruction instruction, TreeItem object, List<TreeItem> args) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
this.object = object;
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(ConstantPool constants) {
|
||||
String argStr = "";
|
||||
for (int a = 0; a < args.size(); a++) {
|
||||
if (a > 0) {
|
||||
argStr = argStr + ",";
|
||||
}
|
||||
argStr = argStr + args.get(a).toString(constants);
|
||||
}
|
||||
String calee = object.toString(constants) + ".";
|
||||
if (Highlighting.stripHilights(calee).equals("this.")) calee = "";
|
||||
return calee + hilight("super(") + argStr + hilight(")");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user