java-decompiler: cleanups
- better signatures - accurate suppression - unused symbols - typos
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user