diff options
author | Roman Shevchenko <roman.shevchenko@jetbrains.com> | 2014-09-03 13:00:51 +0400 |
---|---|---|
committer | Roman Shevchenko <roman.shevchenko@jetbrains.com> | 2014-09-03 13:21:31 +0400 |
commit | f4f9e8be28142ebb4b85026eef6505055a31b68a (patch) | |
tree | 929725d27e5e5f663881d8679459dac718a5f5b8 /src/org/jetbrains/java/decompiler/main/rels | |
parent | 646f1c3f216395814e9e81576e3099e38df10c41 (diff) | |
download | fernflower-f4f9e8be28142ebb4b85026eef6505055a31b68a.tar fernflower-f4f9e8be28142ebb4b85026eef6505055a31b68a.tar.gz fernflower-f4f9e8be28142ebb4b85026eef6505055a31b68a.tar.lz fernflower-f4f9e8be28142ebb4b85026eef6505055a31b68a.tar.xz fernflower-f4f9e8be28142ebb4b85026eef6505055a31b68a.zip |
java-decompiler: cleanups
- better signatures
- accurate suppression
- unused symbols
- typos
Diffstat (limited to 'src/org/jetbrains/java/decompiler/main/rels')
3 files changed, 13 insertions, 12 deletions
diff --git a/src/org/jetbrains/java/decompiler/main/rels/ClassWrapper.java b/src/org/jetbrains/java/decompiler/main/rels/ClassWrapper.java index cbaf227..ae251b9 100644 --- a/src/org/jetbrains/java/decompiler/main/rels/ClassWrapper.java +++ b/src/org/jetbrains/java/decompiler/main/rels/ClassWrapper.java @@ -36,17 +36,14 @@ import org.jetbrains.java.decompiler.util.VBStyleCollection; import java.io.IOException; import java.util.HashSet; +import java.util.Set; public class ClassWrapper { private StructClass classStruct; - - private HashSet<String> hideMembers = new HashSet<String>(); - + private Set<String> hiddenMembers = new HashSet<String>(); private VBStyleCollection<Exprent, String> staticFieldInitializers = new VBStyleCollection<Exprent, String>(); - private VBStyleCollection<Exprent, String> dynamicFieldInitializers = new VBStyleCollection<Exprent, String>(); - private VBStyleCollection<MethodWrapper, String> methods = new VBStyleCollection<MethodWrapper, String>(); @@ -54,7 +51,6 @@ public class ClassWrapper { this.classStruct = classStruct; } - @SuppressWarnings("deprecation") public void init() throws IOException { DecompilerContext.setProperty(DecompilerContext.CURRENT_CLASS, classStruct); @@ -111,7 +107,7 @@ public class ClassWrapper { if (System.currentTimeMillis() >= stopAt) { String message = "Processing time limit exceeded for method " + mt.getName() + ", execution interrupted."; DecompilerContext.getLogger().writeMessage(message, IFernflowerLogger.ERROR); - mtthread.stop(); + killThread(mtthread); isError = true; break; } @@ -180,6 +176,11 @@ public class ClassWrapper { DecompilerContext.getLogger().endClass(); } + @SuppressWarnings("deprecation") + private static void killThread(Thread thread) { + thread.stop(); + } + public MethodWrapper getMethodWrapper(String name, String descriptor) { return methods.getWithKey(InterpreterUtil.makeUniqueKey(name, descriptor)); } @@ -192,8 +193,8 @@ public class ClassWrapper { return methods; } - public HashSet<String> getHideMembers() { - return hideMembers; + public Set<String> getHiddenMembers() { + return hiddenMembers; } public VBStyleCollection<Exprent, String> getStaticFieldInitializers() { diff --git a/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java b/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java index 003bdc2..3757d7e 100644 --- a/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java +++ b/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java @@ -50,7 +50,7 @@ public class NestedClassProcessor { if (node.type == ClassNode.CLASS_LAMBDA && !node.lambda_information.is_method_reference) { ClassNode node_content = DecompilerContext.getClassProcessor().getMapRootClasses().get(node.classStruct.qualifiedName); if (node_content != null && node_content.wrapper != null) { - node_content.wrapper.getHideMembers().add(node.lambda_information.content_method_key); + node_content.wrapper.getHiddenMembers().add(node.lambda_information.content_method_key); } } @@ -528,7 +528,7 @@ public class NestedClassProcessor { // hide synthetic field if (clnode == child) { // fields higher up the chain were already handled with their classes StructField fd = child.classStruct.getFields().getWithKey(entr.getKey()); - child.wrapper.getHideMembers().add(InterpreterUtil.makeUniqueKey(fd.getName(), fd.getDescriptor())); + child.wrapper.getHiddenMembers().add(InterpreterUtil.makeUniqueKey(fd.getName(), fd.getDescriptor())); } } } diff --git a/src/org/jetbrains/java/decompiler/main/rels/NestedMemberAccess.java b/src/org/jetbrains/java/decompiler/main/rels/NestedMemberAccess.java index f61de85..7e5eaa5 100644 --- a/src/org/jetbrains/java/decompiler/main/rels/NestedMemberAccess.java +++ b/src/org/jetbrains/java/decompiler/main/rels/NestedMemberAccess.java @@ -440,7 +440,7 @@ public class NestedMemberAccess { } } if (hide) { - node.wrapper.getHideMembers().add(InterpreterUtil.makeUniqueKey(invexpr.getName(), invexpr.getStringDescriptor())); + node.wrapper.getHiddenMembers().add(InterpreterUtil.makeUniqueKey(invexpr.getName(), invexpr.getStringDescriptor())); } } |