mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 12:51:21 +00:00
final fields
This commit is contained in:
@@ -25,7 +25,7 @@ import java.io.InputStream;
|
||||
*/
|
||||
public class ChunkedInputStream extends InputStream {
|
||||
|
||||
private InputStream is;
|
||||
private final InputStream is;
|
||||
private int chunkPos = 0;
|
||||
private int chunkLen = 0;
|
||||
private boolean end = false;
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ import java.util.logging.Logger;
|
||||
*/
|
||||
public class RafInputStream extends InputStream {
|
||||
|
||||
private RandomAccessFile raf;
|
||||
private final RandomAccessFile raf;
|
||||
private long pos = 0;
|
||||
|
||||
public RafInputStream(RandomAccessFile raf) {
|
||||
|
||||
@@ -57,8 +57,8 @@ public class CacheAddr {
|
||||
public int fileName;
|
||||
public long val;
|
||||
public File rootPath;
|
||||
private Map<Integer, RandomAccessFile> dataFiles;
|
||||
private File externalFilesDir;
|
||||
private final Map<Integer, RandomAccessFile> dataFiles;
|
||||
private final File externalFilesDir;
|
||||
|
||||
public CacheAddr(InputStream is, File rootPath, Map<Integer, RandomAccessFile> dataFiles, File externalFilesDir) throws IOException {
|
||||
this.dataFiles = dataFiles;
|
||||
|
||||
+2
-2
@@ -36,8 +36,8 @@ public class Index {
|
||||
CacheAddr table[];
|
||||
public static final int kIndexTablesize = 0x10000;
|
||||
public File rootDir;
|
||||
private Map<Integer, RandomAccessFile> dataFiles;
|
||||
private File externalFilesDir;
|
||||
private final Map<Integer, RandomAccessFile> dataFiles;
|
||||
private final File externalFilesDir;
|
||||
|
||||
public void free() {
|
||||
for (RandomAccessFile r : dataFiles.values()) {
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.io.InputStream;
|
||||
*/
|
||||
public class IndexInputStream extends InputStream {
|
||||
|
||||
private InputStream is;
|
||||
private final InputStream is;
|
||||
public long pos = 0;
|
||||
|
||||
public long getPos() {
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.io.InputStream;
|
||||
*/
|
||||
public class CacheInputStream extends InputStream {
|
||||
|
||||
private InputStream is;
|
||||
private final InputStream is;
|
||||
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Location {
|
||||
public int fileSize;
|
||||
public boolean isMetadata;
|
||||
public long hash;
|
||||
private File rootDir;
|
||||
private final File rootDir;
|
||||
public static final long eReservedMask = 0x4C000000L;
|
||||
public static final long eLocationSelectorMask = 0x30000000L;
|
||||
public static final int eLocationSelectorOffset = 28;
|
||||
@@ -64,7 +64,7 @@ public class Location {
|
||||
#define BLOCK_SIZE_FOR_INDEX(idx) ((idx) ? (256 << SIZE_SHIFT(idx)) : 0)
|
||||
#define BITMAP_SIZE_FOR_INDEX(idx) ((idx) ? (131072 >> SIZE_SHIFT(idx)) : 0)
|
||||
*/
|
||||
private Map<Integer, RandomAccessFile> dataFiles;
|
||||
private final Map<Integer, RandomAccessFile> dataFiles;
|
||||
|
||||
public InputStream getInputStream() throws IOException {
|
||||
String fileName = getFileName();
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.Set;
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class BinarySWFBundle implements SWFBundle {
|
||||
private SWFSearch search;
|
||||
private final SWFSearch search;
|
||||
public BinarySWFBundle(InputStream is){
|
||||
search=new SWFSearch(new StreamSearch(is));
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ import java.io.IOException;
|
||||
*/
|
||||
public class RetryTask {
|
||||
|
||||
private RunnableIOEx r;
|
||||
private AbortRetryIgnoreHandler handler;
|
||||
private final RunnableIOEx r;
|
||||
private final AbortRetryIgnoreHandler handler;
|
||||
public Object result;
|
||||
|
||||
public RetryTask(RunnableIOEx r, AbortRetryIgnoreHandler handler) {
|
||||
|
||||
@@ -18,8 +18,6 @@ package com.jpexs.decompiler.flash;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.zip.ZipEntry;
|
||||
|
||||
@@ -973,7 +973,7 @@ public final class SWF implements TreeItem {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
private HashSet<EventListener> listeners = new HashSet<>();
|
||||
private final HashSet<EventListener> listeners = new HashSet<>();
|
||||
|
||||
public final void addEventListener(EventListener listener) {
|
||||
listeners.add(listener);
|
||||
@@ -1547,12 +1547,12 @@ public final class SWF implements TreeItem {
|
||||
public void exportBinaryData(AbortRetryIgnoreHandler handler, String outdir) throws IOException {
|
||||
exportBinaryData(handler, outdir, tags);
|
||||
}
|
||||
private HashMap<String, String> deobfuscated = new HashMap<>();
|
||||
private final HashMap<String, String> deobfuscated = new HashMap<>();
|
||||
private List<MyEntry<DirectValueActionItem, ConstantPool>> allVariableNames = new ArrayList<>();
|
||||
private List<GraphSourceItem> allFunctions = new ArrayList<>();
|
||||
private HashMap<DirectValueActionItem, ConstantPool> allStrings = new HashMap<>();
|
||||
private HashMap<DirectValueActionItem, String> usageTypes = new HashMap<>();
|
||||
private ActionDeobfuscation deobfuscation = new ActionDeobfuscation();
|
||||
private final HashMap<DirectValueActionItem, String> usageTypes = new HashMap<>();
|
||||
private final ActionDeobfuscation deobfuscation = new ActionDeobfuscation();
|
||||
|
||||
private static void getVariables(ConstantPool constantPool, BaseLocalData localData, Stack<GraphTargetItem> stack, List<GraphTargetItem> output, ActionGraphSource code, int ip, List<MyEntry<DirectValueActionItem, ConstantPool>> variables, List<GraphSourceItem> functions, HashMap<DirectValueActionItem, ConstantPool> strings, List<Integer> visited, HashMap<DirectValueActionItem, String> usageTypes, String path) throws InterruptedException {
|
||||
boolean debugMode = false;
|
||||
@@ -2055,10 +2055,10 @@ public final class SWF implements TreeItem {
|
||||
|
||||
private static class CachedImage implements Serializable {
|
||||
|
||||
private int[] data;
|
||||
private int width;
|
||||
private int height;
|
||||
private int type;
|
||||
private final int[] data;
|
||||
private final int width;
|
||||
private final int height;
|
||||
private final int type;
|
||||
public static final long serialVersionUID = 1L;
|
||||
|
||||
public CachedImage(BufferedImage img) {
|
||||
|
||||
@@ -82,13 +82,13 @@ import java.util.zip.InflaterInputStream;
|
||||
public class SWFInputStream extends InputStream {
|
||||
|
||||
private InputStream is;
|
||||
private Stack<Integer> margedPos = new Stack<>();
|
||||
private final Stack<Integer> margedPos = new Stack<>();
|
||||
private long pos;
|
||||
private int version;
|
||||
private static final Logger logger = Logger.getLogger(SWFInputStream.class.getName());
|
||||
private List<ProgressListener> listeners = new ArrayList<>();
|
||||
private final List<ProgressListener> listeners = new ArrayList<>();
|
||||
private long percentMax;
|
||||
private List<byte[]> buffered = new ArrayList<>();
|
||||
private final List<byte[]> buffered = new ArrayList<>();
|
||||
private ByteArrayOutputStream buffer;
|
||||
private static boolean DEOBFUSCATION_ALL_CODE_IN_PREVIOUS_TAG = Configuration.deobfuscateUsePrevTagOnly.get();
|
||||
|
||||
@@ -598,9 +598,9 @@ public class SWFInputStream extends InputStream {
|
||||
private final Tag tag;
|
||||
private final int version;
|
||||
private final int level;
|
||||
private boolean parallel;
|
||||
private boolean skipUnusualTags;
|
||||
private SWF swf;
|
||||
private final boolean parallel;
|
||||
private final boolean skipUnusualTags;
|
||||
private final SWF swf;
|
||||
|
||||
public TagResolutionTask(SWF swf, Tag tag, int version, int level, boolean parallel, boolean skipUnusualTags) {
|
||||
this.tag = tag;
|
||||
|
||||
@@ -48,8 +48,8 @@ import java.util.zip.DeflaterOutputStream;
|
||||
*/
|
||||
public class SWFOutputStream extends OutputStream {
|
||||
|
||||
private OutputStream os;
|
||||
private int version;
|
||||
private final OutputStream os;
|
||||
private final int version;
|
||||
private long pos = 0;
|
||||
private int bitPos = 0;
|
||||
private int tempByte = 0;
|
||||
|
||||
@@ -40,9 +40,9 @@ public class SWFSearch {
|
||||
|
||||
protected Searchable s;
|
||||
private boolean processed = false;
|
||||
private Set<ProgressListener> listeners = new HashSet<>();
|
||||
private List<ReReadableInputStream> swfStreams = new ArrayList<>();
|
||||
private Map<Integer,SWF> cachedSWFs = new HashMap<Integer, SWF>();
|
||||
private final Set<ProgressListener> listeners = new HashSet<>();
|
||||
private final List<ReReadableInputStream> swfStreams = new ArrayList<>();
|
||||
private final Map<Integer,SWF> cachedSWFs = new HashMap<>();
|
||||
|
||||
public SWFSearch(Searchable s) {
|
||||
this.s = s;
|
||||
|
||||
@@ -24,9 +24,9 @@ import java.io.InputStream;
|
||||
*/
|
||||
public class SWFSourceInfo {
|
||||
|
||||
private InputStream inputStream;
|
||||
private String file;
|
||||
private String fileTitle;
|
||||
private final InputStream inputStream;
|
||||
private final String file;
|
||||
private final String fileTitle;
|
||||
|
||||
public SWFSourceInfo(InputStream inputStream, String file, String fileTitle) {
|
||||
this.inputStream = inputStream;
|
||||
|
||||
@@ -34,8 +34,8 @@ import java.util.zip.ZipInputStream;
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class ZippedSWFBundle implements SWFBundle {
|
||||
protected Set<String> keySet=new HashSet<String>();
|
||||
private Map<String,SWF> cachedSWFs=new HashMap<>();
|
||||
protected Set<String> keySet=new HashSet<>();
|
||||
private final Map<String,SWF> cachedSWFs=new HashMap<>();
|
||||
protected ReReadableInputStream is;
|
||||
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ABC {
|
||||
public static final int MINORwithDECIMAL = 17;
|
||||
protected HashSet<EventListener> listeners = new HashSet<>();
|
||||
private static final Logger logger = Logger.getLogger(ABC.class.getName());
|
||||
private AVM2Deobfuscation deobfuscation;
|
||||
private final AVM2Deobfuscation deobfuscation;
|
||||
public SWF swf;
|
||||
|
||||
public int addMethodBody(MethodBody body) {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ABCInputStream extends InputStream {
|
||||
|
||||
private static final int CLASS_PROTECTED_NS = 8;
|
||||
private static final int ATTR_METADATA = 4;
|
||||
private InputStream is;
|
||||
private final InputStream is;
|
||||
private long bytesRead = 0;
|
||||
private ByteArrayOutputStream bufferOs = null;
|
||||
public static final boolean DEBUG_READ = false;
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.io.OutputStream;
|
||||
|
||||
public class ABCOutputStream extends OutputStream {
|
||||
|
||||
private OutputStream os;
|
||||
private final OutputStream os;
|
||||
|
||||
public ABCOutputStream(OutputStream os) {
|
||||
this.os = os;
|
||||
|
||||
@@ -22,11 +22,11 @@ import java.io.OutputStream;
|
||||
|
||||
public class CopyOutputStream extends OutputStream {
|
||||
|
||||
private OutputStream os;
|
||||
private InputStream is;
|
||||
private final OutputStream os;
|
||||
private final InputStream is;
|
||||
private long pos = 0;
|
||||
private int TEMPSIZE = 5;
|
||||
private int[] temp = new int[TEMPSIZE];
|
||||
private final int TEMPSIZE = 5;
|
||||
private final int[] temp = new int[TEMPSIZE];
|
||||
private int tempPos = 0;
|
||||
public int ignoreFirst = 0;
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ScriptPack implements TreeElementItem {
|
||||
public ABC abc;
|
||||
public int scriptIndex;
|
||||
public List<Integer> traitIndices;
|
||||
private ClassPath path;
|
||||
private final ClassPath path;
|
||||
|
||||
@Override
|
||||
public SWF getSwf() {
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.regex.Pattern;
|
||||
*/
|
||||
public class AVM2Deobfuscation {
|
||||
|
||||
private static Random rnd = new Random();
|
||||
private static final Random rnd = new Random();
|
||||
private static final int DEFAULT_FOO_SIZE = 10;
|
||||
|
||||
public static final String[] reservedWords = {
|
||||
@@ -45,8 +45,8 @@ public class AVM2Deobfuscation {
|
||||
public static final String FOO_CHARACTERS = "bcdfghjklmnpqrstvwz";
|
||||
public static final String FOO_JOIN_CHARACTERS = "aeiouy";
|
||||
|
||||
private ConstantPool constants;
|
||||
private Map<String, Integer> usageTypesCount = new HashMap<>();
|
||||
private final ConstantPool constants;
|
||||
private final Map<String, Integer> usageTypesCount = new HashMap<>();
|
||||
|
||||
public AVM2Deobfuscation(ConstantPool constants) {
|
||||
this.constants = constants;
|
||||
|
||||
@@ -79,9 +79,9 @@ import java.util.Stack;
|
||||
*/
|
||||
public class AVM2Graph extends Graph {
|
||||
|
||||
private AVM2Code avm2code;
|
||||
private ABC abc;
|
||||
private MethodBody body;
|
||||
private final AVM2Code avm2code;
|
||||
private final ABC abc;
|
||||
private final MethodBody body;
|
||||
|
||||
public AVM2Code getCode() {
|
||||
return avm2code;
|
||||
|
||||
@@ -37,7 +37,7 @@ import java.util.Stack;
|
||||
*/
|
||||
public class AVM2GraphSource extends GraphSource {
|
||||
|
||||
private AVM2Code code;
|
||||
private final AVM2Code code;
|
||||
boolean isStatic;
|
||||
int classIndex;
|
||||
int scriptIndex;
|
||||
|
||||
@@ -27,8 +27,8 @@ import com.jpexs.decompiler.graph.model.LocalData;
|
||||
*/
|
||||
public class AlchemyLoadAVM2Item extends AVM2Item {
|
||||
|
||||
private String name;
|
||||
private GraphTargetItem ofs;
|
||||
private final String name;
|
||||
private final GraphTargetItem ofs;
|
||||
|
||||
public AlchemyLoadAVM2Item(GraphSourceItem instruction, GraphTargetItem ofs, String name) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.jpexs.decompiler.graph.model.LocalData;
|
||||
*/
|
||||
public class AlchemySignExtendAVM2Item extends AVM2Item {
|
||||
|
||||
private String name;
|
||||
private final String name;
|
||||
|
||||
public AlchemySignExtendAVM2Item(GraphSourceItem instruction, GraphTargetItem value, String name) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
|
||||
@@ -27,8 +27,8 @@ import com.jpexs.decompiler.graph.model.LocalData;
|
||||
*/
|
||||
public class AlchemyStoreAVM2Item extends AVM2Item {
|
||||
|
||||
private String name;
|
||||
private GraphTargetItem ofs;
|
||||
private final String name;
|
||||
private final GraphTargetItem ofs;
|
||||
|
||||
public AlchemyStoreAVM2Item(GraphSourceItem instruction, GraphTargetItem value, GraphTargetItem ofs, String name) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.jpexs.decompiler.graph.model.LocalData;
|
||||
*/
|
||||
public class DefaultXMLNamespace extends AVM2Item {
|
||||
|
||||
private GraphTargetItem ns;
|
||||
private final GraphTargetItem ns;
|
||||
|
||||
public DefaultXMLNamespace(AVM2Instruction instruction, GraphTargetItem ns) {
|
||||
super(instruction, NOPRECEDENCE);
|
||||
|
||||
@@ -28,7 +28,7 @@ public class LocalRegAVM2Item extends AVM2Item {
|
||||
|
||||
public int regIndex;
|
||||
public GraphTargetItem computedValue;
|
||||
private Object computedResult;
|
||||
private final Object computedResult;
|
||||
private boolean isCT = false;
|
||||
|
||||
public LocalRegAVM2Item(AVM2Instruction instruction, int regIndex, GraphTargetItem computedValue) {
|
||||
|
||||
@@ -2589,7 +2589,7 @@ public final class Flasm3Lexer {
|
||||
|
||||
|
||||
|
||||
private Stack<ParsedSymbol> pushedBack=new Stack<>();
|
||||
private final Stack<ParsedSymbol> pushedBack=new Stack<>();
|
||||
|
||||
|
||||
public void pushback(ParsedSymbol symb) {
|
||||
|
||||
@@ -34,10 +34,10 @@ import java.util.regex.Pattern;
|
||||
*/
|
||||
public class ActionDeobfuscation {
|
||||
|
||||
private Random rnd = new Random();
|
||||
private final Random rnd = new Random();
|
||||
private final int DEFAULT_FOO_SIZE = 10;
|
||||
public HashSet<String> allVariableNamesStr = new HashSet<>();
|
||||
private HashMap<String, Integer> typeCounts = new HashMap<>();
|
||||
private final HashMap<String, Integer> typeCounts = new HashMap<>();
|
||||
|
||||
public static final String[] reservedWords = {
|
||||
"as", "break", "case", "catch", "class", "const", "continue", "default", "delete", "do", "each", "else",
|
||||
|
||||
@@ -35,11 +35,11 @@ import java.util.logging.Logger;
|
||||
*/
|
||||
public class ActionGraphSource extends GraphSource {
|
||||
|
||||
private List<Action> actions;
|
||||
private final List<Action> actions;
|
||||
public int version;
|
||||
private HashMap<Integer, String> registerNames;
|
||||
private HashMap<String, GraphTargetItem> variables;
|
||||
private HashMap<String, GraphTargetItem> functions;
|
||||
private final HashMap<Integer, String> registerNames;
|
||||
private final HashMap<String, GraphTargetItem> variables;
|
||||
private final HashMap<String, GraphTargetItem> functions;
|
||||
|
||||
public List<Action> getActions() {
|
||||
return actions;
|
||||
|
||||
@@ -25,8 +25,8 @@ import com.jpexs.decompiler.graph.model.LocalData;
|
||||
*/
|
||||
public class DefineRegisterActionItem extends ActionItem {
|
||||
|
||||
private String identifier;
|
||||
private int register;
|
||||
private final String identifier;
|
||||
private final int register;
|
||||
|
||||
public DefineRegisterActionItem(String identifier, int register) {
|
||||
super(null, PRECEDENCE_PRIMARY);
|
||||
|
||||
@@ -31,7 +31,7 @@ import java.util.List;
|
||||
*/
|
||||
public class FSCommandActionItem extends ActionItem {
|
||||
|
||||
private String command;
|
||||
private final String command;
|
||||
|
||||
public FSCommandActionItem(GraphSourceItem instruction, String command) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
|
||||
@@ -32,9 +32,9 @@ import java.util.List;
|
||||
*/
|
||||
public class LoadMovieActionItem extends ActionItem {
|
||||
|
||||
private GraphTargetItem urlString;
|
||||
private GraphTargetItem targetString;
|
||||
private int method;
|
||||
private final GraphTargetItem urlString;
|
||||
private final GraphTargetItem targetString;
|
||||
private final int method;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
|
||||
@@ -34,9 +34,9 @@ import java.util.List;
|
||||
*/
|
||||
public class LoadMovieNumActionItem extends ActionItem {
|
||||
|
||||
private GraphTargetItem urlString;
|
||||
private GraphTargetItem num;
|
||||
private int method;
|
||||
private final GraphTargetItem urlString;
|
||||
private final GraphTargetItem num;
|
||||
private final int method;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
|
||||
@@ -32,9 +32,9 @@ import java.util.List;
|
||||
*/
|
||||
public class LoadVariablesActionItem extends ActionItem {
|
||||
|
||||
private GraphTargetItem urlString;
|
||||
private GraphTargetItem targetString;
|
||||
private int method;
|
||||
private final GraphTargetItem urlString;
|
||||
private final GraphTargetItem targetString;
|
||||
private final int method;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
|
||||
@@ -34,9 +34,9 @@ import java.util.List;
|
||||
*/
|
||||
public class LoadVariablesNumActionItem extends ActionItem {
|
||||
|
||||
private GraphTargetItem urlString;
|
||||
private GraphTargetItem num;
|
||||
private int method;
|
||||
private final GraphTargetItem urlString;
|
||||
private final GraphTargetItem num;
|
||||
private final int method;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
|
||||
@@ -34,8 +34,8 @@ import java.util.List;
|
||||
*/
|
||||
public class PrintActionItem extends ActionItem {
|
||||
|
||||
private GraphTargetItem target;
|
||||
private GraphTargetItem boundingBox;
|
||||
private final GraphTargetItem target;
|
||||
private final GraphTargetItem boundingBox;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
|
||||
@@ -34,8 +34,8 @@ import java.util.List;
|
||||
*/
|
||||
public class PrintAsBitmapActionItem extends ActionItem {
|
||||
|
||||
private GraphTargetItem target;
|
||||
private GraphTargetItem boundingBox;
|
||||
private final GraphTargetItem target;
|
||||
private final GraphTargetItem boundingBox;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
|
||||
@@ -34,8 +34,8 @@ import java.util.List;
|
||||
*/
|
||||
public class PrintAsBitmapNumActionItem extends ActionItem {
|
||||
|
||||
private GraphTargetItem num;
|
||||
private GraphTargetItem boundingBox;
|
||||
private final GraphTargetItem num;
|
||||
private final GraphTargetItem boundingBox;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
|
||||
@@ -34,8 +34,8 @@ import java.util.List;
|
||||
*/
|
||||
public class PrintNumActionItem extends ActionItem {
|
||||
|
||||
private GraphTargetItem num;
|
||||
private GraphTargetItem boundingBox;
|
||||
private final GraphTargetItem num;
|
||||
private final GraphTargetItem boundingBox;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.List;
|
||||
*/
|
||||
public class TemporaryRegister extends GraphTargetItem {
|
||||
|
||||
private int regId;
|
||||
private final int regId;
|
||||
|
||||
public TemporaryRegister(int regId, GraphTargetItem value) {
|
||||
super(value.src, value.getPrecedence());
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.util.List;
|
||||
*/
|
||||
public class UnLoadMovieActionItem extends ActionItem {
|
||||
|
||||
private GraphTargetItem targetString;
|
||||
private final GraphTargetItem targetString;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.List;
|
||||
*/
|
||||
public class UnLoadMovieNumActionItem extends ActionItem {
|
||||
|
||||
private GraphTargetItem num;
|
||||
private final GraphTargetItem num;
|
||||
|
||||
@Override
|
||||
public List<GraphTargetItem> getAllSubItems() {
|
||||
|
||||
+2
-2
@@ -36,8 +36,8 @@ import java.util.List;
|
||||
*/
|
||||
public class IfFrameLoadedActionItem extends ActionItem implements Block {
|
||||
|
||||
private List<GraphTargetItem> actions;
|
||||
private GraphTargetItem frame;
|
||||
private final List<GraphTargetItem> actions;
|
||||
private final GraphTargetItem frame;
|
||||
|
||||
public IfFrameLoadedActionItem(GraphTargetItem frame, List<GraphTargetItem> actions, GraphSourceItem instruction) {
|
||||
super(instruction, NOPRECEDENCE);
|
||||
|
||||
@@ -1045,12 +1045,12 @@ public final class ActionScriptLexer {
|
||||
public int yychar() {
|
||||
return yychar;
|
||||
}
|
||||
private Stack<ParsedSymbol> pushedBack = new Stack<>();
|
||||
private final Stack<ParsedSymbol> pushedBack = new Stack<>();
|
||||
|
||||
public int yyline() {
|
||||
return yyline + 1;
|
||||
}
|
||||
private List<LexListener> listeners = new ArrayList<>();
|
||||
private final List<LexListener> listeners = new ArrayList<>();
|
||||
|
||||
public void addListener(LexListener listener) {
|
||||
listeners.add(listener);
|
||||
|
||||
@@ -148,7 +148,7 @@ public class ActionScriptParser {
|
||||
public static final int REGISTER_PARENT = 5;
|
||||
public static final int REGISTER_GLOBAL = 6;
|
||||
private long uniqLast = 0;
|
||||
private boolean debugMode = false;
|
||||
private final boolean debugMode = false;
|
||||
|
||||
private String uniqId() {
|
||||
uniqLast++;
|
||||
|
||||
+1
-1
@@ -591,7 +591,7 @@ public class ActionSourceGenerator implements SourceGenerator {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
private List<String> constantPool;
|
||||
private final List<String> constantPool;
|
||||
|
||||
public ActionSourceGenerator(List<String> constantPool) {
|
||||
this.constantPool = constantPool;
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.List;
|
||||
*/
|
||||
public class LexBufferer implements LexListener {
|
||||
|
||||
private List<ParsedSymbol> items = new ArrayList<>();
|
||||
private final List<ParsedSymbol> items = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void onLex(ParsedSymbol s) {
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ActionTry extends Action implements GraphSourceItemContainer {
|
||||
long trySize;
|
||||
long catchSize;
|
||||
long finallySize;
|
||||
private int version;
|
||||
private final int version;
|
||||
|
||||
public ActionTry(boolean catchInRegisterFlag, boolean finallyBlockFlag, boolean catchBlockFlag, String catchName, int catchRegister, long trySize, long catchSize, long finallySize, int version) {
|
||||
super(0x8F, 0);
|
||||
|
||||
@@ -22,7 +22,7 @@ package com.jpexs.decompiler.flash.configuration;
|
||||
*/
|
||||
public class ConfigurationItem<T> {
|
||||
|
||||
private String name;
|
||||
private final String name;
|
||||
protected boolean hasValue;
|
||||
|
||||
private T value;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class CommandLineArgumentParser {
|
||||
private static boolean commandLineMode = false;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static ConfigurationItem<Boolean>[] commandlineConfigBoolean = new ConfigurationItem[]{
|
||||
private static final ConfigurationItem<Boolean>[] commandlineConfigBoolean = new ConfigurationItem[]{
|
||||
Configuration.decompile,
|
||||
Configuration.parallelSpeedUp,
|
||||
Configuration.internalFlashViewer,
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.List;
|
||||
*/
|
||||
public class FLVOutputStream extends OutputStream {
|
||||
|
||||
private OutputStream os;
|
||||
private final OutputStream os;
|
||||
private int bitPos = 0;
|
||||
private int tempByte = 0;
|
||||
private long pos = 0;
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.pushingpixels.flamingo.api.ribbon.JRibbonFrame;
|
||||
*/
|
||||
public abstract class AppRibbonFrame extends JRibbonFrame {
|
||||
|
||||
private ResourceBundle resourceBundle;
|
||||
private final ResourceBundle resourceBundle;
|
||||
|
||||
public AppRibbonFrame() {
|
||||
if (getClass().equals(MainFrameRibbon.class)) {
|
||||
|
||||
@@ -58,11 +58,11 @@ public class ErrorLogFrame extends AppFrame {
|
||||
|
||||
private static ErrorLogFrame instance;
|
||||
|
||||
private JPanel logView = new JPanel();
|
||||
private final JPanel logView = new JPanel();
|
||||
private JPanel logViewInner = new JPanel();
|
||||
private Handler handler;
|
||||
private ImageIcon expandIcon;
|
||||
private ImageIcon collapseIcon;
|
||||
private final Handler handler;
|
||||
private final ImageIcon expandIcon;
|
||||
private final ImageIcon collapseIcon;
|
||||
private ErrorState errorState = ErrorState.NO_ERROR;
|
||||
|
||||
public Handler getHandler() {
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ExportDialog extends AppDialog {
|
||||
public static final int OPTION_MOVIES = 3;
|
||||
public static final int OPTION_SOUNDS = 4;
|
||||
public static final int OPTION_ACTIONSCRIPT = 5;
|
||||
private JComboBox[] combos;
|
||||
private final JComboBox[] combos;
|
||||
|
||||
public int getOption(int index) {
|
||||
return combos[index].getSelectedIndex();
|
||||
|
||||
@@ -53,14 +53,14 @@ public class FontEmbedDialog extends AppDialog implements ActionListener {
|
||||
|
||||
private static final int SAMPLE_MAX_LENGTH = 50;
|
||||
|
||||
private JComboBox<String> sourceFont;
|
||||
private JCheckBox[] rangeCheckboxes;
|
||||
private String rangeNames[];
|
||||
private JLabel[] rangeSamples;
|
||||
private JTextField individualCharsField;
|
||||
private final JComboBox<String> sourceFont;
|
||||
private final JCheckBox[] rangeCheckboxes;
|
||||
private final String rangeNames[];
|
||||
private final JLabel[] rangeSamples;
|
||||
private final JTextField individualCharsField;
|
||||
private boolean result = false;
|
||||
private JLabel individialSample;
|
||||
private int style;
|
||||
private final int style;
|
||||
|
||||
public String getSelectedFont() {
|
||||
return sourceFont.getSelectedItem().toString();
|
||||
|
||||
@@ -36,7 +36,7 @@ import javax.swing.JOptionPane;
|
||||
*/
|
||||
public class FontPanel extends javax.swing.JPanel {
|
||||
|
||||
private MainPanel mainPanel;
|
||||
private final MainPanel mainPanel;
|
||||
private FontTag fontTag;
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,11 +40,11 @@ public class GraphFrame extends AppFrame {
|
||||
private static final int SPACE_BACKLINKS = 5;
|
||||
private static final int BLOCK_WIDTH = 200;
|
||||
private static final int BLOCK_HEIGHT = 20;
|
||||
private HashMap<GraphPart, Point> partPos = new HashMap<>();
|
||||
private Point size;
|
||||
private final HashMap<GraphPart, Point> partPos = new HashMap<>();
|
||||
private final Point size;
|
||||
private int backLinksLeft = 0;
|
||||
private int backLinksRight = 0;
|
||||
private GraphPart head;
|
||||
private final GraphPart head;
|
||||
|
||||
public GraphPanel(Graph graph) throws InterruptedException {
|
||||
graph.init(null);
|
||||
|
||||
@@ -60,11 +60,11 @@ public class LoadFromCacheFrame extends AppFrame implements ActionListener {
|
||||
static final String ACTION_SAVE = "SAVE";
|
||||
static final String ACTION_REFRESH = "REFRESH";
|
||||
|
||||
private JList<CacheEntry> list;
|
||||
private JTextField searchField;
|
||||
private final JList<CacheEntry> list;
|
||||
private final JTextField searchField;
|
||||
private List<CacheImplementation> caches;
|
||||
private List<CacheEntry> entries;
|
||||
private JProgressBar progressBar;
|
||||
private final JProgressBar progressBar;
|
||||
JButton saveButton;
|
||||
JButton refreshButton;
|
||||
JButton openButton;
|
||||
|
||||
@@ -90,13 +90,13 @@ public class LoadFromMemoryFrame extends AppFrame implements ActionListener {
|
||||
private DefaultListModel<com.jpexs.process.Process> model;
|
||||
private DefaultTableModel resTableModel;
|
||||
private final JTable tableRes;
|
||||
private JLabel stateLabel;
|
||||
private final JLabel stateLabel;
|
||||
private boolean processing = false;
|
||||
private JProgressBar progress;
|
||||
private final JProgressBar progress;
|
||||
|
||||
private class SelectProcessWorker extends SwingWorker<List<SwfInMemory>, Object> {
|
||||
|
||||
private List<com.jpexs.process.Process> procs;
|
||||
private final List<com.jpexs.process.Process> procs;
|
||||
|
||||
public SelectProcessWorker(List<com.jpexs.process.Process> procs) {
|
||||
this.procs = procs;
|
||||
|
||||
@@ -36,7 +36,7 @@ import javax.swing.SwingConstants;
|
||||
*/
|
||||
public class LoadingDialog extends AppDialog implements ImageObserver {
|
||||
|
||||
private JLabel detailLabel;
|
||||
private final JLabel detailLabel;
|
||||
private LoadingPanel loadingPanel;
|
||||
JProgressBar progressBar = new JProgressBar(0, 100);
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ import javax.swing.JPanel;
|
||||
public class LoadingPanel extends JPanel {
|
||||
|
||||
private int pos = 0;
|
||||
private Image animationImage;
|
||||
private int iconWidth;
|
||||
private int iconHeight;
|
||||
private final Image animationImage;
|
||||
private final int iconWidth;
|
||||
private final int iconHeight;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@@ -329,7 +329,7 @@ public class Main {
|
||||
|
||||
private static class OpenFileWorker extends SwingWorker {
|
||||
|
||||
private SWFSourceInfo[] sourceInfos;
|
||||
private final SWFSourceInfo[] sourceInfos;
|
||||
|
||||
public OpenFileWorker(SWFSourceInfo sourceInfo) {
|
||||
this.sourceInfos = new SWFSourceInfo[] { sourceInfo };
|
||||
|
||||
@@ -83,7 +83,7 @@ public class MainFrameClassicMenu implements MainFrameMenu, ActionListener {
|
||||
static final String ACTION_REMOVE_NON_SCRIPTS = "REMOVENONSCRIPTS";
|
||||
static final String ACTION_REFRESH_DECOMPILED = "REFRESHDECOMPILED";
|
||||
|
||||
private MainFrameClassic mainFrame;
|
||||
private final MainFrameClassic mainFrame;
|
||||
|
||||
private JCheckBoxMenuItem miAutoDeobfuscation;
|
||||
private JCheckBoxMenuItem miInternalViewer;
|
||||
|
||||
@@ -105,7 +105,7 @@ public class MainFrameRibbonMenu implements MainFrameMenu, ActionListener {
|
||||
static final String ACTION_REFRESH_DECOMPILED = "REFRESHDECOMPILED";
|
||||
static final String ACTION_CLEAR_RECENT_FILES = "CLEARRECENTFILES";
|
||||
|
||||
private MainFrameRibbon mainFrame;
|
||||
private final MainFrameRibbon mainFrame;
|
||||
|
||||
private JCheckBox miAutoDeobfuscation;
|
||||
private JCheckBox miInternalViewer;
|
||||
|
||||
@@ -41,11 +41,11 @@ public class MainFrameStatusPanel extends JPanel implements ActionListener {
|
||||
|
||||
static final String ACTION_SHOW_ERROR_LOG = "SHOWERRORLOG";
|
||||
|
||||
private MainPanel mainPanel;
|
||||
private final MainPanel mainPanel;
|
||||
|
||||
private LoadingPanel loadingPanel = new LoadingPanel(20, 20);
|
||||
private JLabel statusLabel = new JLabel("");
|
||||
private JButton cancelButton = new JButton();
|
||||
private final LoadingPanel loadingPanel = new LoadingPanel(20, 20);
|
||||
private final JLabel statusLabel = new JLabel("");
|
||||
private final JButton cancelButton = new JButton();
|
||||
private JButton errorNotificationButton;
|
||||
|
||||
private Icon currentIcon;
|
||||
|
||||
@@ -189,24 +189,24 @@ import javax.swing.tree.TreeSelectionModel;
|
||||
*/
|
||||
public final class MainPanel extends JPanel implements ActionListener, TreeSelectionListener, Freed {
|
||||
|
||||
private MainFrame mainFrame;
|
||||
private List<SWF> swfs;
|
||||
private final MainFrame mainFrame;
|
||||
private final List<SWF> swfs;
|
||||
private ABCPanel abcPanel;
|
||||
private ActionPanel actionPanel;
|
||||
private JPanel welcomePanel;
|
||||
private MainFrameStatusPanel statusPanel;
|
||||
private MainFrameMenu mainMenu;
|
||||
private FontPanel fontPanel;
|
||||
private JProgressBar progressBar = new JProgressBar(0, 100);
|
||||
private final JPanel welcomePanel;
|
||||
private final MainFrameStatusPanel statusPanel;
|
||||
private final MainFrameMenu mainMenu;
|
||||
private final FontPanel fontPanel;
|
||||
private final JProgressBar progressBar = new JProgressBar(0, 100);
|
||||
private DeobfuscationDialog deobfuscationDialog;
|
||||
public TagTree tagTree;
|
||||
private FlashPlayerPanel flashPanel;
|
||||
private JPanel contentPanel;
|
||||
private JPanel displayPanel;
|
||||
private final FlashPlayerPanel flashPanel;
|
||||
private final JPanel contentPanel;
|
||||
private final JPanel displayPanel;
|
||||
private ImagePanel imagePanel;
|
||||
private BinaryPanel binaryPanel;
|
||||
private ImagePanel previewImagePanel;
|
||||
private SWFPreviwPanel swfPreviewPanel;
|
||||
private final ImagePanel previewImagePanel;
|
||||
private final SWFPreviwPanel swfPreviewPanel;
|
||||
private boolean isWelcomeScreen = true;
|
||||
private static final String CARDFLASHPANEL = "Flash card";
|
||||
private static final String CARDSWFPREVIEWPANEL = "SWF card";
|
||||
@@ -224,26 +224,26 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
private static final String INTERNAL_VIEWER_CARD = "INTERNALVIEWER";
|
||||
private static final String SPLIT_PANE1 = "SPLITPANE1";
|
||||
private static final String WELCOME_PANEL = "WELCOMEPANEL";
|
||||
private LineMarkedEditorPane textValue;
|
||||
private JSplitPane splitPane1;
|
||||
private JSplitPane splitPane2;
|
||||
private final LineMarkedEditorPane textValue;
|
||||
private final JSplitPane splitPane1;
|
||||
private final JSplitPane splitPane2;
|
||||
private boolean splitsInited = false;
|
||||
private JPanel detailPanel;
|
||||
private JTextField filterField = new MyTextField("");
|
||||
private JPanel searchPanel;
|
||||
private JPanel displayWithPreview;
|
||||
private JButton textSaveButton;
|
||||
private JButton textEditButton;
|
||||
private JButton textCancelButton;
|
||||
private JPanel parametersPanel;
|
||||
private final JPanel displayWithPreview;
|
||||
private final JButton textSaveButton;
|
||||
private final JButton textEditButton;
|
||||
private final JButton textCancelButton;
|
||||
private final JPanel parametersPanel;
|
||||
private JSplitPane previewSplitPane;
|
||||
private JButton imageReplaceButton;
|
||||
private JPanel imageButtonsPanel;
|
||||
private JButton binaryReplaceButton;
|
||||
private JPanel binaryButtonsPanel;
|
||||
private PlayerControls flashControls;
|
||||
private ImagePanel internelViewerPanel;
|
||||
private JPanel viewerCards;
|
||||
private final ImagePanel internelViewerPanel;
|
||||
private final JPanel viewerCards;
|
||||
private AbortRetryIgnoreHandler errorHandler = new GuiAbortRetryIgnoreHandler();
|
||||
private CancellableWorker setSourceWorker;
|
||||
public TreeNode oldNode;
|
||||
@@ -541,7 +541,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
@Override
|
||||
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
|
||||
if (flavor.equals(DataFlavor.javaFileListFlavor)) {
|
||||
List<File> files = new ArrayList<>();
|
||||
List<File> files;
|
||||
String tempDir = System.getProperty("java.io.tmpdir");
|
||||
if (!tempDir.endsWith(File.separator)) {
|
||||
tempDir += File.separator;
|
||||
@@ -2152,7 +2152,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
if (tagObj instanceof ScriptPack) {
|
||||
final ScriptPack scriptLeaf = (ScriptPack) tagObj;
|
||||
final List<ABCContainerTag> abcList = scriptLeaf.abc.swf.abcList;
|
||||
if (setSourceWorker != null && !setSourceWorker.isDone()) {
|
||||
if (setSourceWorker != null) {
|
||||
setSourceWorker.cancel(true);
|
||||
setSourceWorker = null;
|
||||
}
|
||||
|
||||
@@ -37,9 +37,9 @@ public class ModeFrame extends AppFrame implements ActionListener {
|
||||
static final String ACTION_PROXY = "PROXY";
|
||||
static final String ACTION_EXIT = "EXIT";
|
||||
|
||||
private JButton openButton = new JButton(translate("button.open"));
|
||||
private JButton proxyButton = new JButton(translate("button.proxy"));
|
||||
private JButton exitButton = new JButton(translate("button.exit"));
|
||||
private final JButton openButton = new JButton(translate("button.open"));
|
||||
private final JButton proxyButton = new JButton(translate("button.proxy"));
|
||||
private final JButton exitButton = new JButton(translate("button.exit"));
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@@ -39,10 +39,10 @@ public class RenameDialog extends AppDialog implements ActionListener {
|
||||
static final String ACTION_OK = "OK";
|
||||
static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
private JRadioButton typeNumberRadioButton = new JRadioButton(translate("rename.type.typenumber"));
|
||||
private JRadioButton randomWordRadioButton = new JRadioButton(translate("rename.type.randomword"));
|
||||
private JButton okButton = new JButton(translate("button.ok"));
|
||||
private JButton cancelButton = new JButton(translate("button.cancel"));
|
||||
private final JRadioButton typeNumberRadioButton = new JRadioButton(translate("rename.type.typenumber"));
|
||||
private final JRadioButton randomWordRadioButton = new JRadioButton(translate("rename.type.randomword"));
|
||||
private final JButton okButton = new JButton(translate("button.ok"));
|
||||
private final JButton cancelButton = new JButton(translate("button.cancel"));
|
||||
private boolean confirmed = false;
|
||||
|
||||
public RenameType getRenameType() {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class SelectLanguageDialog extends AppDialog implements ActionListener {
|
||||
|
||||
JComboBox<Language> languageCombobox = new JComboBox<>();
|
||||
public String languageCode = null;
|
||||
private static String[] languages = new String[]{"en", "cs", "zh", "de", "es", "fr", "hu", "nl", "pt", "ru", "sv", "uk"};
|
||||
private static final String[] languages = new String[]{"en", "cs", "zh", "de", "es", "fr", "hu", "nl", "pt", "ru", "sv", "uk"};
|
||||
|
||||
public SelectLanguageDialog() {
|
||||
setSize(350, 130);
|
||||
|
||||
@@ -38,7 +38,7 @@ public class SwfInMemory {
|
||||
this.process = process;
|
||||
}
|
||||
|
||||
private static ResourceBundle resourceBundle = ResourceBundle.getBundle(AppStrings.getResourcePath(LoadFromMemoryFrame.class));
|
||||
private static final ResourceBundle resourceBundle = ResourceBundle.getBundle(AppStrings.getResourcePath(LoadFromMemoryFrame.class));
|
||||
|
||||
public String translate(String key) {
|
||||
return resourceBundle.getString(key);
|
||||
|
||||
@@ -47,10 +47,10 @@ import javax.swing.tree.TreePath;
|
||||
|
||||
public class TagTreeModel implements TreeModel {
|
||||
|
||||
private TagTreeRoot root = new TagTreeRoot();
|
||||
private List<SWFRoot> swfs;
|
||||
private Map<SWF, SWFRoot> swfToSwfRoot;
|
||||
private MainFrame mainFrame;
|
||||
private final TagTreeRoot root = new TagTreeRoot();
|
||||
private final List<SWFRoot> swfs;
|
||||
private final Map<SWF, SWFRoot> swfToSwfRoot;
|
||||
private final MainFrame mainFrame;
|
||||
|
||||
public TagTreeModel(MainFrame mainFrame, List<SWF> swfs) {
|
||||
this.mainFrame = mainFrame;
|
||||
|
||||
@@ -52,7 +52,7 @@ public class ASMSourceEditorPane extends LineMarkedEditorPane implements CaretLi
|
||||
public int bodyIndex = -1;
|
||||
private List<Highlighting> disassembledHilights = new ArrayList<>();
|
||||
private List<Highlighting> specialHilights = new ArrayList<>();
|
||||
private DecompiledEditorPane decompiledEditor;
|
||||
private final DecompiledEditorPane decompiledEditor;
|
||||
private boolean ignoreCarret = false;
|
||||
private String name;
|
||||
private HilightedText textWithHex;
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ClassesListTreeModel implements TreeModel, TreeElementItem {
|
||||
private SWF swf;
|
||||
private Tree classTree;
|
||||
private List<MyEntry<ClassPath, ScriptPack>> list;
|
||||
private List<TreeModelListener> listeners = new ArrayList<>();
|
||||
private final List<TreeModelListener> listeners = new ArrayList<>();
|
||||
|
||||
public List<MyEntry<ClassPath, ScriptPack>> getList() {
|
||||
return list;
|
||||
|
||||
@@ -24,7 +24,7 @@ import javax.swing.event.ListDataListener;
|
||||
|
||||
public class ConstantsListModel implements ListModel {
|
||||
|
||||
private ConstantPool constants;
|
||||
private final ConstantPool constants;
|
||||
public static final int TYPE_UINT = 0;
|
||||
public static final int TYPE_INT = 1;
|
||||
public static final int TYPE_DOUBLE = 2;
|
||||
|
||||
@@ -56,10 +56,10 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
|
||||
public int lastTraitIndex = 0;
|
||||
private boolean ignoreCarret = false;
|
||||
private boolean reset = false;
|
||||
private ABCPanel abcPanel;
|
||||
private final ABCPanel abcPanel;
|
||||
private int classIndex = -1;
|
||||
private boolean isStatic = false;
|
||||
private Cache cache = Cache.getInstance(true);
|
||||
private final Cache cache = Cache.getInstance(true);
|
||||
private Trait currentTrait = null;
|
||||
|
||||
public Trait getCurrentTrait() {
|
||||
|
||||
@@ -48,17 +48,17 @@ public class DetailPanel extends JPanel implements ActionListener {
|
||||
public static final String METHOD_TRAIT_CARD = AppStrings.translate("abc.detail.methodtrait");
|
||||
public static final String UNSUPPORTED_TRAIT_CARD = AppStrings.translate("abc.detail.unsupported");
|
||||
public static final String SLOT_CONST_TRAIT_CARD = AppStrings.translate("abc.detail.slotconsttrait");
|
||||
private JPanel innerPanel;
|
||||
private final JPanel innerPanel;
|
||||
public JButton saveButton = new JButton(AppStrings.translate("button.save"), View.getIcon("save16"));
|
||||
public JButton editButton = new JButton(AppStrings.translate("button.edit"), View.getIcon("edit16"));
|
||||
public JButton cancelButton = new JButton(AppStrings.translate("button.cancel"), View.getIcon("cancel16"));
|
||||
private HashMap<String, JComponent> cardMap = new HashMap<>();
|
||||
private final HashMap<String, JComponent> cardMap = new HashMap<>();
|
||||
private String selectedCard;
|
||||
private JLabel selectedLabel;
|
||||
private final JLabel selectedLabel;
|
||||
private boolean editMode = false;
|
||||
private JPanel buttonsPanel;
|
||||
private ABCPanel abcPanel;
|
||||
private JLabel traitNameLabel;
|
||||
private final JPanel buttonsPanel;
|
||||
private final ABCPanel abcPanel;
|
||||
private final JLabel traitNameLabel;
|
||||
|
||||
public DetailPanel(ABCPanel abcPanel) {
|
||||
this.abcPanel = abcPanel;
|
||||
|
||||
@@ -22,9 +22,9 @@ import javax.swing.*;
|
||||
|
||||
public class IconListRenderer extends DefaultListCellRenderer {
|
||||
|
||||
private Icon constIcon;
|
||||
private Icon functionIcon;
|
||||
private Icon variableIcon;
|
||||
private final Icon constIcon;
|
||||
private final Icon functionIcon;
|
||||
private final Icon variableIcon;
|
||||
|
||||
private Icon loadIcon(String path) {
|
||||
ClassLoader cldr = this.getClass().getClassLoader();
|
||||
|
||||
@@ -45,10 +45,10 @@ public class MethodCodePanel extends JPanel implements ActionListener {
|
||||
static final String ACTION_HEX = "HEX";
|
||||
static final String ACTION_HEX_ONLY = "HEXONLY";
|
||||
|
||||
private ASMSourceEditorPane sourceTextArea;
|
||||
private final ASMSourceEditorPane sourceTextArea;
|
||||
public JPanel buttonsPanel;
|
||||
private JToggleButton hexButton;
|
||||
private JToggleButton hexOnlyButton;
|
||||
private final JToggleButton hexButton;
|
||||
private final JToggleButton hexOnlyButton;
|
||||
|
||||
public void focusEditor() {
|
||||
sourceTextArea.requestFocusInWindow();
|
||||
|
||||
@@ -46,7 +46,7 @@ public class NewTraitDialog extends AppDialog implements ActionListener {
|
||||
static final String ACTION_OK = "OK";
|
||||
static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
private static int modifiers[] = new int[]{
|
||||
private static final int modifiers[] = new int[]{
|
||||
Namespace.KIND_PACKAGE,
|
||||
Namespace.KIND_PRIVATE,
|
||||
Namespace.KIND_PROTECTED,
|
||||
@@ -55,17 +55,17 @@ public class NewTraitDialog extends AppDialog implements ActionListener {
|
||||
Namespace.KIND_EXPLICIT,
|
||||
Namespace.KIND_STATIC_PROTECTED
|
||||
};
|
||||
private static int types[] = new int[]{
|
||||
private static final int types[] = new int[]{
|
||||
Trait.TRAIT_METHOD,
|
||||
Trait.TRAIT_GETTER,
|
||||
Trait.TRAIT_SETTER,
|
||||
Trait.TRAIT_CONST,
|
||||
Trait.TRAIT_SLOT
|
||||
};
|
||||
private JComboBox<String> accessComboBox;
|
||||
private JComboBox<String> typeComboBox;
|
||||
private JCheckBox staticCheckbox;
|
||||
private JTextField nameField;
|
||||
private final JComboBox<String> accessComboBox;
|
||||
private final JComboBox<String> typeComboBox;
|
||||
private final JCheckBox staticCheckbox;
|
||||
private final JTextField nameField;
|
||||
|
||||
public boolean getStatic() {
|
||||
return staticCheckbox.isSelected();
|
||||
|
||||
@@ -33,7 +33,7 @@ public class TraitsList extends JList<Object> implements ListSelectionListener {
|
||||
ABC abc;
|
||||
List<ABCContainerTag> abcTags;
|
||||
int classIndex = -1;
|
||||
private ABCPanel abcPanel;
|
||||
private final ABCPanel abcPanel;
|
||||
private boolean sorted = false;
|
||||
|
||||
public void setSorted(boolean sorted) {
|
||||
|
||||
@@ -36,13 +36,13 @@ import java.util.logging.Logger;
|
||||
*/
|
||||
public class TraitsListItem {
|
||||
|
||||
private Type type;
|
||||
private boolean isStatic;
|
||||
private List<ABCContainerTag> abcTags;
|
||||
private ABC abc;
|
||||
private int classIndex;
|
||||
private int index;
|
||||
private int scriptIndex;
|
||||
private final Type type;
|
||||
private final boolean isStatic;
|
||||
private final List<ABCContainerTag> abcTags;
|
||||
private final ABC abc;
|
||||
private final int classIndex;
|
||||
private final int index;
|
||||
private final int scriptIndex;
|
||||
public String STR_INSTANCE_INITIALIZER = AppStrings.translate("abc.traitslist.instanceinitializer");
|
||||
public String STR_CLASS_INITIALIZER = AppStrings.translate("abc.traitslist.classinitializer");
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@ import javax.swing.event.ListDataListener;
|
||||
public final class TraitsListModel implements ListModel<Object> {
|
||||
|
||||
private List<TraitsListItem> items;
|
||||
private List<ABCContainerTag> abcTags;
|
||||
private ABC abc;
|
||||
private int classIndex;
|
||||
private int scriptIndex;
|
||||
private final List<ABCContainerTag> abcTags;
|
||||
private final ABC abc;
|
||||
private final int classIndex;
|
||||
private final int scriptIndex;
|
||||
|
||||
public void setSorted(boolean sorted) {
|
||||
if (sorted) {
|
||||
|
||||
@@ -44,12 +44,12 @@ public class UsageFrame extends AppFrame implements ActionListener, MouseListene
|
||||
static final String ACTION_GOTO = "GOTO";
|
||||
static final String ACTION_CANCEL = "CANCEL";
|
||||
|
||||
private JButton gotoButton = new JButton(translate("button.goto"));
|
||||
private JButton cancelButton = new JButton(translate("button.cancel"));
|
||||
private JList usageList;
|
||||
private UsageListModel usageListModel;
|
||||
private ABC abc;
|
||||
private ABCPanel abcPanel;
|
||||
private final JButton gotoButton = new JButton(translate("button.goto"));
|
||||
private final JButton cancelButton = new JButton(translate("button.cancel"));
|
||||
private final JList usageList;
|
||||
private final UsageListModel usageListModel;
|
||||
private final ABC abc;
|
||||
private final ABCPanel abcPanel;
|
||||
|
||||
public UsageFrame(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, ABCPanel abcPanel) {
|
||||
this.abcPanel = abcPanel;
|
||||
|
||||
@@ -30,8 +30,8 @@ import javax.swing.DefaultListModel;
|
||||
*/
|
||||
public class UsageListModel extends DefaultListModel<Object> {
|
||||
|
||||
private ABC abc;
|
||||
private List<ABCContainerTag> abcTags;
|
||||
private final ABC abc;
|
||||
private final List<ABCContainerTag> abcTags;
|
||||
|
||||
public UsageListModel(List<ABCContainerTag> abcTags, ABC abc) {
|
||||
this.abc = abc;
|
||||
|
||||
@@ -22,7 +22,7 @@ import javax.swing.table.TableModel;
|
||||
|
||||
public class DecimalTableModel implements TableModel {
|
||||
|
||||
private ABC abc;
|
||||
private final ABC abc;
|
||||
private static final String[] columnNames = new String[]{"Index", "Value"};
|
||||
private static final Class[] classes = new Class[]{Long.class, String.class};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import javax.swing.table.TableModel;
|
||||
|
||||
public class DoubleTableModel implements TableModel {
|
||||
|
||||
private ABC abc;
|
||||
private final ABC abc;
|
||||
private static final String[] columnNames = new String[]{"Index", "Value"};
|
||||
private static final Class[] classes = new Class[]{Long.class, String.class};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import javax.swing.table.TableModel;
|
||||
|
||||
public class IntTableModel implements TableModel {
|
||||
|
||||
private ABC abc;
|
||||
private final ABC abc;
|
||||
private static final String[] columnNames = new String[]{"Index", "Value"};
|
||||
private static final Class[] classes = new Class[]{Long.class, Long.class};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import javax.swing.table.TableModel;
|
||||
|
||||
public class MultinameTableModel implements TableModel {
|
||||
|
||||
private ABC abc;
|
||||
private final ABC abc;
|
||||
private static final String[] columnNames = new String[]{"Index", "Kind", "Name", "Namespace", "NamespaceSet"};
|
||||
private static final Class[] classes = new Class[]{Long.class, String.class, String.class, String.class, String.class};
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import javax.swing.table.TableModel;
|
||||
|
||||
public class NamespaceSetTableModel implements TableModel {
|
||||
|
||||
private ABC abc;
|
||||
private final ABC abc;
|
||||
private static final String[] columnNames = new String[]{"Index", "NameSpaces"};
|
||||
private static final Class[] classes = new Class[]{Long.class, String.class, String.class};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import javax.swing.table.TableModel;
|
||||
|
||||
public class NamespaceTableModel implements TableModel {
|
||||
|
||||
private ABC abc;
|
||||
private final ABC abc;
|
||||
private static final String[] columnNames = new String[]{"Index", "Kind", "Name"};
|
||||
private static final Class[] classes = new Class[]{Long.class, String.class, String.class};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import javax.swing.table.TableModel;
|
||||
|
||||
public class StringTableModel implements TableModel {
|
||||
|
||||
private ABC abc;
|
||||
private final ABC abc;
|
||||
private static final String[] columnNames = new String[]{"Index", "Value"};
|
||||
private static final Class[] classes = new Class[]{Long.class, String.class};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import javax.swing.table.TableModel;
|
||||
|
||||
public class UIntTableModel implements TableModel {
|
||||
|
||||
private ABC abc;
|
||||
private final ABC abc;
|
||||
private static final String[] columnNames = new String[]{"Index", "Value"};
|
||||
private static final Class[] classes = new Class[]{Long.class, Long.class};
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@ import javax.swing.tree.TreePath;
|
||||
|
||||
public abstract class TreeElement extends TreeNode {
|
||||
|
||||
private SortedMap<String, TreeElement> branches;
|
||||
private SortedMap<String, TreeElement> leafs;
|
||||
private String name;
|
||||
private String path;
|
||||
private TreeElement parent;
|
||||
private final SortedMap<String, TreeElement> branches;
|
||||
private final SortedMap<String, TreeElement> leafs;
|
||||
private final String name;
|
||||
private final String path;
|
||||
private final TreeElement parent;
|
||||
|
||||
public TreeElement(String name, String path, TreeElementItem item, TreeElement parent) {
|
||||
super(item);
|
||||
|
||||
@@ -47,8 +47,8 @@ public class FlashPlayerPanel extends Panel implements FlashDisplay {
|
||||
private boolean executed = false;
|
||||
private String flash;
|
||||
private HANDLE pipe;
|
||||
private static List<HANDLE> processes = new ArrayList<>();
|
||||
private static List<HANDLE> pipes = new ArrayList<>();
|
||||
private static final List<HANDLE> processes = new ArrayList<>();
|
||||
private static final List<HANDLE> pipes = new ArrayList<>();
|
||||
private Component frame;
|
||||
private boolean stopped = true;
|
||||
private static final int CMD_PLAY = 1;
|
||||
|
||||
@@ -44,13 +44,13 @@ public class PlayerControls extends JPanel implements ActionListener {
|
||||
static final String ACTION_PAUSE = "PAUSE";
|
||||
static final String ACTION_STOP = "STOP";
|
||||
|
||||
private JButton pauseButton;
|
||||
private final JButton pauseButton;
|
||||
private boolean paused = false;
|
||||
private FlashDisplay display;
|
||||
private final FlashDisplay display;
|
||||
private JProgressBar progress;
|
||||
private Timer timer;
|
||||
private JLabel timeLabel;
|
||||
private JLabel totalTimeLabel;
|
||||
private final Timer timer;
|
||||
private final JLabel timeLabel;
|
||||
private final JLabel totalTimeLabel;
|
||||
private static final Icon pauseIcon = View.getIcon("pause16");
|
||||
private static final Icon playIcon = View.getIcon("play16");
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ import javax.swing.event.ListDataListener;
|
||||
*/
|
||||
public class SWFListModel implements ListModel<Replacement> {
|
||||
|
||||
private List<ListDataListener> listeners = new ArrayList<>();
|
||||
private List<Replacement> replacements;
|
||||
private final List<ListDataListener> listeners = new ArrayList<>();
|
||||
private final List<Replacement> replacements;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.List;
|
||||
*/
|
||||
public class SWFRoot extends TreeNode {
|
||||
|
||||
private String name;
|
||||
private final String name;
|
||||
public List<TreeNode> list;
|
||||
public TreeNode scriptsNode;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user