cleanup (final)

GitOrigin-RevId: 69b73056f0c524ad7b6e7c5c2b3a4b58f64feed9
master
Vladimir Krivosheev 4 years ago committed by intellij-monorepo-bot
parent f61e659e58
commit 50691f39fb
  1. 4
      src/org/jetbrains/java/decompiler/code/interpreter/InstructionImpact.java
  2. 4
      src/org/jetbrains/java/decompiler/main/AssertProcessor.java
  3. 4
      src/org/jetbrains/java/decompiler/main/ClassReference14Processor.java
  4. 4
      src/org/jetbrains/java/decompiler/main/EnumProcessor.java
  5. 4
      src/org/jetbrains/java/decompiler/main/InitializerProcessor.java
  6. 4
      src/org/jetbrains/java/decompiler/modules/code/DeadCodeHelper.java
  7. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/ClasspathHelper.java
  8. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/ClearStructHelper.java
  9. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/ConcatenationHelper.java
  10. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/DecHelper.java
  11. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/DomHelper.java
  12. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/ExitHelper.java
  13. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/IdeaNotNullHelper.java
  14. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/IfHelper.java
  15. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/InlineSingleBlockHelper.java
  16. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/LabelHelper.java
  17. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/LoopExtractHelper.java
  18. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/MergeHelper.java
  19. 2
      src/org/jetbrains/java/decompiler/modules/decompiler/SecondaryFunctionsHelper.java
  20. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/SequenceHelper.java
  21. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/SwitchHelper.java
  22. 2
      src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/ExceptionDeobfuscator.java
  23. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/deobfuscator/IrreducibleCFGDeobfuscator.java
  24. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExprUtil.java
  25. 4
      src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statements.java
  26. 4
      src/org/jetbrains/java/decompiler/struct/gen/generics/GenericMain.java
  27. 4
      src/org/jetbrains/java/decompiler/util/InterpreterUtil.java
  28. 6
      src/org/jetbrains/java/decompiler/util/TextUtil.java

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.code.interpreter; package org.jetbrains.java.decompiler.code.interpreter;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -12,7 +12,7 @@ import org.jetbrains.java.decompiler.struct.gen.MethodDescriptor;
import org.jetbrains.java.decompiler.struct.gen.VarType; import org.jetbrains.java.decompiler.struct.gen.VarType;
import org.jetbrains.java.decompiler.util.ListStack; import org.jetbrains.java.decompiler.util.ListStack;
public class InstructionImpact { public final class InstructionImpact {
// {read, write} // {read, write}
private static final int[][][] stack_impact = { private static final int[][][] stack_impact = {

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.main; package org.jetbrains.java.decompiler.main;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -21,7 +21,7 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
public class AssertProcessor { public final class AssertProcessor {
private static final VarType CLASS_ASSERTION_ERROR = new VarType(CodeConstants.TYPE_OBJECT, 0, "java/lang/AssertionError"); private static final VarType CLASS_ASSERTION_ERROR = new VarType(CodeConstants.TYPE_OBJECT, 0, "java/lang/AssertionError");

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.main; package org.jetbrains.java.decompiler.main;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -22,7 +22,7 @@ import org.jetbrains.java.decompiler.util.VBStyleCollection;
import java.util.*; import java.util.*;
import java.util.Map.Entry; import java.util.Map.Entry;
public class ClassReference14Processor { public final class ClassReference14Processor {
private static final ExitExprent BODY_EXPR; private static final ExitExprent BODY_EXPR;
private static final ExitExprent HANDLER_EXPR; private static final ExitExprent HANDLER_EXPR;

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.main; package org.jetbrains.java.decompiler.main;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -13,7 +13,7 @@ import org.jetbrains.java.decompiler.struct.StructField;
import org.jetbrains.java.decompiler.struct.StructMethod; import org.jetbrains.java.decompiler.struct.StructMethod;
import org.jetbrains.java.decompiler.util.InterpreterUtil; import org.jetbrains.java.decompiler.util.InterpreterUtil;
public class EnumProcessor { public final class EnumProcessor {
public static void clearEnum(ClassWrapper wrapper) { public static void clearEnum(ClassWrapper wrapper) {
StructClass cl = wrapper.getClassStruct(); StructClass cl = wrapper.getClassStruct();

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.main; package org.jetbrains.java.decompiler.main;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -18,7 +18,7 @@ import org.jetbrains.java.decompiler.util.InterpreterUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class InitializerProcessor { public final class InitializerProcessor {
public static void extractInitializers(ClassWrapper wrapper) { public static void extractInitializers(ClassWrapper wrapper) {
MethodWrapper method = wrapper.getMethodWrapper(CodeConstants.CLINIT_NAME, "()V"); MethodWrapper method = wrapper.getMethodWrapper(CodeConstants.CLINIT_NAME, "()V");
if (method != null && method.root != null) { // successfully decompiled static constructor if (method != null && method.root != null) { // successfully decompiled static constructor

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.code; package org.jetbrains.java.decompiler.modules.code;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -13,7 +13,7 @@ import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences;
import java.util.*; import java.util.*;
public class DeadCodeHelper { public final class DeadCodeHelper {
public static void removeDeadBlocks(ControlFlowGraph graph) { public static void removeDeadBlocks(ControlFlowGraph graph) {

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.struct.gen.MethodDescriptor; import org.jetbrains.java.decompiler.struct.gen.MethodDescriptor;
@ -9,7 +9,7 @@ import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class ClasspathHelper { public final class ClasspathHelper {
private static final Map<String, Method> METHOD_CACHE = Collections.synchronizedMap(new HashMap<>()); private static final Map<String, Method> METHOD_CACHE = Collections.synchronizedMap(new HashMap<>());

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.modules.decompiler.stats.RootStatement; import org.jetbrains.java.decompiler.modules.decompiler.stats.RootStatement;
@ -7,7 +7,7 @@ import org.jetbrains.java.decompiler.modules.decompiler.stats.Statement;
import java.util.LinkedList; import java.util.LinkedList;
public class ClearStructHelper { public final class ClearStructHelper {
public static void clearStatements(RootStatement root) { public static void clearStatements(RootStatement root) {

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -13,7 +13,7 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
public class ConcatenationHelper { public final class ConcatenationHelper {
private static final String builderClass = "java/lang/StringBuilder"; private static final String builderClass = "java/lang/StringBuilder";
private static final String bufferClass = "java/lang/StringBuffer"; private static final String bufferClass = "java/lang/StringBuffer";

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent; import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent;
@ -10,7 +10,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
public class DecHelper { public final class DecHelper {
public static boolean checkStatementExceptions(List<? extends Statement> lst) { public static boolean checkStatementExceptions(List<? extends Statement> lst) {

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.code.cfg.BasicBlock; import org.jetbrains.java.decompiler.code.cfg.BasicBlock;
@ -16,7 +16,7 @@ import org.jetbrains.java.decompiler.util.VBStyleCollection;
import java.util.*; import java.util.*;
public class DomHelper { public final class DomHelper {
private static RootStatement graphToStatement(ControlFlowGraph graph) { private static RootStatement graphToStatement(ControlFlowGraph graph) {

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.code.cfg.BasicBlock; import org.jetbrains.java.decompiler.code.cfg.BasicBlock;
@ -13,7 +13,7 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
public class ExitHelper { public final class ExitHelper {
public static boolean condenseExits(RootStatement root) { public static boolean condenseExits(RootStatement root) {
int changed = integrateExits(root); int changed = integrateExits(root);

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -14,7 +14,7 @@ import org.jetbrains.java.decompiler.struct.gen.MethodDescriptor;
import java.util.List; import java.util.List;
public class IdeaNotNullHelper { public final class IdeaNotNullHelper {
public static boolean removeHardcodedChecks(Statement root, StructMethod mt) { public static boolean removeHardcodedChecks(Statement root, StructMethod mt) {

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent; import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent;
@ -11,7 +11,7 @@ import org.jetbrains.java.decompiler.modules.decompiler.stats.Statement;
import java.util.*; import java.util.*;
public class IfHelper { public final class IfHelper {
public static boolean mergeAllIfs(RootStatement root) { public static boolean mergeAllIfs(RootStatement root) {
boolean res = mergeAllIfsRec(root, new HashSet<>()); boolean res = mergeAllIfsRec(root, new HashSet<>());
if (res) { if (res) {

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.modules.decompiler.stats.*; import org.jetbrains.java.decompiler.modules.decompiler.stats.*;
@ -7,7 +7,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
public class InlineSingleBlockHelper { public final class InlineSingleBlockHelper {
public static boolean inlineSingleBlocks(RootStatement root) { public static boolean inlineSingleBlocks(RootStatement root) {

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent; import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent;
@ -8,7 +8,7 @@ import java.util.*;
import java.util.Map.Entry; import java.util.Map.Entry;
public class LabelHelper { public final class LabelHelper {
public static void cleanUpEdges(RootStatement root) { public static void cleanUpEdges(RootStatement root) {

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.modules.decompiler.stats.DoStatement; import org.jetbrains.java.decompiler.modules.decompiler.stats.DoStatement;
@ -11,7 +11,7 @@ import java.util.Arrays;
import java.util.Set; import java.util.Set;
public class LoopExtractHelper { public final class LoopExtractHelper {
public static boolean extractLoops(Statement root) { public static boolean extractLoops(Statement root) {

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.code.cfg.BasicBlock; import org.jetbrains.java.decompiler.code.cfg.BasicBlock;
@ -12,7 +12,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
public class MergeHelper { public final class MergeHelper {
public static void enhanceLoops(Statement root) { public static void enhanceLoops(Statement root) {
while (enhanceLoopsRec(root)) /**/; while (enhanceLoopsRec(root)) /**/;
SequenceHelper.condenseSequences(root); SequenceHelper.condenseSequences(root);

@ -16,7 +16,7 @@ import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
public class SecondaryFunctionsHelper { public final class SecondaryFunctionsHelper {
private static final int[] funcsnot = new int[]{ private static final int[] funcsnot = new int[]{
FunctionExprent.FUNCTION_NE, FunctionExprent.FUNCTION_NE,

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.code.cfg.BasicBlock; import org.jetbrains.java.decompiler.code.cfg.BasicBlock;
@ -13,7 +13,7 @@ import java.util.HashSet;
import java.util.List; import java.util.List;
public class SequenceHelper { public final class SequenceHelper {
public static void condenseSequences(Statement root) { public static void condenseSequences(Statement root) {

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler; package org.jetbrains.java.decompiler.modules.decompiler;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class SwitchHelper { public final class SwitchHelper {
public static void simplify(SwitchStatement switchStatement) { public static void simplify(SwitchStatement switchStatement) {
SwitchExprent switchExprent = (SwitchExprent)switchStatement.getHeadexprent(); SwitchExprent switchExprent = (SwitchExprent)switchStatement.getHeadexprent();
Exprent value = switchExprent.getValue(); Exprent value = switchExprent.getValue();

@ -18,7 +18,7 @@ import org.jetbrains.java.decompiler.util.InterpreterUtil;
import java.util.*; import java.util.*;
import java.util.Map.Entry; import java.util.Map.Entry;
public class ExceptionDeobfuscator { public final class ExceptionDeobfuscator {
private static final class Range { private static final class Range {
private final BasicBlock handler; private final BasicBlock handler;

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.deobfuscator; package org.jetbrains.java.decompiler.modules.decompiler.deobfuscator;
import org.jetbrains.java.decompiler.modules.decompiler.StatEdge; import org.jetbrains.java.decompiler.modules.decompiler.StatEdge;
@ -10,7 +10,7 @@ import java.util.HashSet;
import java.util.Set; import java.util.Set;
public class IrreducibleCFGDeobfuscator { public final class IrreducibleCFGDeobfuscator {
public static boolean isStatementIrreducible(Statement statement) { public static boolean isStatementIrreducible(Statement statement) {

@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.exps; package org.jetbrains.java.decompiler.modules.decompiler.exps;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -13,7 +13,7 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
public class ExprUtil { public final class ExprUtil {
public static List<VarVersionPair> getSyntheticParametersMask(String className, String descriptor, int parameters) { public static List<VarVersionPair> getSyntheticParametersMask(String className, String descriptor, int parameters) {
ClassNode node = DecompilerContext.getClassProcessor().getMapRootClasses().get(className); ClassNode node = DecompilerContext.getClassProcessor().getMapRootClasses().get(className);
return node != null ? getSyntheticParametersMask(node, descriptor, parameters) : null; return node != null ? getSyntheticParametersMask(node, descriptor, parameters) : null;

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.stats; package org.jetbrains.java.decompiler.modules.decompiler.stats;
import org.jetbrains.java.decompiler.main.rels.ClassWrapper; import org.jetbrains.java.decompiler.main.rels.ClassWrapper;
@ -8,7 +8,7 @@ import org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent;
import org.jetbrains.java.decompiler.modules.decompiler.exps.VarExprent; import org.jetbrains.java.decompiler.modules.decompiler.exps.VarExprent;
import org.jetbrains.java.decompiler.modules.decompiler.vars.VarVersionPair; import org.jetbrains.java.decompiler.modules.decompiler.vars.VarVersionPair;
public class Statements { public final class Statements {
public static Statement findFirstData(Statement stat) { public static Statement findFirstData(Statement stat) {
if (stat.getExprents() != null) { if (stat.getExprents() != null) {
return stat; return stat;

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.struct.gen.generics; package org.jetbrains.java.decompiler.struct.gen.generics;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -9,7 +9,7 @@ import org.jetbrains.java.decompiler.util.TextUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class GenericMain { public final class GenericMain {
private static final String[] typeNames = { private static final String[] typeNames = {
"byte", "byte",

@ -1,4 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.util; package org.jetbrains.java.decompiler.util;
import java.io.*; import java.io.*;
@ -8,7 +8,7 @@ import java.util.List;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipFile; import java.util.zip.ZipFile;
public class InterpreterUtil { public final class InterpreterUtil {
public static final boolean IS_WINDOWS = System.getProperty("os.name", "").startsWith("Windows"); public static final boolean IS_WINDOWS = System.getProperty("os.name", "").startsWith("Windows");
public static final int[] EMPTY_INT_ARRAY = new int[0]; public static final int[] EMPTY_INT_ARRAY = new int[0];

@ -1,6 +1,4 @@
/* // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
* Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
package org.jetbrains.java.decompiler.util; package org.jetbrains.java.decompiler.util;
import org.jetbrains.java.decompiler.code.CodeConstants; import org.jetbrains.java.decompiler.code.CodeConstants;
@ -12,7 +10,7 @@ import org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashSet; import java.util.HashSet;
public class TextUtil { public final class TextUtil {
private static final HashSet<String> KEYWORDS = new HashSet<>(Arrays.asList( private static final HashSet<String> KEYWORDS = new HashSet<>(Arrays.asList(
"abstract", "default", "if", "private", "this", "boolean", "do", "implements", "protected", "throw", "break", "double", "import", "abstract", "default", "if", "private", "this", "boolean", "do", "implements", "protected", "throw", "break", "double", "import",
"public", "throws", "byte", "else", "instanceof", "return", "transient", "case", "extends", "int", "short", "try", "catch", "final", "public", "throws", "byte", "else", "instanceof", "return", "transient", "case", "extends", "int", "short", "try", "catch", "final",

Loading…
Cancel
Save