Code formatting

This commit is contained in:
Jindra Pet��k
2012-12-25 11:33:41 +01:00
parent 24a6b82a94
commit 14ae8e435c
643 changed files with 26017 additions and 27040 deletions
@@ -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(")");
}
}