mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 13:40:46 +00:00
Code formatting
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.jpexs.asdec.abc.avm2.treemodel;
|
||||
|
||||
import com.jpexs.asdec.abc.avm2.ConstantPool;
|
||||
@@ -22,32 +21,30 @@ import com.jpexs.asdec.abc.avm2.instructions.AVM2Instruction;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class ConstructTreeItem extends TreeItem {
|
||||
public TreeItem object;
|
||||
public List<TreeItem> args;
|
||||
|
||||
public ConstructTreeItem(AVM2Instruction instruction, TreeItem object, List<TreeItem> args) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
this.object = object;
|
||||
this.args = args;
|
||||
}
|
||||
public TreeItem object;
|
||||
public List<TreeItem> args;
|
||||
|
||||
@Override
|
||||
public String toString(ConstantPool constants, HashMap<Integer,String> localRegNames) {
|
||||
String argStr = "";
|
||||
for (int a = 0; a < args.size(); a++) {
|
||||
if (a > 0) {
|
||||
argStr = argStr + ",";
|
||||
}
|
||||
argStr = argStr + args.get(a).toString(constants,localRegNames);
|
||||
}
|
||||
if (object instanceof NewFunctionTreeItem) {
|
||||
return object.toString(constants,localRegNames);
|
||||
}
|
||||
return hilight("new ") + object.toString(constants,localRegNames) + hilight("(") + argStr + hilight(")");
|
||||
|
||||
}
|
||||
public ConstructTreeItem(AVM2Instruction instruction, TreeItem object, List<TreeItem> args) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
this.object = object;
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(ConstantPool constants, HashMap<Integer, String> localRegNames) {
|
||||
String argStr = "";
|
||||
for (int a = 0; a < args.size(); a++) {
|
||||
if (a > 0) {
|
||||
argStr = argStr + ",";
|
||||
}
|
||||
argStr = argStr + args.get(a).toString(constants, localRegNames);
|
||||
}
|
||||
if (object instanceof NewFunctionTreeItem) {
|
||||
return object.toString(constants, localRegNames);
|
||||
}
|
||||
return hilight("new ") + object.toString(constants, localRegNames) + hilight("(") + argStr + hilight(")");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user