mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 11:20:54 +00:00
@@ -22,59 +22,59 @@ import java.util.List;
|
||||
|
||||
public class CallFunctionTreeItem extends TreeItem {
|
||||
|
||||
public GraphTargetItem functionName;
|
||||
public List<GraphTargetItem> arguments;
|
||||
public GraphTargetItem calculatedFunction;
|
||||
public GraphTargetItem functionName;
|
||||
public List<GraphTargetItem> arguments;
|
||||
public GraphTargetItem calculatedFunction;
|
||||
|
||||
public CallFunctionTreeItem(GraphSourceItem instruction, GraphTargetItem functionName, List<GraphTargetItem> arguments) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
this.functionName = functionName;
|
||||
this.arguments = arguments;
|
||||
}
|
||||
public CallFunctionTreeItem(GraphSourceItem instruction, GraphTargetItem functionName, List<GraphTargetItem> arguments) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
this.functionName = functionName;
|
||||
this.arguments = arguments;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(ConstantPool constants) {
|
||||
String paramStr = "";
|
||||
for (int t = 0; t < arguments.size(); t++) {
|
||||
if (t > 0) {
|
||||
paramStr += hilight(",");
|
||||
}
|
||||
paramStr += arguments.get(t).toString(constants);
|
||||
}
|
||||
return stripQuotes(functionName) + hilight("(") + paramStr + hilight(")");
|
||||
}
|
||||
@Override
|
||||
public String toString(ConstantPool constants) {
|
||||
String paramStr = "";
|
||||
for (int t = 0; t < arguments.size(); t++) {
|
||||
if (t > 0) {
|
||||
paramStr += hilight(",");
|
||||
}
|
||||
paramStr += arguments.get(t).toString(constants);
|
||||
}
|
||||
return stripQuotes(functionName) + hilight("(") + paramStr + hilight(")");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<com.jpexs.decompiler.flash.graph.GraphSourceItemPos> getNeededSources() {
|
||||
List<com.jpexs.decompiler.flash.graph.GraphSourceItemPos> ret = super.getNeededSources();
|
||||
ret.addAll(functionName.getNeededSources());
|
||||
for (GraphTargetItem ti : arguments) {
|
||||
ret.addAll(ti.getNeededSources());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@Override
|
||||
public List<com.jpexs.decompiler.flash.graph.GraphSourceItemPos> getNeededSources() {
|
||||
List<com.jpexs.decompiler.flash.graph.GraphSourceItemPos> ret = super.getNeededSources();
|
||||
ret.addAll(functionName.getNeededSources());
|
||||
for (GraphTargetItem ti : arguments) {
|
||||
ret.addAll(ti.getNeededSources());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCompileTime() {
|
||||
if (calculatedFunction == null) {
|
||||
return false;
|
||||
}
|
||||
return calculatedFunction.isCompileTime();
|
||||
}
|
||||
@Override
|
||||
public boolean isCompileTime() {
|
||||
if (calculatedFunction == null) {
|
||||
return false;
|
||||
}
|
||||
return calculatedFunction.isCompileTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean toBoolean() {
|
||||
if (calculatedFunction == null) {
|
||||
return false;
|
||||
}
|
||||
return calculatedFunction.toBoolean();
|
||||
}
|
||||
@Override
|
||||
public boolean toBoolean() {
|
||||
if (calculatedFunction == null) {
|
||||
return false;
|
||||
}
|
||||
return calculatedFunction.toBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double toNumber() {
|
||||
if (calculatedFunction == null) {
|
||||
return 0;
|
||||
}
|
||||
return calculatedFunction.toNumber();
|
||||
}
|
||||
@Override
|
||||
public double toNumber() {
|
||||
if (calculatedFunction == null) {
|
||||
return 0;
|
||||
}
|
||||
return calculatedFunction.toNumber();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user