decompiler: cleanup
This commit is contained in:
@@ -38,9 +38,9 @@ import java.util.Map.Entry;
|
|||||||
|
|
||||||
public class ClassReference14Processor {
|
public class ClassReference14Processor {
|
||||||
|
|
||||||
public ExitExprent bodyexprent;
|
public final ExitExprent bodyexprent;
|
||||||
|
|
||||||
public ExitExprent handlerexprent;
|
public final ExitExprent handlerexprent;
|
||||||
|
|
||||||
|
|
||||||
public ClassReference14Processor() {
|
public ClassReference14Processor() {
|
||||||
|
|||||||
@@ -353,14 +353,14 @@ public class ClassesProcessor {
|
|||||||
public int type;
|
public int type;
|
||||||
public int access;
|
public int access;
|
||||||
public String simpleName;
|
public String simpleName;
|
||||||
public StructClass classStruct;
|
public final StructClass classStruct;
|
||||||
private ClassWrapper wrapper;
|
private ClassWrapper wrapper;
|
||||||
public String enclosingMethod;
|
public String enclosingMethod;
|
||||||
public InvocationExprent superInvocation;
|
public InvocationExprent superInvocation;
|
||||||
public Map<String, VarVersionPair> mapFieldsToVars = new HashMap<String, VarVersionPair>();
|
public final Map<String, VarVersionPair> mapFieldsToVars = new HashMap<String, VarVersionPair>();
|
||||||
public VarType anonymousClassType;
|
public VarType anonymousClassType;
|
||||||
public List<ClassNode> nested = new ArrayList<ClassNode>();
|
public final List<ClassNode> nested = new ArrayList<ClassNode>();
|
||||||
public Set<String> enclosingClasses = new HashSet<String>();
|
public final Set<String> enclosingClasses = new HashSet<String>();
|
||||||
public ClassNode parent;
|
public ClassNode parent;
|
||||||
public LambdaInformation lambdaInformation;
|
public LambdaInformation lambdaInformation;
|
||||||
public boolean namelessConstructorStub = false;
|
public boolean namelessConstructorStub = false;
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -17,7 +17,7 @@ package org.jetbrains.java.decompiler.main.extern;
|
|||||||
|
|
||||||
public interface IIdentifierRenamer {
|
public interface IIdentifierRenamer {
|
||||||
|
|
||||||
enum Type {ELEMENT_CLASS, ELEMENT_FIELD, ELEMENT_METHOD};
|
enum Type {ELEMENT_CLASS, ELEMENT_FIELD, ELEMENT_METHOD}
|
||||||
|
|
||||||
boolean toBeRenamed(Type elementType, String className, String element, String descriptor);
|
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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -29,13 +29,13 @@ import java.util.List;
|
|||||||
|
|
||||||
public class MethodWrapper {
|
public class MethodWrapper {
|
||||||
|
|
||||||
public RootStatement root;
|
public final RootStatement root;
|
||||||
|
|
||||||
public VarProcessor varproc;
|
public final VarProcessor varproc;
|
||||||
|
|
||||||
public StructMethod methodStruct;
|
public final StructMethod methodStruct;
|
||||||
|
|
||||||
public CounterContainer counter;
|
public final CounterContainer counter;
|
||||||
|
|
||||||
public DirectGraph graph;
|
public DirectGraph graph;
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ public class MethodWrapper {
|
|||||||
|
|
||||||
public boolean decompiledWithErrors;
|
public boolean decompiledWithErrors;
|
||||||
|
|
||||||
public HashSet<String> setOuterVarNames = new HashSet<String>();
|
public final HashSet<String> setOuterVarNames = new HashSet<String>();
|
||||||
|
|
||||||
public MethodWrapper(RootStatement root, VarProcessor varproc, StructMethod methodStruct, CounterContainer counter) {
|
public MethodWrapper(RootStatement root, VarProcessor varproc, StructMethod methodStruct, CounterContainer counter) {
|
||||||
this.root = root;
|
this.root = root;
|
||||||
|
|||||||
@@ -733,10 +733,10 @@ public class IfHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class IfNode {
|
private static class IfNode {
|
||||||
public Statement value;
|
public final Statement value;
|
||||||
|
|
||||||
public List<IfNode> succs = new ArrayList<IfNode>();
|
public final List<IfNode> succs = new ArrayList<IfNode>();
|
||||||
public List<Integer> edgetypes = new ArrayList<Integer>();
|
public final List<Integer> edgetypes = new ArrayList<Integer>();
|
||||||
|
|
||||||
public IfNode(Statement value) {
|
public IfNode(Statement value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -244,7 +244,7 @@ public class SequenceHelper {
|
|||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
Statement next = null;
|
Statement next;
|
||||||
Statement current = null;
|
Statement current = null;
|
||||||
|
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ import org.jetbrains.java.decompiler.util.InterpreterUtil;
|
|||||||
|
|
||||||
public class SimplifyExprentsHelper {
|
public class SimplifyExprentsHelper {
|
||||||
|
|
||||||
static MatchEngine class14Builder = new MatchEngine();
|
static final MatchEngine class14Builder = new MatchEngine();
|
||||||
|
|
||||||
private final boolean firstInvocation;
|
private final boolean 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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -31,8 +31,8 @@ public class IrreducibleCFGDeobfuscator {
|
|||||||
|
|
||||||
class Node {
|
class Node {
|
||||||
public Integer id;
|
public Integer id;
|
||||||
public Set<Node> preds = new HashSet<Node>();
|
public final Set<Node> preds = new HashSet<Node>();
|
||||||
public Set<Node> succs = new HashSet<Node>();
|
public final Set<Node> succs = new HashSet<Node>();
|
||||||
|
|
||||||
public Node(Integer id) {
|
public Node(Integer id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -33,7 +33,6 @@ import org.jetbrains.java.decompiler.util.InterpreterUtil;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
public class ExitExprent extends Exprent {
|
public class ExitExprent extends Exprent {
|
||||||
|
|
||||||
|
|||||||
@@ -21,15 +21,12 @@ import org.jetbrains.java.decompiler.main.collectors.BytecodeMappingTracer;
|
|||||||
import org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor;
|
import org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor;
|
||||||
import org.jetbrains.java.decompiler.modules.decompiler.vars.CheckTypesResult;
|
import org.jetbrains.java.decompiler.modules.decompiler.vars.CheckTypesResult;
|
||||||
import org.jetbrains.java.decompiler.struct.gen.VarType;
|
import org.jetbrains.java.decompiler.struct.gen.VarType;
|
||||||
import org.jetbrains.java.decompiler.struct.match.IMatchable;
|
|
||||||
import org.jetbrains.java.decompiler.struct.match.MatchEngine;
|
import org.jetbrains.java.decompiler.struct.match.MatchEngine;
|
||||||
import org.jetbrains.java.decompiler.struct.match.MatchNode;
|
import org.jetbrains.java.decompiler.struct.match.MatchNode;
|
||||||
import org.jetbrains.java.decompiler.struct.match.IMatchable.MatchProperties;
|
|
||||||
import org.jetbrains.java.decompiler.util.InterpreterUtil;
|
import org.jetbrains.java.decompiler.util.InterpreterUtil;
|
||||||
import org.jetbrains.java.decompiler.util.ListStack;
|
import org.jetbrains.java.decompiler.util.ListStack;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
public class FunctionExprent extends Exprent {
|
public class FunctionExprent extends Exprent {
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -27,21 +27,21 @@ import java.util.List;
|
|||||||
|
|
||||||
public class DirectGraph {
|
public class DirectGraph {
|
||||||
|
|
||||||
public VBStyleCollection<DirectNode, String> nodes = new VBStyleCollection<DirectNode, String>();
|
public final VBStyleCollection<DirectNode, String> nodes = new VBStyleCollection<DirectNode, String>();
|
||||||
|
|
||||||
public DirectNode first;
|
public DirectNode first;
|
||||||
|
|
||||||
// exit, [source, destination]
|
// exit, [source, destination]
|
||||||
public HashMap<String, List<FinallyPathWrapper>> mapShortRangeFinallyPaths = new HashMap<String, List<FinallyPathWrapper>>();
|
public final HashMap<String, List<FinallyPathWrapper>> mapShortRangeFinallyPaths = new HashMap<String, List<FinallyPathWrapper>>();
|
||||||
|
|
||||||
// exit, [source, destination]
|
// exit, [source, destination]
|
||||||
public HashMap<String, List<FinallyPathWrapper>> mapLongRangeFinallyPaths = new HashMap<String, List<FinallyPathWrapper>>();
|
public final HashMap<String, List<FinallyPathWrapper>> mapLongRangeFinallyPaths = new HashMap<String, List<FinallyPathWrapper>>();
|
||||||
|
|
||||||
// negative if branches (recorded for handling of && and ||)
|
// negative if branches (recorded for handling of && and ||)
|
||||||
public HashMap<String, String> mapNegIfBranch = new HashMap<String, String>();
|
public final HashMap<String, String> mapNegIfBranch = new HashMap<String, String>();
|
||||||
|
|
||||||
// nodes, that are exception exits of a finally block with monitor variable
|
// nodes, that are exception exits of a finally block with monitor variable
|
||||||
public HashMap<String, String> mapFinallyMonitorExceptionPathExits = new HashMap<String, String>();
|
public final HashMap<String, String> mapFinallyMonitorExceptionPathExits = new HashMap<String, String>();
|
||||||
|
|
||||||
public void sortReversePostOrder() {
|
public void sortReversePostOrder() {
|
||||||
LinkedList<DirectNode> res = new LinkedList<DirectNode>();
|
LinkedList<DirectNode> res = new LinkedList<DirectNode>();
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -32,19 +32,19 @@ public class DirectNode {
|
|||||||
public static final int NODE_INCREMENT = 5;
|
public static final int NODE_INCREMENT = 5;
|
||||||
public static final int NODE_TRY = 6;
|
public static final int NODE_TRY = 6;
|
||||||
|
|
||||||
public int type;
|
public final int type;
|
||||||
|
|
||||||
public String id;
|
public final String id;
|
||||||
|
|
||||||
public BasicBlockStatement block;
|
public BasicBlockStatement block;
|
||||||
|
|
||||||
public Statement statement;
|
public final Statement statement;
|
||||||
|
|
||||||
public List<Exprent> exprents = new ArrayList<Exprent>();
|
public List<Exprent> exprents = new ArrayList<Exprent>();
|
||||||
|
|
||||||
public List<DirectNode> succs = new ArrayList<DirectNode>();
|
public final List<DirectNode> succs = new ArrayList<DirectNode>();
|
||||||
|
|
||||||
public List<DirectNode> preds = new ArrayList<DirectNode>();
|
public final List<DirectNode> preds = new ArrayList<DirectNode>();
|
||||||
|
|
||||||
public DirectNode(int type, Statement statement, String id) {
|
public DirectNode(int type, Statement statement, String id) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|||||||
@@ -489,9 +489,9 @@ public class FlattenStatementsHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class FinallyPathWrapper {
|
public static class FinallyPathWrapper {
|
||||||
public String source;
|
public final String source;
|
||||||
public String destination;
|
public final String destination;
|
||||||
public String entry;
|
public final String entry;
|
||||||
|
|
||||||
private FinallyPathWrapper(String source, String destination, String entry) {
|
private FinallyPathWrapper(String source, String destination, String entry) {
|
||||||
this.source = source;
|
this.source = source;
|
||||||
@@ -522,16 +522,16 @@ public class FlattenStatementsHelper {
|
|||||||
|
|
||||||
private static class StackEntry {
|
private static class StackEntry {
|
||||||
|
|
||||||
public CatchAllStatement catchstatement;
|
public final CatchAllStatement catchstatement;
|
||||||
public boolean state;
|
public final boolean state;
|
||||||
public int edgetype;
|
public final int edgetype;
|
||||||
public boolean isFinallyExceptionPath;
|
public final boolean isFinallyExceptionPath;
|
||||||
|
|
||||||
public Statement destination;
|
public final Statement destination;
|
||||||
public Statement finallyShortRangeEntry;
|
public final Statement finallyShortRangeEntry;
|
||||||
public Statement finallyLongRangeEntry;
|
public final Statement finallyLongRangeEntry;
|
||||||
public DirectNode finallyShortRangeSource;
|
public final DirectNode finallyShortRangeSource;
|
||||||
public DirectNode finallyLongRangeSource;
|
public final DirectNode finallyLongRangeSource;
|
||||||
|
|
||||||
public StackEntry(CatchAllStatement catchstatement,
|
public StackEntry(CatchAllStatement catchstatement,
|
||||||
boolean state,
|
boolean state,
|
||||||
@@ -561,9 +561,9 @@ public class FlattenStatementsHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static class Edge {
|
private static class Edge {
|
||||||
public String sourceid;
|
public final String sourceid;
|
||||||
public Integer statid;
|
public final Integer statid;
|
||||||
public int edgetype;
|
public final int edgetype;
|
||||||
|
|
||||||
public Edge(String sourceid, Integer statid, int edgetype) {
|
public Edge(String sourceid, Integer statid, int edgetype) {
|
||||||
this.sourceid = sourceid;
|
this.sourceid = sourceid;
|
||||||
|
|||||||
@@ -30,13 +30,12 @@ import org.jetbrains.java.decompiler.util.InterpreterUtil;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
|
|
||||||
public class IfStatement extends Statement {
|
public class IfStatement extends Statement {
|
||||||
|
|
||||||
public static int IFTYPE_IF = 0;
|
public static final int IFTYPE_IF = 0;
|
||||||
public static int IFTYPE_IFELSE = 1;
|
public static final int IFTYPE_IFELSE = 1;
|
||||||
|
|
||||||
public int iftype;
|
public int iftype;
|
||||||
|
|
||||||
@@ -54,7 +53,7 @@ public class IfStatement extends Statement {
|
|||||||
|
|
||||||
private boolean iffflag;
|
private boolean iffflag;
|
||||||
|
|
||||||
private List<Exprent> headexprent = new ArrayList<Exprent>(); // contains IfExprent
|
private final List<Exprent> headexprent = new ArrayList<Exprent>(); // contains IfExprent
|
||||||
|
|
||||||
// *****************************************************************************
|
// *****************************************************************************
|
||||||
// constructors
|
// constructors
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public class Statement implements IMatchable {
|
|||||||
private final Map<Integer, List<Statement>> mapPredStates = new HashMap<Integer, List<Statement>>();
|
private final Map<Integer, List<Statement>> mapPredStates = new HashMap<Integer, List<Statement>>();
|
||||||
|
|
||||||
// statement as graph
|
// statement as graph
|
||||||
protected VBStyleCollection<Statement, Integer> stats = new VBStyleCollection<Statement, Integer>();
|
protected final VBStyleCollection<Statement, Integer> stats = new VBStyleCollection<Statement, Integer>();
|
||||||
|
|
||||||
protected Statement parent;
|
protected Statement parent;
|
||||||
|
|
||||||
@@ -88,9 +88,9 @@ public class Statement implements IMatchable {
|
|||||||
|
|
||||||
protected List<Exprent> exprents;
|
protected List<Exprent> exprents;
|
||||||
|
|
||||||
protected HashSet<StatEdge> labelEdges = new HashSet<StatEdge>();
|
protected final HashSet<StatEdge> labelEdges = new HashSet<StatEdge>();
|
||||||
|
|
||||||
protected List<Exprent> varDefinitions = new ArrayList<Exprent>();
|
protected final List<Exprent> varDefinitions = new ArrayList<Exprent>();
|
||||||
|
|
||||||
// copied statement, s. deobfuscating of irreducible CFGs
|
// copied statement, s. deobfuscating of irreducible CFGs
|
||||||
private boolean copied = false;
|
private boolean copied = false;
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ public class CheckTypesResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class ExprentTypePair {
|
public static class ExprentTypePair {
|
||||||
public Exprent exprent;
|
public final Exprent exprent;
|
||||||
public VarType type;
|
public final VarType type;
|
||||||
public VarType desttype;
|
public final VarType desttype;
|
||||||
|
|
||||||
public ExprentTypePair(Exprent exprent, VarType type, VarType desttype) {
|
public ExprentTypePair(Exprent exprent, VarType type, VarType desttype) {
|
||||||
this.exprent = exprent;
|
this.exprent = exprent;
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ public class VarVersionEdge { // FIXME: can be removed?
|
|||||||
public static final int EDGE_GENERAL = 0;
|
public static final int EDGE_GENERAL = 0;
|
||||||
public static final int EDGE_PHANTOM = 1;
|
public static final int EDGE_PHANTOM = 1;
|
||||||
|
|
||||||
public int type;
|
public final int type;
|
||||||
|
|
||||||
public VarVersionNode source;
|
public final VarVersionNode source;
|
||||||
|
|
||||||
public VarVersionNode dest;
|
public final VarVersionNode dest;
|
||||||
|
|
||||||
private final int hashCode;
|
private final int hashCode;
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -27,13 +27,13 @@ public class VarVersionNode implements IGraphNode {
|
|||||||
|
|
||||||
public static final int FLAG_PHANTOM_FINEXIT = 2;
|
public static final int FLAG_PHANTOM_FINEXIT = 2;
|
||||||
|
|
||||||
public int var;
|
public final int var;
|
||||||
|
|
||||||
public int version;
|
public final int version;
|
||||||
|
|
||||||
public Set<VarVersionEdge> succs = new HashSet<VarVersionEdge>();
|
public final Set<VarVersionEdge> succs = new HashSet<VarVersionEdge>();
|
||||||
|
|
||||||
public Set<VarVersionEdge> preds = new HashSet<VarVersionEdge>();
|
public final Set<VarVersionEdge> preds = new HashSet<VarVersionEdge>();
|
||||||
|
|
||||||
public int flags;
|
public int flags;
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -27,7 +27,7 @@ public class VarVersionsGraph {
|
|||||||
|
|
||||||
public int counter = 0;
|
public int counter = 0;
|
||||||
|
|
||||||
public VBStyleCollection<VarVersionNode, VarVersionPair> nodes = new VBStyleCollection<VarVersionNode, VarVersionPair>();
|
public final VBStyleCollection<VarVersionNode, VarVersionPair> nodes = new VBStyleCollection<VarVersionNode, VarVersionPair>();
|
||||||
|
|
||||||
private GenericDominatorEngine engine;
|
private GenericDominatorEngine engine;
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class ConstantPool implements NewClassNameBuilder {
|
|||||||
public static final int FIELD = 1;
|
public static final int FIELD = 1;
|
||||||
public static final int METHOD = 2;
|
public static final int METHOD = 2;
|
||||||
|
|
||||||
private List<PooledConstant> pool = new ArrayList<PooledConstant>();
|
private final List<PooledConstant> pool = new ArrayList<PooledConstant>();
|
||||||
private final PoolInterceptor interceptor;
|
private final PoolInterceptor interceptor;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -22,9 +22,9 @@ public class GenericClassDescriptor {
|
|||||||
|
|
||||||
public GenericType superclass;
|
public GenericType superclass;
|
||||||
|
|
||||||
public List<GenericType> superinterfaces = new ArrayList<GenericType>();
|
public final List<GenericType> superinterfaces = new ArrayList<GenericType>();
|
||||||
|
|
||||||
public List<String> fparameters = new ArrayList<String>();
|
public final List<String> fparameters = new ArrayList<String>();
|
||||||
|
|
||||||
public List<List<GenericType>> fbounds = new ArrayList<List<GenericType>>();
|
public final List<List<GenericType>> fbounds = new ArrayList<List<GenericType>>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -20,13 +20,13 @@ import java.util.List;
|
|||||||
|
|
||||||
public class GenericMethodDescriptor {
|
public class GenericMethodDescriptor {
|
||||||
|
|
||||||
public List<String> fparameters = new ArrayList<String>();
|
public final List<String> fparameters = new ArrayList<String>();
|
||||||
|
|
||||||
public List<List<GenericType>> fbounds = new ArrayList<List<GenericType>>();
|
public final List<List<GenericType>> fbounds = new ArrayList<List<GenericType>>();
|
||||||
|
|
||||||
public List<GenericType> params = new ArrayList<GenericType>();
|
public final List<GenericType> params = new ArrayList<GenericType>();
|
||||||
|
|
||||||
public GenericType ret;
|
public GenericType ret;
|
||||||
|
|
||||||
public List<GenericType> exceptions = new ArrayList<GenericType>();
|
public final List<GenericType> exceptions = new ArrayList<GenericType>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -160,9 +160,9 @@ public class LazyLoader {
|
|||||||
public static final int CLASS = 1;
|
public static final int CLASS = 1;
|
||||||
public static final int ENTRY = 2;
|
public static final int ENTRY = 2;
|
||||||
|
|
||||||
public int type;
|
public final int type;
|
||||||
public String externalPath;
|
public final String externalPath;
|
||||||
public String internalPath;
|
public final String internalPath;
|
||||||
|
|
||||||
public Link(int type, String externalPath, String internalPath) {
|
public Link(int type, String externalPath, String internalPath) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|||||||
@@ -1,9 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
package org.jetbrains.java.decompiler.struct.match;
|
package org.jetbrains.java.decompiler.struct.match;
|
||||||
|
|
||||||
|
|
||||||
public interface IMatchable {
|
public interface IMatchable {
|
||||||
|
|
||||||
public enum MatchProperties {
|
enum MatchProperties {
|
||||||
STATEMENT_TYPE,
|
STATEMENT_TYPE,
|
||||||
STATEMENT_RET,
|
STATEMENT_RET,
|
||||||
STATEMENT_STATSIZE,
|
STATEMENT_STATSIZE,
|
||||||
@@ -25,8 +40,8 @@ public interface IMatchable {
|
|||||||
EXPRENT_FIELD_NAME,
|
EXPRENT_FIELD_NAME,
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMatchable findObject(MatchNode matchNode, int index);
|
IMatchable findObject(MatchNode matchNode, int index);
|
||||||
|
|
||||||
public boolean match(MatchNode matchNode, MatchEngine engine);
|
boolean match(MatchNode matchNode, MatchEngine engine);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ import org.jetbrains.java.decompiler.struct.match.IMatchable.MatchProperties;
|
|||||||
public class MatchNode {
|
public class MatchNode {
|
||||||
|
|
||||||
public static class RuleValue {
|
public static class RuleValue {
|
||||||
public int parameter;
|
public final int parameter;
|
||||||
public Object value;
|
public final Object value;
|
||||||
|
|
||||||
public RuleValue(int parameter, Object value) {
|
public RuleValue(int parameter, Object value) {
|
||||||
this.parameter = parameter;
|
this.parameter = parameter;
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ public class FastSetFactory<E> {
|
|||||||
index = factory.addElement(element);
|
index = factory.addElement(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
return index[0] >= data.length ? false : ((data[index[0]] & index[1]) != 0);
|
return index[0] < data.length && ((data[index[0]] & index[1]) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean contains(FastSet<E> set) {
|
public boolean contains(FastSet<E> set) {
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ public class FastSparseSetFactory<E> {
|
|||||||
index = factory.addElement(element);
|
index = factory.addElement(element);
|
||||||
}
|
}
|
||||||
|
|
||||||
return index[0] >= data.length ? false : ((data[index[0]] & index[1]) != 0);
|
return index[0] < data.length && ((data[index[0]] & index[1]) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean contains(FastSparseSet<E> set) {
|
public boolean contains(FastSparseSet<E> set) {
|
||||||
|
|||||||
@@ -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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
package org.jetbrains.java.decompiler.util;
|
package org.jetbrains.java.decompiler.util;
|
||||||
|
|
||||||
import org.jetbrains.java.decompiler.main.DecompilerContext;
|
import org.jetbrains.java.decompiler.main.DecompilerContext;
|
||||||
import org.jetbrains.java.decompiler.main.TextBuffer;
|
|
||||||
import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences;
|
import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|||||||
Reference in New Issue
Block a user