decompiler: cleanup - marked const fields final
This commit is contained in:
@@ -141,7 +141,7 @@ public class ExprProcessor implements CodeConstants {
|
||||
|
||||
private static final String[] typeNames = new String[]{"byte", "char", "double", "float", "int", "long", "short", "boolean",};
|
||||
|
||||
private VarProcessor varProcessor = (VarProcessor)DecompilerContext.getProperty(DecompilerContext.CURRENT_VAR_PROCESSOR);
|
||||
private final VarProcessor varProcessor = (VarProcessor)DecompilerContext.getProperty(DecompilerContext.CURRENT_VAR_PROCESSOR);
|
||||
|
||||
public void processStatement(RootStatement root, StructClass cl) {
|
||||
|
||||
|
||||
@@ -46,10 +46,10 @@ import java.util.Map.Entry;
|
||||
|
||||
public class FinallyProcessor {
|
||||
|
||||
private Map<Integer, Integer> finallyBlockIDs = new HashMap<Integer, Integer>();
|
||||
private Map<Integer, Integer> catchallBlockIDs = new HashMap<Integer, Integer>();
|
||||
private final Map<Integer, Integer> finallyBlockIDs = new HashMap<Integer, Integer>();
|
||||
private final Map<Integer, Integer> catchallBlockIDs = new HashMap<Integer, Integer>();
|
||||
|
||||
private VarProcessor varprocessor;
|
||||
private final VarProcessor varprocessor;
|
||||
|
||||
public FinallyProcessor(VarProcessor varprocessor) {
|
||||
this.varprocessor = varprocessor;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
|
||||
public class PrimitiveExprsList {
|
||||
|
||||
private List<Exprent> lstExprents = new ArrayList<Exprent>();
|
||||
private final List<Exprent> lstExprents = new ArrayList<Exprent>();
|
||||
|
||||
private ExprentStack stack = new ExprentStack();
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class SimplifyExprentsHelper {
|
||||
|
||||
static MatchEngine class14Builder = new MatchEngine();
|
||||
|
||||
private boolean firstInvocation;
|
||||
private final boolean firstInvocation;
|
||||
|
||||
public SimplifyExprentsHelper(boolean firstInvocation) {
|
||||
this.firstInvocation = firstInvocation;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,9 +23,9 @@ import java.util.List;
|
||||
|
||||
public class DominatorEngine {
|
||||
|
||||
private Statement statement;
|
||||
private final Statement statement;
|
||||
|
||||
private VBStyleCollection<Integer, Integer> colOrderedIDoms = new VBStyleCollection<Integer, Integer>();
|
||||
private final VBStyleCollection<Integer, Integer> colOrderedIDoms = new VBStyleCollection<Integer, Integer>();
|
||||
|
||||
|
||||
public DominatorEngine(Statement statement) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,19 +24,19 @@ import java.util.Map.Entry;
|
||||
|
||||
public class DominatorTreeExceptionFilter {
|
||||
|
||||
private Statement statement;
|
||||
private final Statement statement;
|
||||
|
||||
// idom, nodes
|
||||
private Map<Integer, Set<Integer>> mapTreeBranches = new HashMap<Integer, Set<Integer>>();
|
||||
private final Map<Integer, Set<Integer>> mapTreeBranches = new HashMap<Integer, Set<Integer>>();
|
||||
|
||||
// handler, range nodes
|
||||
private Map<Integer, Set<Integer>> mapExceptionRanges = new HashMap<Integer, Set<Integer>>();
|
||||
private final Map<Integer, Set<Integer>> mapExceptionRanges = new HashMap<Integer, Set<Integer>>();
|
||||
|
||||
// handler, head dom
|
||||
private Map<Integer, Integer> mapExceptionDoms = new HashMap<Integer, Integer>();
|
||||
|
||||
// statement, handler, exit nodes
|
||||
private Map<Integer, Map<Integer, Integer>> mapExceptionRangeUniqueExit = new HashMap<Integer, Map<Integer, Integer>>();
|
||||
private final Map<Integer, Map<Integer, Integer>> mapExceptionRangeUniqueExit = new HashMap<Integer, Map<Integer, Integer>>();
|
||||
|
||||
private DominatorEngine domEngine;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,7 +30,7 @@ public class FastExtendedPostdominanceHelper {
|
||||
|
||||
private HashMap<Integer, FastFixedSet<Integer>> mapSupportPoints = new HashMap<Integer, FastFixedSet<Integer>>();
|
||||
|
||||
private HashMap<Integer, FastFixedSet<Integer>> mapExtPostdominators = new HashMap<Integer, FastFixedSet<Integer>>();
|
||||
private final HashMap<Integer, FastFixedSet<Integer>> mapExtPostdominators = new HashMap<Integer, FastFixedSet<Integer>>();
|
||||
|
||||
private Statement statement;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,9 +22,9 @@ import java.util.Set;
|
||||
|
||||
public class GenericDominatorEngine {
|
||||
|
||||
private IGraph graph;
|
||||
private final IGraph graph;
|
||||
|
||||
private VBStyleCollection<IGraphNode, IGraphNode> colOrderedIDoms = new VBStyleCollection<IGraphNode, IGraphNode>();
|
||||
private final VBStyleCollection<IGraphNode, IGraphNode> colOrderedIDoms = new VBStyleCollection<IGraphNode, IGraphNode>();
|
||||
|
||||
private Set<? extends IGraphNode> setRoots;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import java.util.Set;
|
||||
public class NewExprent extends Exprent {
|
||||
|
||||
private InvocationExprent constructor;
|
||||
private VarType newType;
|
||||
private final VarType newType;
|
||||
private List<Exprent> lstDims = new ArrayList<Exprent>();
|
||||
private List<Exprent> lstArrayElements = new ArrayList<Exprent>();
|
||||
private boolean directArrayInit;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,19 +26,19 @@ import java.util.Map.Entry;
|
||||
public class FlattenStatementsHelper {
|
||||
|
||||
// statement.id, node.id(direct), node.id(continue)
|
||||
private Map<Integer, String[]> mapDestinationNodes = new HashMap<Integer, String[]>();
|
||||
private final Map<Integer, String[]> mapDestinationNodes = new HashMap<Integer, String[]>();
|
||||
|
||||
// node.id(source), statement.id(destination), edge type
|
||||
private List<Edge> listEdges = new ArrayList<Edge>();
|
||||
private final List<Edge> listEdges = new ArrayList<Edge>();
|
||||
|
||||
// node.id(exit), [node.id(source), statement.id(destination)]
|
||||
private Map<String, List<String[]>> mapShortRangeFinallyPathIds = new HashMap<String, List<String[]>>();
|
||||
private final Map<String, List<String[]>> mapShortRangeFinallyPathIds = new HashMap<String, List<String[]>>();
|
||||
|
||||
// node.id(exit), [node.id(source), statement.id(destination)]
|
||||
private Map<String, List<String[]>> mapLongRangeFinallyPathIds = new HashMap<String, List<String[]>>();
|
||||
private final Map<String, List<String[]>> mapLongRangeFinallyPathIds = new HashMap<String, List<String[]>>();
|
||||
|
||||
// positive if branches
|
||||
private Map<String, Integer> mapPosIfBranch = new HashMap<String, Integer>();
|
||||
private final Map<String, Integer> mapPosIfBranch = new HashMap<String, Integer>();
|
||||
|
||||
private DirectGraph graph;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,24 +42,24 @@ import java.util.Map.Entry;
|
||||
public class SSAConstructorSparseEx {
|
||||
|
||||
// node id, var, version
|
||||
private HashMap<String, SFormsFastMapDirect> inVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
private final HashMap<String, SFormsFastMapDirect> inVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
|
||||
// node id, var, version (direct branch)
|
||||
private HashMap<String, SFormsFastMapDirect> outVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
private final HashMap<String, SFormsFastMapDirect> outVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
|
||||
// node id, var, version (negative branch)
|
||||
private HashMap<String, SFormsFastMapDirect> outNegVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
private final HashMap<String, SFormsFastMapDirect> outNegVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
|
||||
// node id, var, version
|
||||
private HashMap<String, SFormsFastMapDirect> extraVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
private final HashMap<String, SFormsFastMapDirect> extraVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
|
||||
// (var, version), version
|
||||
private HashMap<VarVersionPair, FastSparseSet<Integer>> phi = new HashMap<VarVersionPair, FastSparseSet<Integer>>();
|
||||
private final HashMap<VarVersionPair, FastSparseSet<Integer>> phi = new HashMap<VarVersionPair, FastSparseSet<Integer>>();
|
||||
|
||||
// var, version
|
||||
private HashMap<Integer, Integer> lastversion = new HashMap<Integer, Integer>();
|
||||
private final HashMap<Integer, Integer> lastversion = new HashMap<Integer, Integer>();
|
||||
|
||||
private List<VarVersionPair> startVars = new ArrayList<VarVersionPair>();
|
||||
private final List<VarVersionPair> startVars = new ArrayList<VarVersionPair>();
|
||||
|
||||
// set factory
|
||||
private FastSparseSetFactory<Integer> factory;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,42 +40,42 @@ import java.util.Map.Entry;
|
||||
public class SSAUConstructorSparseEx {
|
||||
|
||||
// node id, var, version
|
||||
private HashMap<String, SFormsFastMapDirect> inVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
private final HashMap<String, SFormsFastMapDirect> inVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
//private HashMap<String, HashMap<Integer, FastSet<Integer>>> inVarVersions = new HashMap<String, HashMap<Integer, FastSet<Integer>>>();
|
||||
|
||||
// node id, var, version (direct branch)
|
||||
private HashMap<String, SFormsFastMapDirect> outVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
private final HashMap<String, SFormsFastMapDirect> outVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
//private HashMap<String, HashMap<Integer, FastSet<Integer>>> outVarVersions = new HashMap<String, HashMap<Integer, FastSet<Integer>>>();
|
||||
|
||||
// node id, var, version (negative branch)
|
||||
private HashMap<String, SFormsFastMapDirect> outNegVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
private final HashMap<String, SFormsFastMapDirect> outNegVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
//private HashMap<String, HashMap<Integer, FastSet<Integer>>> outNegVarVersions = new HashMap<String, HashMap<Integer, FastSet<Integer>>>();
|
||||
|
||||
// node id, var, version
|
||||
private HashMap<String, SFormsFastMapDirect> extraVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
private final HashMap<String, SFormsFastMapDirect> extraVarVersions = new HashMap<String, SFormsFastMapDirect>();
|
||||
//private HashMap<String, HashMap<Integer, FastSet<Integer>>> extraVarVersions = new HashMap<String, HashMap<Integer, FastSet<Integer>>>();
|
||||
|
||||
// (var, version), version
|
||||
private HashMap<VarVersionPair, HashSet<Integer>> phi = new HashMap<VarVersionPair, HashSet<Integer>>();
|
||||
private final HashMap<VarVersionPair, HashSet<Integer>> phi = new HashMap<VarVersionPair, HashSet<Integer>>();
|
||||
|
||||
// var, version
|
||||
private HashMap<Integer, Integer> lastversion = new HashMap<Integer, Integer>();
|
||||
private final HashMap<Integer, Integer> lastversion = new HashMap<Integer, Integer>();
|
||||
|
||||
// version, protected ranges (catch, finally)
|
||||
private HashMap<VarVersionPair, Integer> mapVersionFirstRange = new HashMap<VarVersionPair, Integer>();
|
||||
private final HashMap<VarVersionPair, Integer> mapVersionFirstRange = new HashMap<VarVersionPair, Integer>();
|
||||
|
||||
// version, version
|
||||
private HashMap<VarVersionPair, VarVersionPair> phantomppnodes = new HashMap<VarVersionPair, VarVersionPair>(); // ++ and --
|
||||
private final HashMap<VarVersionPair, VarVersionPair> phantomppnodes = new HashMap<VarVersionPair, VarVersionPair>(); // ++ and --
|
||||
|
||||
// node.id, version, version
|
||||
private HashMap<String, HashMap<VarVersionPair, VarVersionPair>> phantomexitnodes =
|
||||
private final HashMap<String, HashMap<VarVersionPair, VarVersionPair>> phantomexitnodes =
|
||||
new HashMap<String, HashMap<VarVersionPair, VarVersionPair>>(); // finally exits
|
||||
|
||||
// versions memory dependencies
|
||||
private VarVersionsGraph ssuversions = new VarVersionsGraph();
|
||||
private final VarVersionsGraph ssuversions = new VarVersionsGraph();
|
||||
|
||||
// field access vars (exprent id, var id)
|
||||
private HashMap<Integer, Integer> mapFieldVars = new HashMap<Integer, Integer>();
|
||||
private final HashMap<Integer, Integer> mapFieldVars = new HashMap<Integer, Integer>();
|
||||
|
||||
// field access counter
|
||||
private int fieldvarcounter = -1;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,7 +31,7 @@ public class BasicBlockStatement extends Statement {
|
||||
// private fields
|
||||
// *****************************************************************************
|
||||
|
||||
private BasicBlock block;
|
||||
private final BasicBlock block;
|
||||
|
||||
// *****************************************************************************
|
||||
// constructors
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -40,7 +40,7 @@ public class CatchAllStatement extends Statement {
|
||||
|
||||
private VarExprent monitor;
|
||||
|
||||
private List<VarExprent> vars = new ArrayList<VarExprent>();
|
||||
private final List<VarExprent> vars = new ArrayList<VarExprent>();
|
||||
|
||||
// *****************************************************************************
|
||||
// constructors
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,9 +33,9 @@ import java.util.List;
|
||||
|
||||
public class CatchStatement extends Statement {
|
||||
|
||||
private List<List<String>> exctstrings = new ArrayList<List<String>>();
|
||||
private final List<List<String>> exctstrings = new ArrayList<List<String>>();
|
||||
|
||||
private List<VarExprent> vars = new ArrayList<VarExprent>();
|
||||
private final List<VarExprent> vars = new ArrayList<VarExprent>();
|
||||
|
||||
// *****************************************************************************
|
||||
// constructors
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,9 +34,9 @@ public class DoStatement extends Statement {
|
||||
|
||||
private int looptype;
|
||||
|
||||
private List<Exprent> initExprent = new ArrayList<Exprent>();
|
||||
private List<Exprent> conditionExprent = new ArrayList<Exprent>();
|
||||
private List<Exprent> incExprent = new ArrayList<Exprent>();
|
||||
private final List<Exprent> initExprent = new ArrayList<Exprent>();
|
||||
private final List<Exprent> conditionExprent = new ArrayList<Exprent>();
|
||||
private final List<Exprent> incExprent = new ArrayList<Exprent>();
|
||||
|
||||
// *****************************************************************************
|
||||
// constructors
|
||||
|
||||
@@ -15,15 +15,6 @@
|
||||
*/
|
||||
package org.jetbrains.java.decompiler.modules.decompiler.stats;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jetbrains.java.decompiler.code.CodeConstants;
|
||||
import org.jetbrains.java.decompiler.code.InstructionSequence;
|
||||
import org.jetbrains.java.decompiler.main.DecompilerContext;
|
||||
@@ -39,6 +30,9 @@ import org.jetbrains.java.decompiler.struct.match.MatchNode;
|
||||
import org.jetbrains.java.decompiler.struct.match.MatchNode.RuleValue;
|
||||
import org.jetbrains.java.decompiler.util.VBStyleCollection;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class Statement implements IMatchable {
|
||||
|
||||
public static final int STATEDGE_ALL = 1 << 31;
|
||||
@@ -79,11 +73,11 @@ public class Statement implements IMatchable {
|
||||
// private fields
|
||||
// *****************************************************************************
|
||||
|
||||
private Map<Integer, List<StatEdge>> mapSuccEdges = new HashMap<Integer, List<StatEdge>>();
|
||||
private Map<Integer, List<StatEdge>> mapPredEdges = new HashMap<Integer, List<StatEdge>>();
|
||||
private final Map<Integer, List<StatEdge>> mapSuccEdges = new HashMap<Integer, List<StatEdge>>();
|
||||
private final Map<Integer, List<StatEdge>> mapPredEdges = new HashMap<Integer, List<StatEdge>>();
|
||||
|
||||
private Map<Integer, List<Statement>> mapSuccStates = new HashMap<Integer, List<Statement>>();
|
||||
private Map<Integer, List<Statement>> mapPredStates = new HashMap<Integer, List<Statement>>();
|
||||
private final Map<Integer, List<Statement>> mapSuccStates = new HashMap<Integer, List<Statement>>();
|
||||
private final Map<Integer, List<Statement>> mapPredStates = new HashMap<Integer, List<Statement>>();
|
||||
|
||||
// statement as graph
|
||||
protected VBStyleCollection<Statement, Integer> stats = new VBStyleCollection<Statement, Integer>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -45,7 +45,7 @@ public class SwitchStatement extends Statement {
|
||||
|
||||
private StatEdge default_edge;
|
||||
|
||||
private List<Exprent> headexprent = new ArrayList<Exprent>();
|
||||
private final List<Exprent> headexprent = new ArrayList<Exprent>();
|
||||
|
||||
// *****************************************************************************
|
||||
// constructors
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,7 +30,7 @@ public class SynchronizedStatement extends Statement {
|
||||
|
||||
private Statement body;
|
||||
|
||||
private List<Exprent> headexprent = new ArrayList<Exprent>();
|
||||
private final List<Exprent> headexprent = new ArrayList<Exprent>();
|
||||
|
||||
// *****************************************************************************
|
||||
// constructors
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,9 +23,9 @@ import java.util.List;
|
||||
|
||||
public class CheckTypesResult {
|
||||
|
||||
private List<ExprentTypePair> lstMaxTypeExprents = new ArrayList<ExprentTypePair>();
|
||||
private final List<ExprentTypePair> lstMaxTypeExprents = new ArrayList<ExprentTypePair>();
|
||||
|
||||
private List<ExprentTypePair> lstMinTypeExprents = new ArrayList<ExprentTypePair>();
|
||||
private final List<ExprentTypePair> lstMinTypeExprents = new ArrayList<ExprentTypePair>();
|
||||
|
||||
public void addMaxTypeExprent(Exprent exprent, VarType type) {
|
||||
lstMaxTypeExprents.add(new ExprentTypePair(exprent, type, null));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,14 +34,14 @@ import java.util.Map.Entry;
|
||||
|
||||
public class VarDefinitionHelper {
|
||||
|
||||
private HashMap<Integer, Statement> mapVarDefStatements;
|
||||
private final HashMap<Integer, Statement> mapVarDefStatements;
|
||||
|
||||
// statement.id, defined vars
|
||||
private HashMap<Integer, HashSet<Integer>> mapStatementVars;
|
||||
private final HashMap<Integer, HashSet<Integer>> mapStatementVars;
|
||||
|
||||
private HashSet<Integer> implDefVars;
|
||||
private final HashSet<Integer> implDefVars;
|
||||
|
||||
private VarProcessor varproc;
|
||||
private final VarProcessor varproc;
|
||||
|
||||
public VarDefinitionHelper(Statement root, StructMethod mt, VarProcessor varproc) {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,8 +29,8 @@ public class VarProcessor {
|
||||
|
||||
private Map<VarVersionPair, String> mapVarNames = new HashMap<VarVersionPair, String>();
|
||||
private VarVersionsProcessor varVersions;
|
||||
private Map<VarVersionPair, String> thisVars = new HashMap<VarVersionPair, String>();
|
||||
private Set<VarVersionPair> externalVars = new HashSet<VarVersionPair>();
|
||||
private final Map<VarVersionPair, String> thisVars = new HashMap<VarVersionPair, String>();
|
||||
private final Set<VarVersionPair> externalVars = new HashSet<VarVersionPair>();
|
||||
|
||||
public void setVarVersions(RootStatement root) {
|
||||
varVersions = new VarVersionsProcessor();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,9 +39,9 @@ public class VarTypeProcessor {
|
||||
public static final int VAR_EXPLICIT_FINAL = 2;
|
||||
public static final int VAR_FINAL = 3;
|
||||
|
||||
private Map<VarVersionPair, VarType> mapExprentMinTypes = new HashMap<VarVersionPair, VarType>();
|
||||
private Map<VarVersionPair, VarType> mapExprentMaxTypes = new HashMap<VarVersionPair, VarType>();
|
||||
private Map<VarVersionPair, Integer> mapFinalVars = new HashMap<VarVersionPair, Integer>();
|
||||
private final Map<VarVersionPair, VarType> mapExprentMinTypes = new HashMap<VarVersionPair, VarType>();
|
||||
private final Map<VarVersionPair, VarType> mapExprentMaxTypes = new HashMap<VarVersionPair, VarType>();
|
||||
private final Map<VarVersionPair, Integer> mapFinalVars = new HashMap<VarVersionPair, Integer>();
|
||||
|
||||
private void setInitVars(RootStatement root) {
|
||||
StructMethod mt = (StructMethod)DecompilerContext.getProperty(DecompilerContext.CURRENT_METHOD);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,7 @@ public class VarVersionEdge { // FIXME: can be removed?
|
||||
|
||||
public VarVersionNode dest;
|
||||
|
||||
private int hashCode;
|
||||
private final int hashCode;
|
||||
|
||||
public VarVersionEdge(int type, VarVersionNode source, VarVersionNode dest) {
|
||||
this.type = type;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,11 +22,11 @@ import java.util.List;
|
||||
|
||||
public class ClassWrapperNode {
|
||||
|
||||
private StructClass classStruct;
|
||||
private final StructClass classStruct;
|
||||
|
||||
private ClassWrapperNode superclass;
|
||||
|
||||
private List<ClassWrapperNode> subclasses = new ArrayList<ClassWrapperNode>();
|
||||
private final List<ClassWrapperNode> subclasses = new ArrayList<ClassWrapperNode>();
|
||||
|
||||
public ClassWrapperNode(StructClass cl) {
|
||||
this.classStruct = cl;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,7 +32,7 @@ public class ConverterHelper implements IIdentifierRenamer {
|
||||
private int classCounter = 0;
|
||||
private int fieldCounter = 0;
|
||||
private int methodCounter = 0;
|
||||
private Set<String> setNonStandardClassNames = new HashSet<String>();
|
||||
private final Set<String> setNonStandardClassNames = new HashSet<String>();
|
||||
|
||||
@Override
|
||||
public boolean toBeRenamed(Type elementType, String className, String element, String descriptor) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,11 +21,11 @@ import java.util.HashMap;
|
||||
|
||||
public class PoolInterceptor {
|
||||
|
||||
private IIdentifierRenamer helper;
|
||||
private final IIdentifierRenamer helper;
|
||||
|
||||
private HashMap<String, String> mapOldToNewNames = new HashMap<String, String>();
|
||||
private final HashMap<String, String> mapOldToNewNames = new HashMap<String, String>();
|
||||
|
||||
private HashMap<String, String> mapNewToOldNames = new HashMap<String, String>();
|
||||
private final HashMap<String, String> mapNewToOldNames = new HashMap<String, String>();
|
||||
|
||||
public PoolInterceptor(IIdentifierRenamer helper) {
|
||||
this.helper = helper;
|
||||
|
||||
Reference in New Issue
Block a user