format source code

This commit is contained in:
honfika@gmail.com
2015-07-04 20:51:26 +02:00
parent 6cafe970fb
commit fac67d5baa
24 changed files with 5853 additions and 5413 deletions

View File

@@ -102,5 +102,4 @@ public class DottedChain {
}
return true;
}
}

View File

@@ -7,5 +7,4 @@ import com.jpexs.decompiler.graph.model.BinaryOp;
* @author JPEXS
*/
public interface EqualsTypeItem extends BinaryOp {
}

View File

@@ -312,5 +312,4 @@ public abstract class GraphTargetItem implements Serializable, Cloneable {
public GraphTargetItem invert(GraphSourceItem src) {
return new NotItem(src, this);
}
}

View File

@@ -73,5 +73,4 @@ public class TranslateStack extends Stack<GraphTargetItem> {
}
return super.pop();
}
}

View File

@@ -31,37 +31,37 @@ import java.util.Objects;
* @author JPEXS
*/
public class TypeItem extends GraphTargetItem {
public static TypeItem BOOLEAN = new TypeItem("Boolean");
public static TypeItem STRING = new TypeItem("String");
public static TypeItem ARRAY = new TypeItem("Array");
public static UnboundedTypeItem UNBOUNDED = new UnboundedTypeItem();
public DottedChain fullTypeName;
public TypeItem(String s) {
this(s == null ? new DottedChain() : new DottedChain(s.split("\\.")));
}
public TypeItem(DottedChain fullTypeName) {
this(fullTypeName, new ArrayList<GraphTargetItem>());
}
public TypeItem(DottedChain fullTypeName, List<GraphTargetItem> subtypes) {
super(null, NOPRECEDENCE);
this.fullTypeName = fullTypeName;
}
@Override
public int hashCode() {
int hash = 7;
hash = 83 * hash + Objects.hashCode(this.fullTypeName);
return hash;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
@@ -76,7 +76,7 @@ public class TypeItem extends GraphTargetItem {
}
return true;
}
@Override
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
if (localData.fullyQualifiedNames.contains(fullTypeName)) {
@@ -84,25 +84,25 @@ public class TypeItem extends GraphTargetItem {
} else {
writer.hilightSpecial(IdentifiersDeobfuscation.printIdentifier(localData.constantsAvm2 != null, fullTypeName.getLast()), HighlightSpecialType.TYPE_NAME, fullTypeName.toPrintableString());
}
return writer;
}
@Override
public GraphTargetItem returnType() {
return this;
}
@Override
public boolean hasReturnValue() {
return true;
}
@Override
public String toString() {
return fullTypeName.toString();
}
@Override
public List<GraphSourceItem> toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException {
return generator.generate(localData, this);

View File

@@ -105,5 +105,4 @@ public class DuplicateItem extends GraphTargetItem implements SimpleValue {
public boolean isSimpleValue() {
return ((value instanceof SimpleValue) && ((SimpleValue) value).isSimpleValue());
}
}

View File

@@ -74,5 +74,4 @@ public class FalseItem extends GraphTargetItem implements LogicalOpItem, SimpleV
public Object getResult() {
return Boolean.FALSE;
}
}

View File

@@ -16,7 +16,6 @@
*/
package com.jpexs.decompiler.graph.model;
import com.jpexs.decompiler.flash.ecma.Null;
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
import com.jpexs.decompiler.graph.GraphSourceItem;
import com.jpexs.decompiler.graph.GraphTargetItem;
@@ -55,5 +54,4 @@ public class GotoItem extends GraphTargetItem {
public Object getResult() {
return null;
}
}

View File

@@ -16,7 +16,6 @@
*/
package com.jpexs.decompiler.graph.model;
import com.jpexs.decompiler.flash.ecma.Null;
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
import com.jpexs.decompiler.graph.GraphSourceItem;
import com.jpexs.decompiler.graph.GraphTargetItem;
@@ -65,5 +64,4 @@ public class LabelItem extends GraphTargetItem {
public Object getResult() {
return null;
}
}

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2015 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -81,5 +81,4 @@ public class NotItem extends UnaryOpItem implements LogicalOpItem, Inverted {
public GraphTargetItem invert(GraphSourceItem src) {
return value;
}
}

View File

@@ -53,5 +53,4 @@ public class PopItem extends GraphTargetItem {
public Object getResult() {
return new Null();
}
}

View File

@@ -63,5 +63,4 @@ public class PushItem extends GraphTargetItem {
public GraphTargetItem getThroughRegister() {
return value.getThroughRegister();
}
}

View File

@@ -75,5 +75,4 @@ public class TrueItem extends GraphTargetItem implements LogicalOpItem, SimpleVa
public Object getResult() {
return Boolean.TRUE;
}
}