summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-09-01 16:08:53 +0400
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-09-01 16:08:53 +0400
commit984af2e7d0e7b8fd420800f87251d8ccd2df8681 (patch)
treedc28c5a6aed647e73a53430a2a5d083246468492
parent31045317298614f5cc50d851fe6f32cdc98d7c31 (diff)
downloadfernflower-984af2e7d0e7b8fd420800f87251d8ccd2df8681.tar
fernflower-984af2e7d0e7b8fd420800f87251d8ccd2df8681.tar.gz
fernflower-984af2e7d0e7b8fd420800f87251d8ccd2df8681.tar.lz
fernflower-984af2e7d0e7b8fd420800f87251d8ccd2df8681.tar.xz
fernflower-984af2e7d0e7b8fd420800f87251d8ccd2df8681.zip
java-decompiler: post-import cleanup (typos)
-rw-r--r--src/org/jetbrains/java/decompiler/main/AssertProcessor.java2
-rw-r--r--src/org/jetbrains/java/decompiler/main/ClassReference14Processor.java2
-rw-r--r--src/org/jetbrains/java/decompiler/main/ClassWriter.java12
-rw-r--r--src/org/jetbrains/java/decompiler/main/ClassesProcessor.java10
-rw-r--r--src/org/jetbrains/java/decompiler/main/DecompilerContext.java78
-rw-r--r--src/org/jetbrains/java/decompiler/main/EnumProcessor.java2
-rw-r--r--src/org/jetbrains/java/decompiler/main/Fernflower.java6
-rw-r--r--src/org/jetbrains/java/decompiler/main/InitializerProcessor.java2
-rw-r--r--src/org/jetbrains/java/decompiler/main/collectors/ImportCollector.java4
-rw-r--r--src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java8
-rw-r--r--src/org/jetbrains/java/decompiler/main/rels/ClassWrapper.java6
-rw-r--r--src/org/jetbrains/java/decompiler/main/rels/LambdaProcessor.java2
-rw-r--r--src/org/jetbrains/java/decompiler/main/rels/MethodProcessorThread.java2
-rw-r--r--src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java2
-rw-r--r--src/org/jetbrains/java/decompiler/main/rels/NestedMemberAccess.java2
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/ExitHelper.java6
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java4
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java2
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/MergeHelper.java6
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/SecondaryFunctionsHelper.java2
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/SequenceHelper.java2
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/SimplifyExprentsHelper.java6
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/exps/AnnotationExprent.java2
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssignmentExprent.java2
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java2
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/exps/Exprent.java2
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/exps/FieldExprent.java8
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java12
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/exps/NewExprent.java18
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/exps/VarExprent.java2
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/stats/BasicBlockStatement.java4
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchAllStatement.java6
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchStatement.java4
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statement.java2
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/stats/SwitchStatement.java2
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarDefinitionHelper.java4
-rw-r--r--src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarVersionsProcessor.java2
-rw-r--r--src/org/jetbrains/java/decompiler/struct/gen/generics/GenericMain.java4
-rw-r--r--test/org/jetbrains/java/decompiler/SingleClassesTest.java2
39 files changed, 115 insertions, 131 deletions
diff --git a/src/org/jetbrains/java/decompiler/main/AssertProcessor.java b/src/org/jetbrains/java/decompiler/main/AssertProcessor.java
index 265ca5c..fcef8d7 100644
--- a/src/org/jetbrains/java/decompiler/main/AssertProcessor.java
+++ b/src/org/jetbrains/java/decompiler/main/AssertProcessor.java
@@ -191,7 +191,7 @@ public class AssertProcessor {
AssertExprent asexpr = new AssertExprent(lstParams);
Statement newstat = new BasicBlockStatement(new BasicBlock(
- DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
+ DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
newstat.setExprents(Arrays.asList(new Exprent[]{asexpr}));
Statement first = stat.getFirst();
diff --git a/src/org/jetbrains/java/decompiler/main/ClassReference14Processor.java b/src/org/jetbrains/java/decompiler/main/ClassReference14Processor.java
index 937d59b..c912bf7 100644
--- a/src/org/jetbrains/java/decompiler/main/ClassReference14Processor.java
+++ b/src/org/jetbrains/java/decompiler/main/ClassReference14Processor.java
@@ -263,7 +263,7 @@ public class ClassReference14Processor {
((ConstExprent)headexpr.getLstOperands().get(1)).getConsttype().equals(VarType.VARTYPE_NULL)) {
FieldExprent field = (FieldExprent)headexpr.getLstOperands().get(0);
- ClassNode fieldnode = DecompilerContext.getClassprocessor().getMapRootClasses().get(field.getClassname());
+ ClassNode fieldnode = DecompilerContext.getClassProcessor().getMapRootClasses().get(field.getClassname());
if (fieldnode != null && fieldnode.classStruct.qualifiedName.equals(wrapper.getClassStruct().qualifiedName)) { // source class
StructField fd =
diff --git a/src/org/jetbrains/java/decompiler/main/ClassWriter.java b/src/org/jetbrains/java/decompiler/main/ClassWriter.java
index d16c203..5258dee 100644
--- a/src/org/jetbrains/java/decompiler/main/ClassWriter.java
+++ b/src/org/jetbrains/java/decompiler/main/ClassWriter.java
@@ -122,8 +122,8 @@ public class ClassWriter {
boolean lambda_to_anonymous = DecompilerContext.getOption(IFernflowerPreferences.LAMBDA_TO_ANONYMOUS_CLASS);
- ClassNode nodeold = (ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASSNODE);
- DecompilerContext.setProperty(DecompilerContext.CURRENT_CLASSNODE, node);
+ ClassNode nodeold = (ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASS_NODE);
+ DecompilerContext.setProperty(DecompilerContext.CURRENT_CLASS_NODE, node);
ClassWrapper wrapper = node_content.wrapper;
StructClass cl = wrapper.getClassStruct();
@@ -206,7 +206,7 @@ public class ClassWriter {
writer.flush();
}
- DecompilerContext.setProperty(DecompilerContext.CURRENT_CLASSNODE, nodeold);
+ DecompilerContext.setProperty(DecompilerContext.CURRENT_CLASS_NODE, nodeold);
DecompilerContext.getLogger().endWriteClass();
}
@@ -216,8 +216,8 @@ public class ClassWriter {
ClassWrapper wrapper = node.wrapper;
StructClass cl = wrapper.getClassStruct();
- ClassNode nodeold = (ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASSNODE);
- DecompilerContext.setProperty(DecompilerContext.CURRENT_CLASSNODE, node);
+ ClassNode nodeold = (ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASS_NODE);
+ DecompilerContext.setProperty(DecompilerContext.CURRENT_CLASS_NODE, node);
// last minute processing
invokeProcessors(node);
@@ -329,7 +329,7 @@ public class ClassWriter {
}
writer.flush();
- DecompilerContext.setProperty(DecompilerContext.CURRENT_CLASSNODE, nodeold);
+ DecompilerContext.setProperty(DecompilerContext.CURRENT_CLASS_NODE, nodeold);
DecompilerContext.getLogger().endWriteClass();
}
diff --git a/src/org/jetbrains/java/decompiler/main/ClassesProcessor.java b/src/org/jetbrains/java/decompiler/main/ClassesProcessor.java
index f4993f0..b822021 100644
--- a/src/org/jetbrains/java/decompiler/main/ClassesProcessor.java
+++ b/src/org/jetbrains/java/decompiler/main/ClassesProcessor.java
@@ -243,15 +243,15 @@ public class ClassesProcessor {
}
try {
- DecompilerContext.setImpcollector(new ImportCollector(root));
- DecompilerContext.setCountercontainer(new CounterContainer());
+ DecompilerContext.setImportCollector(new ImportCollector(root));
+ DecompilerContext.setCounterContainer(new CounterContainer());
// lambda processing
LambdaProcessor lambda_proc = new LambdaProcessor();
lambda_proc.processClass(root);
// add simple class names to implicit import
- addClassnameToImport(root, DecompilerContext.getImpcollector());
+ addClassnameToImport(root, DecompilerContext.getImportCollector());
// build wrappers for all nested classes
// that's where the actual processing takes place
initWrappers(root);
@@ -277,9 +277,9 @@ public class ClassesProcessor {
outwriter.write(DecompilerContext.getNewLineSeparator());
}
- DecompilerContext.setProperty(DecompilerContext.CURRENT_CLASSNODE, root);
+ DecompilerContext.setProperty(DecompilerContext.CURRENT_CLASS_NODE, root);
- DecompilerContext.getImpcollector().writeImports(outwriter);
+ DecompilerContext.getImportCollector().writeImports(outwriter);
outwriter.write(DecompilerContext.getNewLineSeparator());
outwriter.write(strwriter.toString());
diff --git a/src/org/jetbrains/java/decompiler/main/DecompilerContext.java b/src/org/jetbrains/java/decompiler/main/DecompilerContext.java
index b95d2d0..54c426b 100644
--- a/src/org/jetbrains/java/decompiler/main/DecompilerContext.java
+++ b/src/org/jetbrains/java/decompiler/main/DecompilerContext.java
@@ -27,33 +27,23 @@ import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
-
public class DecompilerContext {
-
public static final String CURRENT_CLASS = "CURRENT_CLASS";
+ public static final String CURRENT_CLASS_NODE = "CURRENT_CLASS_NODE";
public static final String CURRENT_METHOD = "CURRENT_METHOD";
public static final String CURRENT_METHOD_DESCRIPTOR = "CURRENT_METHOD_DESCRIPTOR";
- public static final String CURRENT_VAR_PROCESSOR = "CURRENT_VAR_PROCESSOR";
-
- public static final String CURRENT_CLASSNODE = "CURRENT_CLASSNODE";
public static final String CURRENT_METHOD_WRAPPER = "CURRENT_METHOD_WRAPPER";
+ public static final String CURRENT_VAR_PROCESSOR = "CURRENT_VAR_PROCESSOR";
private static ThreadLocal<DecompilerContext> currentContext = new ThreadLocal<DecompilerContext>();
private final Map<String, Object> properties;
-
- private StructContext structcontext;
-
- private ImportCollector impcollector;
-
- private VarNamesCollector varncollector;
-
- private CounterContainer countercontainer;
-
- private ClassesProcessor classprocessor;
-
- private PoolInterceptor poolinterceptor;
-
+ private StructContext structContext;
+ private ImportCollector importCollector;
+ private VarNamesCollector varNamescollector;
+ private CounterContainer counterContainer;
+ private ClassesProcessor classProcessor;
+ private PoolInterceptor poolInterceptor;
private IFernflowerLogger logger;
private DecompilerContext(Map<String, Object> properties) {
@@ -88,52 +78,52 @@ public class DecompilerContext {
return "1".equals(getCurrentContext().properties.get(key));
}
- public static ImportCollector getImpcollector() {
- return getCurrentContext().impcollector;
+ public static ImportCollector getImportCollector() {
+ return getCurrentContext().importCollector;
}
- public static void setImpcollector(ImportCollector impcollector) {
- getCurrentContext().impcollector = impcollector;
+ public static void setImportCollector(ImportCollector importCollector) {
+ getCurrentContext().importCollector = importCollector;
}
- public static VarNamesCollector getVarncollector() {
- return getCurrentContext().varncollector;
+ public static VarNamesCollector getVarNamesCollector() {
+ return getCurrentContext().varNamescollector;
}
- public static void setVarncollector(VarNamesCollector varncollector) {
- getCurrentContext().varncollector = varncollector;
+ public static void setVarNamesCollector(VarNamesCollector varNamesCollector) {
+ getCurrentContext().varNamescollector = varNamesCollector;
}
- public static StructContext getStructcontext() {
- return getCurrentContext().structcontext;
+ public static StructContext getStructContext() {
+ return getCurrentContext().structContext;
}
- public static void setStructcontext(StructContext structcontext) {
- getCurrentContext().structcontext = structcontext;
+ public static void setStructContext(StructContext structContext) {
+ getCurrentContext().structContext = structContext;
}
- public static CounterContainer getCountercontainer() {
- return getCurrentContext().countercontainer;
+ public static CounterContainer getCounterContainer() {
+ return getCurrentContext().counterContainer;
}
- public static void setCountercontainer(CounterContainer countercontainer) {
- getCurrentContext().countercontainer = countercontainer;
+ public static void setCounterContainer(CounterContainer counterContainer) {
+ getCurrentContext().counterContainer = counterContainer;
}
- public static ClassesProcessor getClassprocessor() {
- return getCurrentContext().classprocessor;
+ public static ClassesProcessor getClassProcessor() {
+ return getCurrentContext().classProcessor;
}
- public static void setClassprocessor(ClassesProcessor classprocessor) {
- getCurrentContext().classprocessor = classprocessor;
+ public static void setClassProcessor(ClassesProcessor classProcessor) {
+ getCurrentContext().classProcessor = classProcessor;
}
public static PoolInterceptor getPoolInterceptor() {
- return getCurrentContext().poolinterceptor;
+ return getCurrentContext().poolInterceptor;
}
public static void setPoolInterceptor(PoolInterceptor poolinterceptor) {
- getCurrentContext().poolinterceptor = poolinterceptor;
+ getCurrentContext().poolInterceptor = poolinterceptor;
}
public static IFernflowerLogger getLogger() {
@@ -141,13 +131,6 @@ public class DecompilerContext {
}
public static void setLogger(IFernflowerLogger logger) {
- getCurrentContext().logger = logger;
- setLogSeverity();
- }
-
- private static void setLogSeverity() {
- IFernflowerLogger logger = getCurrentContext().logger;
-
if (logger != null) {
String severity = (String)getProperty(IFernflowerPreferences.LOG_LEVEL);
if (severity != null) {
@@ -157,6 +140,7 @@ public class DecompilerContext {
}
}
}
+ getCurrentContext().logger = logger;
}
public static String getNewLineSeparator() {
diff --git a/src/org/jetbrains/java/decompiler/main/EnumProcessor.java b/src/org/jetbrains/java/decompiler/main/EnumProcessor.java
index e991827..93746b7 100644
--- a/src/org/jetbrains/java/decompiler/main/EnumProcessor.java
+++ b/src/org/jetbrains/java/decompiler/main/EnumProcessor.java
@@ -88,7 +88,7 @@ public class EnumProcessor {
if (initializer != null && initializer.type == Exprent.EXPRENT_NEW) {
NewExprent nexpr = (NewExprent)initializer;
if (nexpr.isAnonymous()) {
- ClassNode child = DecompilerContext.getClassprocessor().getMapRootClasses().get(nexpr.getNewtype().value);
+ ClassNode child = DecompilerContext.getClassProcessor().getMapRootClasses().get(nexpr.getNewtype().value);
hideDummyFieldInConstant(child.wrapper);
}
}
diff --git a/src/org/jetbrains/java/decompiler/main/Fernflower.java b/src/org/jetbrains/java/decompiler/main/Fernflower.java
index 88655a9..6d60f6e 100644
--- a/src/org/jetbrains/java/decompiler/main/Fernflower.java
+++ b/src/org/jetbrains/java/decompiler/main/Fernflower.java
@@ -44,7 +44,7 @@ public class Fernflower implements IDecompiledData {
structcontext = new StructContext(saver, this, new LazyLoader(provider));
DecompilerContext.initContext(propertiesCustom);
- DecompilerContext.setCountercontainer(new CounterContainer());
+ DecompilerContext.setCounterContainer(new CounterContainer());
}
public void decompileContext() {
@@ -55,8 +55,8 @@ public class Fernflower implements IDecompiledData {
clprocessor = new ClassesProcessor(structcontext);
- DecompilerContext.setClassprocessor(clprocessor);
- DecompilerContext.setStructcontext(structcontext);
+ DecompilerContext.setClassProcessor(clprocessor);
+ DecompilerContext.setStructContext(structcontext);
structcontext.saveContext();
}
diff --git a/src/org/jetbrains/java/decompiler/main/InitializerProcessor.java b/src/org/jetbrains/java/decompiler/main/InitializerProcessor.java
index e401adc..59689dc 100644
--- a/src/org/jetbrains/java/decompiler/main/InitializerProcessor.java
+++ b/src/org/jetbrains/java/decompiler/main/InitializerProcessor.java
@@ -163,7 +163,7 @@ public class InitializerProcessor {
StructClass cl = wrapper.getClassStruct();
- boolean isAnonymous = DecompilerContext.getClassprocessor().getMapRootClasses().get(cl.qualifiedName).type == ClassNode.CLASS_ANONYMOUS;
+ boolean isAnonymous = DecompilerContext.getClassProcessor().getMapRootClasses().get(cl.qualifiedName).type == ClassNode.CLASS_ANONYMOUS;
List<List<Exprent>> lstFirst = new ArrayList<List<Exprent>>();
List<MethodWrapper> lstMethWrappers = new ArrayList<MethodWrapper>();
diff --git a/src/org/jetbrains/java/decompiler/main/collectors/ImportCollector.java b/src/org/jetbrains/java/decompiler/main/collectors/ImportCollector.java
index f45bf27..6480963 100644
--- a/src/org/jetbrains/java/decompiler/main/collectors/ImportCollector.java
+++ b/src/org/jetbrains/java/decompiler/main/collectors/ImportCollector.java
@@ -55,7 +55,7 @@ public class ImportCollector {
public String getShortName(String fullname, boolean imported) {
- ClassesProcessor clproc = DecompilerContext.getClassprocessor();
+ ClassesProcessor clproc = DecompilerContext.getClassProcessor();
ClassNode node = clproc.getMapRootClasses().get(fullname.replace('.', '/'));
String retname = null;
@@ -91,7 +91,7 @@ public class ImportCollector {
npackage = fullname.substring(0, lastpoint);
}
- StructContext context = DecompilerContext.getStructcontext();
+ StructContext context = DecompilerContext.getStructContext();
boolean existsDefaultClass = (context.getClass(currentPackageSlash + nshort) != null
&& !npackage.equals(currentPackagePoint)) // current package
diff --git a/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java b/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java
index 2b55d24..2052a99 100644
--- a/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java
+++ b/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java
@@ -30,13 +30,13 @@ public interface IFernflowerPreferences {
String DECOMPILE_GENERIC_SIGNATURES = "dgs";
String NO_EXCEPTIONS_RETURN = "ner";
String DECOMPILE_ENUM = "den";
- String REMOVE_GETCLASS_NEW = "rgn";
+ String REMOVE_GET_CLASS_NEW = "rgn";
String LITERALS_AS_IS = "lit";
String BOOLEAN_TRUE_ONE = "bto";
String ASCII_STRING_CHARACTERS = "asc";
String SYNTHETIC_NOT_SET = "nns";
String UNDEFINED_PARAM_TYPE_OBJECT = "uto";
- String USE_DEBUG_VARNAMES = "udv";
+ String USE_DEBUG_VAR_NAMES = "udv";
String REMOVE_EMPTY_RANGES = "rer";
String FINALLY_DEINLINE = "fdi";
String IDEA_NOT_NULL_ANNOTATION = "inn";
@@ -63,13 +63,13 @@ public interface IFernflowerPreferences {
put(DECOMPILE_GENERIC_SIGNATURES, "0");
put(NO_EXCEPTIONS_RETURN, "1");
put(DECOMPILE_ENUM, "1");
- put(REMOVE_GETCLASS_NEW, "1");
+ put(REMOVE_GET_CLASS_NEW, "1");
put(LITERALS_AS_IS, "0");
put(BOOLEAN_TRUE_ONE, "1");
put(ASCII_STRING_CHARACTERS, "0");
put(SYNTHETIC_NOT_SET, "1");
put(UNDEFINED_PARAM_TYPE_OBJECT, "1");
- put(USE_DEBUG_VARNAMES, "1");
+ put(USE_DEBUG_VAR_NAMES, "1");
put(REMOVE_EMPTY_RANGES, "1");
put(FINALLY_DEINLINE, "1");
put(IDEA_NOT_NULL_ANNOTATION, "1");
diff --git a/src/org/jetbrains/java/decompiler/main/rels/ClassWrapper.java b/src/org/jetbrains/java/decompiler/main/rels/ClassWrapper.java
index 0991fa4..2cadeae 100644
--- a/src/org/jetbrains/java/decompiler/main/rels/ClassWrapper.java
+++ b/src/org/jetbrains/java/decompiler/main/rels/ClassWrapper.java
@@ -74,10 +74,10 @@ public class ClassWrapper {
DecompilerContext.getLogger().startMethod(mt.getName() + " " + mt.getDescriptor());
VarNamesCollector vc = new VarNamesCollector();
- DecompilerContext.setVarncollector(vc);
+ DecompilerContext.setVarNamesCollector(vc);
CounterContainer counter = new CounterContainer();
- DecompilerContext.setCountercontainer(counter);
+ DecompilerContext.setCounterContainer(counter);
DecompilerContext.setProperty(DecompilerContext.CURRENT_METHOD, mt);
DecompilerContext.setProperty(DecompilerContext.CURRENT_METHOD_DESCRIPTOR, MethodDescriptor.parseDescriptor(mt.getDescriptor()));
@@ -165,7 +165,7 @@ public class ClassWrapper {
varproc.refreshVarNames(new VarNamesCollector(setFieldNames));
// if debug information present and should be used
- if (DecompilerContext.getOption(IFernflowerPreferences.USE_DEBUG_VARNAMES)) {
+ if (DecompilerContext.getOption(IFernflowerPreferences.USE_DEBUG_VAR_NAMES)) {
StructLocalVariableTableAttribute attr = (StructLocalVariableTableAttribute)mt.getAttributes().getWithKey(
StructGeneralAttribute.ATTRIBUTE_LOCAL_VARIABLE_TABLE);
diff --git a/src/org/jetbrains/java/decompiler/main/rels/LambdaProcessor.java b/src/org/jetbrains/java/decompiler/main/rels/LambdaProcessor.java
index 3150894..743ce12 100644
--- a/src/org/jetbrains/java/decompiler/main/rels/LambdaProcessor.java
+++ b/src/org/jetbrains/java/decompiler/main/rels/LambdaProcessor.java
@@ -54,7 +54,7 @@ public class LambdaProcessor {
public boolean hasLambda(ClassNode node) throws IOException {
- ClassesProcessor clprocessor = DecompilerContext.getClassprocessor();
+ ClassesProcessor clprocessor = DecompilerContext.getClassProcessor();
StructClass cl = node.classStruct;
if (cl.getBytecodeVersion() < CodeConstants.BYTECODE_JAVA_8) { // lamda beginning with Java 8
diff --git a/src/org/jetbrains/java/decompiler/main/rels/MethodProcessorThread.java b/src/org/jetbrains/java/decompiler/main/rels/MethodProcessorThread.java
index 0ac7c3f..426f143 100644
--- a/src/org/jetbrains/java/decompiler/main/rels/MethodProcessorThread.java
+++ b/src/org/jetbrains/java/decompiler/main/rels/MethodProcessorThread.java
@@ -124,7 +124,7 @@ public class MethodProcessorThread implements Runnable {
DeadCodeHelper.mergeBasicBlocks(graph);
- DecompilerContext.getCountercontainer().setCounter(CounterContainer.VAR_COUNTER, mt.getLocalVariables());
+ DecompilerContext.getCounterContainer().setCounter(CounterContainer.VAR_COUNTER, mt.getLocalVariables());
//DotExporter.toDotFile(graph, new File("c:\\Temp\\fern3.dot"), true);
//System.out.println(graph.toString());
diff --git a/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java b/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java
index e637632..3eec983 100644
--- a/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java
+++ b/src/org/jetbrains/java/decompiler/main/rels/NestedClassProcessor.java
@@ -48,7 +48,7 @@ public class NestedClassProcessor {
// hide synthetic lambda content methods
if (node.type == ClassNode.CLASS_LAMBDA && !node.lambda_information.is_method_reference) {
- ClassNode node_content = DecompilerContext.getClassprocessor().getMapRootClasses().get(node.classStruct.qualifiedName);
+ 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);
}
diff --git a/src/org/jetbrains/java/decompiler/main/rels/NestedMemberAccess.java b/src/org/jetbrains/java/decompiler/main/rels/NestedMemberAccess.java
index 8551856..c1251a7 100644
--- a/src/org/jetbrains/java/decompiler/main/rels/NestedMemberAccess.java
+++ b/src/org/jetbrains/java/decompiler/main/rels/NestedMemberAccess.java
@@ -329,7 +329,7 @@ public class NestedMemberAccess {
private Exprent replaceAccessExprent(ClassNode caller, MethodWrapper methdest, InvocationExprent invexpr) {
- ClassNode node = DecompilerContext.getClassprocessor().getMapRootClasses().get(invexpr.getClassname());
+ ClassNode node = DecompilerContext.getClassProcessor().getMapRootClasses().get(invexpr.getClassname());
MethodWrapper methsource = null;
if (node != null && node.wrapper != null) {
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/ExitHelper.java b/src/org/jetbrains/java/decompiler/modules/decompiler/ExitHelper.java
index 2eddd57..af73584 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/ExitHelper.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/ExitHelper.java
@@ -117,7 +117,7 @@ public class ExitHelper {
dest = isExitEdge(ifedge);
if (dest != null) {
BasicBlockStatement bstat = new BasicBlockStatement(new BasicBlock(
- DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
+ DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
bstat.setExprents(DecHelper.copyExprentList(dest.getExprents()));
ifst.getFirst().removeSuccessor(ifedge);
@@ -152,7 +152,7 @@ public class ExitHelper {
stat.removeSuccessor(destedge);
BasicBlockStatement bstat = new BasicBlockStatement(new BasicBlock(
- DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
+ DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
bstat.setExprents(DecHelper.copyExprentList(dest.getExprents()));
StatEdge oldexitedge = dest.getAllSuccessorEdges().get(0);
@@ -315,7 +315,7 @@ public class ExitHelper {
// build a new statement with the single instruction 'return'
BasicBlockStatement bstat = new BasicBlockStatement(new BasicBlock(
- DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
+ DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
ExitExprent retexpr = new ExitExprent(ExitExprent.EXIT_RETURN, null,
((MethodDescriptor)DecompilerContext
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java b/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java
index 50b04a9..0dc660d 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java
@@ -708,7 +708,7 @@ public class ExprProcessor implements CodeConstants {
else if (tp == CodeConstants.TYPE_OBJECT) {
String ret = buildJavaClassName(type.value);
if (getShort) {
- ret = DecompilerContext.getImpcollector().getShortName(ret);
+ ret = DecompilerContext.getImportCollector().getShortName(ret);
}
if (ret == null) {
@@ -791,7 +791,7 @@ public class ExprProcessor implements CodeConstants {
if (res.contains("$")) { // attempt to invoke foreign member
// classes correctly
- StructClass cl = DecompilerContext.getStructcontext().getClass(name);
+ StructClass cl = DecompilerContext.getStructContext().getClass(name);
if (cl == null || !cl.isOwn()) {
res = res.replace('$', '.');
}
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java b/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java
index 53be24b..6198da1 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/FinallyProcessor.java
@@ -103,7 +103,7 @@ public class FinallyProcessor {
}
else {
- int varindex = DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER);
+ int varindex = DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER);
insertSemaphore(graph, getAllBasicBlocks(fin.getFirst()), head, handler, varindex, inf, bytecode_version);
finallyBlockIDs.put(handler.id, varindex);
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/MergeHelper.java b/src/org/jetbrains/java/decompiler/modules/decompiler/MergeHelper.java
index 2d2f8b5..71d3d79 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/MergeHelper.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/MergeHelper.java
@@ -184,7 +184,7 @@ public class MergeHelper {
// remove empty if statement as it is now part of the loop
if (firstif == stat.getFirst()) {
BasicBlockStatement bstat = new BasicBlockStatement(new BasicBlock(
- DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
+ DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
bstat.setExprents(new ArrayList<Exprent>());
stat.replaceStatement(firstif, bstat);
}
@@ -223,7 +223,7 @@ public class MergeHelper {
if (firstif.getIfstat() == null) {
BasicBlockStatement bstat = new BasicBlockStatement(new BasicBlock(
- DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
+ DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
bstat.setExprents(new ArrayList<Exprent>());
ifedge.setSource(bstat);
@@ -381,7 +381,7 @@ public class MergeHelper {
if (stat == dostat.getFirst()) {
BasicBlockStatement bstat = new BasicBlockStatement(new BasicBlock(
- DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
+ DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
bstat.setExprents(new ArrayList<Exprent>());
dostat.replaceStatement(stat, bstat);
}
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/SecondaryFunctionsHelper.java b/src/org/jetbrains/java/decompiler/modules/decompiler/SecondaryFunctionsHelper.java
index 8dcf9d5..5643f22 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/SecondaryFunctionsHelper.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/SecondaryFunctionsHelper.java
@@ -299,7 +299,7 @@ public class SecondaryFunctionsHelper {
case FunctionExprent.FUNCTION_FCMPG:
case FunctionExprent.FUNCTION_DCMPL:
case FunctionExprent.FUNCTION_DCMPG:
- int var = DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER);
+ int var = DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER);
VarType type = lstOperands.get(0).getExprType();
VarProcessor processor = (VarProcessor)DecompilerContext.getProperty(DecompilerContext.CURRENT_VAR_PROCESSOR);
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/SequenceHelper.java b/src/org/jetbrains/java/decompiler/modules/decompiler/SequenceHelper.java
index 6ffa709..063d201 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/SequenceHelper.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/SequenceHelper.java
@@ -300,7 +300,7 @@ public class SequenceHelper {
destroyStatementContent(stat, false);
BasicBlockStatement bstat = new BasicBlockStatement(new BasicBlock(
- DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
+ DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
if (stat.getExprents() == null) {
bstat.setExprents(new ArrayList<Exprent>());
}
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/SimplifyExprentsHelper.java b/src/org/jetbrains/java/decompiler/modules/decompiler/SimplifyExprentsHelper.java
index 362a1e3..90ebe2f 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/SimplifyExprentsHelper.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/SimplifyExprentsHelper.java
@@ -137,7 +137,7 @@ public class SimplifyExprentsHelper {
}
// remove getClass() invocation, which is part of a qualified new
- if (DecompilerContext.getOption(IFernflowerPreferences.REMOVE_GETCLASS_NEW)) {
+ if (DecompilerContext.getOption(IFernflowerPreferences.REMOVE_GET_CLASS_NEW)) {
if (isQualifiedNewGetClass(current, next)) {
list.remove(index);
res = true;
@@ -516,7 +516,7 @@ public class SimplifyExprentsHelper {
nexpr.getConstructor().getLstParameters().get(0).equals(invexpr.getInstance())) {
String classname = nexpr.getNewtype().value;
- ClassNode node = DecompilerContext.getClassprocessor().getMapRootClasses().get(classname);
+ ClassNode node = DecompilerContext.getClassProcessor().getMapRootClasses().get(classname);
if (node != null && node.type != ClassNode.CLASS_ROOT) {
return true;
}
@@ -703,7 +703,7 @@ public class SimplifyExprentsHelper {
if (in.getInvocationTyp() == InvocationExprent.INVOKE_DYNAMIC) {
String lambda_class_name = cl.qualifiedName + in.getInvokeDynamicClassSuffix();
- ClassNode lambda_class = DecompilerContext.getClassprocessor().getMapRootClasses().get(lambda_class_name);
+ ClassNode lambda_class = DecompilerContext.getClassProcessor().getMapRootClasses().get(lambda_class_name);
if (lambda_class != null) { // real lambda class found, replace invocation with an anonymous class
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AnnotationExprent.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AnnotationExprent.java
index 91de531..9383d76 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AnnotationExprent.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AnnotationExprent.java
@@ -54,7 +54,7 @@ public class AnnotationExprent extends Exprent {
buffer.append(indstr);
buffer.append("@");
- buffer.append(DecompilerContext.getImpcollector().getShortName(ExprProcessor.buildJavaClassName(classname)));
+ buffer.append(DecompilerContext.getImportCollector().getShortName(ExprProcessor.buildJavaClassName(classname)));
if (!parnames.isEmpty()) {
buffer.append("(");
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssignmentExprent.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssignmentExprent.java
index e8b0b82..33d30e9 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssignmentExprent.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/AssignmentExprent.java
@@ -127,7 +127,7 @@ public class AssignmentExprent extends Exprent {
if (left.type == Exprent.EXPRENT_FIELD) { // first assignment to a final field. Field name without "this" in front of it
FieldExprent field = (FieldExprent)left;
if (field.isStatic()) {
- ClassNode node = ((ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASSNODE));
+ ClassNode node = ((ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASS_NODE));
if (node != null) {
StructClass cl = node.classStruct;
StructField fd = cl.getField(field.getName(), field.getDescriptor().descriptorString);
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java
index e61388d..7a50134 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ExitExprent.java
@@ -88,7 +88,7 @@ public class ExitExprent extends Exprent {
else {
MethodWrapper meth = (MethodWrapper)DecompilerContext.getProperty(DecompilerContext.CURRENT_METHOD_WRAPPER);
- ClassNode node = ((ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASSNODE));
+ ClassNode node = ((ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASS_NODE));
if (meth != null && node != null) {
StructExceptionsAttribute attr = (StructExceptionsAttribute)meth.methodStruct.getAttributes().getWithKey("Exceptions");
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/Exprent.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/Exprent.java
index a0518b1..99712d5 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/Exprent.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/Exprent.java
@@ -55,7 +55,7 @@ public class Exprent {
{
// set exprent id
- id = DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.EXPRENT_COUNTER);
+ id = DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.EXPRENT_COUNTER);
}
public int getPrecedence() {
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FieldExprent.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FieldExprent.java
index d57fcac..aa180b0 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FieldExprent.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/FieldExprent.java
@@ -98,9 +98,9 @@ public class FieldExprent extends Exprent {
if (isStatic) {
- ClassNode node = (ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASSNODE);
+ ClassNode node = (ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASS_NODE);
if (node == null || !classname.equals(node.classStruct.qualifiedName)) {
- buf.append(DecompilerContext.getImpcollector().getShortName(ExprProcessor.buildJavaClassName(classname)));
+ buf.append(DecompilerContext.getImportCollector().getShortName(ExprProcessor.buildJavaClassName(classname)));
buf.append(".");
}
}
@@ -126,10 +126,10 @@ public class FieldExprent extends Exprent {
}
if (super_qualifier != null) {
- StructClass current_class = ((ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASSNODE)).classStruct;
+ StructClass current_class = ((ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASS_NODE)).classStruct;
if (!super_qualifier.equals(current_class.qualifiedName)) {
- buf.append(DecompilerContext.getImpcollector().getShortName(ExprProcessor.buildJavaClassName(super_qualifier)));
+ buf.append(DecompilerContext.getImportCollector().getShortName(ExprProcessor.buildJavaClassName(super_qualifier)));
buf.append(".");
}
buf.append("super");
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java
index 439d331..1edebc9 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/InvocationExprent.java
@@ -225,9 +225,9 @@ public class InvocationExprent extends Exprent {
}
else if (isStatic) {
- ClassNode node = (ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASSNODE);
+ ClassNode node = (ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASS_NODE);
if (node == null || !classname.equals(node.classStruct.qualifiedName)) {
- buf.append(DecompilerContext.getImpcollector().getShortName(ExprProcessor.buildJavaClassName(classname)));
+ buf.append(DecompilerContext.getImportCollector().getShortName(ExprProcessor.buildJavaClassName(classname)));
}
}
else {
@@ -262,10 +262,10 @@ public class InvocationExprent extends Exprent {
if (functype == TYP_GENERAL) {
if (super_qualifier != null) {
- StructClass current_class = ((ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASSNODE)).classStruct;
+ StructClass current_class = ((ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASS_NODE)).classStruct;
if (!super_qualifier.equals(current_class.qualifiedName)) {
- buf.append(DecompilerContext.getImpcollector().getShortName(ExprProcessor.buildJavaClassName(super_qualifier)));
+ buf.append(DecompilerContext.getImportCollector().getShortName(ExprProcessor.buildJavaClassName(super_qualifier)));
buf.append(".");
}
buf.append("super");
@@ -330,7 +330,7 @@ public class InvocationExprent extends Exprent {
List<VarVersionPaar> sigFields = null;
boolean isEnum = false;
if (functype == TYP_INIT) {
- ClassNode newnode = DecompilerContext.getClassprocessor().getMapRootClasses().get(classname);
+ ClassNode newnode = DecompilerContext.getClassProcessor().getMapRootClasses().get(classname);
if (newnode != null) { // own class
if (newnode.wrapper != null) {
@@ -373,7 +373,7 @@ public class InvocationExprent extends Exprent {
Set<Integer> ret = new HashSet<Integer>();
- StructClass cstr = DecompilerContext.getStructcontext().getClass(classname);
+ StructClass cstr = DecompilerContext.getStructContext().getClass(classname);
if (cstr != null) {
List<MethodDescriptor> lstMethods = new ArrayList<MethodDescriptor>();
for (StructMethod meth : cstr.getMethods()) {
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/NewExprent.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/NewExprent.java
index cd4fbbd..395df1b 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/NewExprent.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/NewExprent.java
@@ -79,7 +79,7 @@ public class NewExprent extends Exprent {
lambda = false;
if (newtype.type == CodeConstants.TYPE_OBJECT && newtype.arraydim == 0) {
- ClassNode node = DecompilerContext.getClassprocessor().getMapRootClasses().get(newtype.value);
+ ClassNode node = DecompilerContext.getClassProcessor().getMapRootClasses().get(newtype.value);
if (node != null && (node.type == ClassNode.CLASS_ANONYMOUS || node.type == ClassNode.CLASS_LAMBDA)) {
anonymous = true;
@@ -94,7 +94,7 @@ public class NewExprent extends Exprent {
public VarType getExprType() {
if (anonymous) {
- ClassNode node = DecompilerContext.getClassprocessor().getMapRootClasses().get(newtype.value);
+ ClassNode node = DecompilerContext.getClassProcessor().getMapRootClasses().get(newtype.value);
return node.anonimousClassType;
}
@@ -177,7 +177,7 @@ public class NewExprent extends Exprent {
if (anonymous) {
- ClassNode child = DecompilerContext.getClassprocessor().getMapRootClasses().get(newtype.value);
+ ClassNode child = DecompilerContext.getClassProcessor().getMapRootClasses().get(newtype.value);
buf.append("(");
@@ -185,7 +185,7 @@ public class NewExprent extends Exprent {
InvocationExprent invsuper = child.superInvocation;
- ClassNode newnode = DecompilerContext.getClassprocessor().getMapRootClasses().get(invsuper.getClassname());
+ ClassNode newnode = DecompilerContext.getClassProcessor().getMapRootClasses().get(invsuper.getClassname());
List<VarVersionPaar> sigFields = null;
if (newnode != null) { // own class
@@ -239,7 +239,7 @@ public class NewExprent extends Exprent {
String typename = ExprProcessor.getCastTypeName(child.anonimousClassType);
if (enclosing != null) {
- ClassNode anonimousNode = DecompilerContext.getClassprocessor().getMapRootClasses().get(child.anonimousClassType.value);
+ ClassNode anonimousNode = DecompilerContext.getClassProcessor().getMapRootClasses().get(child.anonimousClassType.value);
if (anonimousNode != null) {
typename = anonimousNode.simpleName;
}
@@ -307,7 +307,7 @@ public class NewExprent extends Exprent {
List<Exprent> lstParameters = constructor.getLstParameters();
- ClassNode newnode = DecompilerContext.getClassprocessor().getMapRootClasses().get(constructor.getClassname());
+ ClassNode newnode = DecompilerContext.getClassProcessor().getMapRootClasses().get(constructor.getClassname());
List<VarVersionPaar> sigFields = null;
if (newnode != null) { // own class
@@ -354,7 +354,7 @@ public class NewExprent extends Exprent {
String typename = ExprProcessor.getTypeName(newtype);
if (enclosing != null) {
- ClassNode newNode = DecompilerContext.getClassprocessor().getMapRootClasses().get(newtype.value);
+ ClassNode newNode = DecompilerContext.getClassProcessor().getMapRootClasses().get(newtype.value);
if (newNode != null) {
typename = newNode.simpleName;
}
@@ -404,7 +404,7 @@ public class NewExprent extends Exprent {
private static String getQualifiedNewInstance(String classname, List<Exprent> lstParams, int indent) {
- ClassNode node = DecompilerContext.getClassprocessor().getMapRootClasses().get(classname);
+ ClassNode node = DecompilerContext.getClassProcessor().getMapRootClasses().get(classname);
if (node != null && node.type != ClassNode.CLASS_ROOT && (node.access & CodeConstants.ACC_STATIC) == 0) {
if (!lstParams.isEmpty()) {
@@ -415,7 +415,7 @@ public class NewExprent extends Exprent {
if (enclosing.type == Exprent.EXPRENT_VAR) {
VarExprent varEnclosing = (VarExprent)enclosing;
- StructClass current_class = ((ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASSNODE)).classStruct;
+ StructClass current_class = ((ClassNode)DecompilerContext.getProperty(DecompilerContext.CURRENT_CLASS_NODE)).classStruct;
String this_classname = varEnclosing.getProcessor().getThisvars().get(new VarVersionPaar(varEnclosing));
if (!current_class.qualifiedName.equals(this_classname)) {
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/VarExprent.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/VarExprent.java
index bef3631..709b6fe 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/VarExprent.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/VarExprent.java
@@ -87,7 +87,7 @@ public class VarExprent extends Exprent {
if (classdef) {
- ClassNode child = DecompilerContext.getClassprocessor().getMapRootClasses().get(vartype.value);
+ ClassNode child = DecompilerContext.getClassProcessor().getMapRootClasses().get(vartype.value);
StringWriter strwriter = new StringWriter();
BufferedWriter bufstrwriter = new BufferedWriter(strwriter);
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/BasicBlockStatement.java b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/BasicBlockStatement.java
index ddac0c5..91c1a4e 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/BasicBlockStatement.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/BasicBlockStatement.java
@@ -42,7 +42,7 @@ public class BasicBlockStatement extends Statement {
this.block = block;
id = block.id;
- CounterContainer coun = DecompilerContext.getCountercontainer();
+ CounterContainer coun = DecompilerContext.getCounterContainer();
if (id >= coun.getCounter(CounterContainer.STATEMENT_COUNTER)) {
coun.setCounter(CounterContainer.STATEMENT_COUNTER, id + 1);
}
@@ -73,7 +73,7 @@ public class BasicBlockStatement extends Statement {
public Statement getSimpleCopy() {
BasicBlock newblock = new BasicBlock(
- DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER));
+ DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER));
SimpleInstructionSequence seq = new SimpleInstructionSequence();
for (int i = 0; i < block.getSeq().length(); i++) {
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchAllStatement.java b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchAllStatement.java
index cf57d98..15af3c6 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchAllStatement.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchAllStatement.java
@@ -67,7 +67,7 @@ public class CatchAllStatement extends Statement {
}
}
- vars.add(new VarExprent(DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER),
+ vars.add(new VarExprent(DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER),
new VarType(CodeConstants.TYPE_OBJECT, 0, "java/lang/Throwable"),
(VarProcessor)DecompilerContext.getProperty(DecompilerContext.CURRENT_VAR_PROCESSOR)));
}
@@ -174,14 +174,14 @@ public class CatchAllStatement extends Statement {
cas.isFinally = this.isFinally;
if (this.monitor != null) {
- cas.monitor = new VarExprent(DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER),
+ cas.monitor = new VarExprent(DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER),
VarType.VARTYPE_INT,
(VarProcessor)DecompilerContext.getProperty(DecompilerContext.CURRENT_VAR_PROCESSOR));
}
if (!this.vars.isEmpty()) {
// FIXME: WTF??? vars?!
- vars.add(new VarExprent(DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER),
+ vars.add(new VarExprent(DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER),
new VarType(CodeConstants.TYPE_OBJECT, 0, "java/lang/Throwable"),
(VarProcessor)DecompilerContext.getProperty(DecompilerContext.CURRENT_VAR_PROCESSOR)));
}
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchStatement.java b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchStatement.java
index c251d05..ea45bdd 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchStatement.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/CatchStatement.java
@@ -58,7 +58,7 @@ public class CatchStatement extends Statement {
stats.addWithKey(stat, stat.id);
exctstrings.add(new ArrayList<String>(edge.getExceptions()));
- vars.add(new VarExprent(DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER),
+ vars.add(new VarExprent(DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER),
new VarType(CodeConstants.TYPE_OBJECT, 0, edge.getExceptions().get(0)),
// FIXME: for now simply the first type. Should get the first common superclass when possible.
(VarProcessor)DecompilerContext.getProperty(DecompilerContext.CURRENT_VAR_PROCESSOR)));
@@ -192,7 +192,7 @@ public class CatchStatement extends Statement {
for (List<String> exc : this.exctstrings) {
cs.exctstrings.add(new ArrayList<String>(exc));
- cs.vars.add(new VarExprent(DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER),
+ cs.vars.add(new VarExprent(DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.VAR_COUNTER),
new VarType(CodeConstants.TYPE_OBJECT, 0, exc.get(0)),
(VarProcessor)DecompilerContext.getProperty(DecompilerContext.CURRENT_VAR_PROCESSOR)));
}
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statement.java b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statement.java
index d707258..024b806 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statement.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/Statement.java
@@ -108,7 +108,7 @@ public class Statement {
{
// set statement id
- id = DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER);
+ id = DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER);
}
// *****************************************************************************
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/SwitchStatement.java b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/SwitchStatement.java
index 3d409f8..b54642d 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/stats/SwitchStatement.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/stats/SwitchStatement.java
@@ -314,7 +314,7 @@ public class SwitchStatement extends Statement {
for (int i = 0; i < nodes.size(); i++) {
if (nodes.get(i) == null) {
BasicBlockStatement bstat = new BasicBlockStatement(new BasicBlock(
- DecompilerContext.getCountercontainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
+ DecompilerContext.getCounterContainer().getCounterAndIncrement(CounterContainer.STATEMENT_COUNTER)));
StatEdge sample_edge = lstEdges.get(i).get(0);
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarDefinitionHelper.java b/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarDefinitionHelper.java
index 9582bfb..24207ef 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarDefinitionHelper.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarDefinitionHelper.java
@@ -51,7 +51,7 @@ public class VarDefinitionHelper {
this.varproc = varproc;
- VarNamesCollector vc = DecompilerContext.getVarncollector();
+ VarNamesCollector vc = DecompilerContext.getVarNamesCollector();
boolean thisvar = (mt.getAccessFlags() & CodeConstants.ACC_STATIC) == 0;
@@ -123,7 +123,7 @@ public class VarDefinitionHelper {
public void setVarDefinitions() {
- VarNamesCollector vc = DecompilerContext.getVarncollector();
+ VarNamesCollector vc = DecompilerContext.getVarNamesCollector();
for (Entry<Integer, Statement> en : mapVarDefStatements.entrySet()) {
Statement stat = en.getValue();
diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarVersionsProcessor.java b/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarVersionsProcessor.java
index 46c6a03..09d8def 100644
--- a/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarVersionsProcessor.java
+++ b/src/org/jetbrains/java/decompiler/modules/decompiler/vars/VarVersionsProcessor.java
@@ -248,7 +248,7 @@ public class VarVersionsProcessor {
HashMap<VarVersionPaar, VarType> mapExprentMinTypes = typeproc.getMapExprentMinTypes();
HashMap<VarVersionPaar, Integer> mapFinalVars = typeproc.getMapFinalVars();
- CounterContainer ccon = DecompilerContext.getCountercontainer();
+ CounterContainer ccon = DecompilerContext.getCounterContainer();
final HashMap<VarVersionPaar, Integer> mapVarPaar = new HashMap<VarVersionPaar, Integer>();
HashMap<Integer, Integer> mapOriginalVarIndices = new HashMap<Integer, Integer>();
diff --git a/src/org/jetbrains/java/decompiler/struct/gen/generics/GenericMain.java b/src/org/jetbrains/java/decompiler/struct/gen/generics/GenericMain.java
index a2df8f5..065029d 100644
--- a/src/org/jetbrains/java/decompiler/struct/gen/generics/GenericMain.java
+++ b/src/org/jetbrains/java/decompiler/struct/gen/generics/GenericMain.java
@@ -176,7 +176,7 @@ public class GenericMain {
}
else if (tp == CodeConstants.TYPE_OBJECT) {
StringBuilder buffer = new StringBuilder();
- buffer.append(DecompilerContext.getImpcollector().getShortName(buildJavaClassName(type)));
+ buffer.append(DecompilerContext.getImportCollector().getShortName(buildJavaClassName(type)));
if (!type.getArguments().isEmpty()) {
buffer.append("<");
@@ -222,7 +222,7 @@ public class GenericMain {
String res = name.replace('/', '.');
if (res.contains("$")) {
- StructClass cl = DecompilerContext.getStructcontext().getClass(name);
+ StructClass cl = DecompilerContext.getStructContext().getClass(name);
if (cl == null || !cl.isOwn()) {
res = res.replace('$', '.');
}
diff --git a/test/org/jetbrains/java/decompiler/SingleClassesTest.java b/test/org/jetbrains/java/decompiler/SingleClassesTest.java
index 1e37d97..fc8b1c2 100644
--- a/test/org/jetbrains/java/decompiler/SingleClassesTest.java
+++ b/test/org/jetbrains/java/decompiler/SingleClassesTest.java
@@ -44,7 +44,7 @@ public class SingleClassesTest {
put(IFernflowerPreferences.DECOMPILE_GENERIC_SIGNATURES, "0");
put(IFernflowerPreferences.IDEA_NOT_NULL_ANNOTATION, "1");
put(IFernflowerPreferences.LAMBDA_TO_ANONYMOUS_CLASS, "0");
- put(IFernflowerPreferences.USE_DEBUG_VARNAMES, "0");
+ put(IFernflowerPreferences.USE_DEBUG_VAR_NAMES, "0");
put(IFernflowerPreferences.NEW_LINE_SEPARATOR, (win ? "0" : "1"));
}});
}