decompiler: extracted <init> and <clinit> to constants

This commit is contained in:
Egor.Ushakov
2015-01-22 12:30:12 +03:00
parent 9ba9af5425
commit effbed6727
9 changed files with 33 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
*/
package org.jetbrains.java.decompiler.main;
import org.jetbrains.java.decompiler.code.CodeConstants;
import org.jetbrains.java.decompiler.main.rels.ClassWrapper;
import org.jetbrains.java.decompiler.main.rels.MethodWrapper;
import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent;
@@ -48,7 +49,7 @@ public class EnumProcessor {
wrapper.getHiddenMembers().add(InterpreterUtil.makeUniqueKey(name, descriptor));
}
}
else if ("<init>".equals(name)) {
else if (CodeConstants.INIT_NAME.equals(name)) {
Statement firstData = findFirstData(method.root);
if (firstData != null && !firstData.getExprents().isEmpty()) {
Exprent exprent = firstData.getExprents().get(0);