diff options
author | Roman Shevchenko <roman.shevchenko@jetbrains.com> | 2014-09-02 20:56:03 +0400 |
---|---|---|
committer | Roman Shevchenko <roman.shevchenko@jetbrains.com> | 2014-09-03 11:39:32 +0400 |
commit | 2df49d32a71818227e80a8628688906f2ede8a6a (patch) | |
tree | dced5f5ebf2f860d5683abf6910f180a67f9471d /src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java | |
parent | c0c83126a69a0c652f343e972f727ffd7f5f10af (diff) | |
download | fernflower-2df49d32a71818227e80a8628688906f2ede8a6a.tar fernflower-2df49d32a71818227e80a8628688906f2ede8a6a.tar.gz fernflower-2df49d32a71818227e80a8628688906f2ede8a6a.tar.lz fernflower-2df49d32a71818227e80a8628688906f2ede8a6a.tar.xz fernflower-2df49d32a71818227e80a8628688906f2ede8a6a.zip |
java-decompiler: fixes and cleanups
- unified attribute loading code
- common methods for checking member flags
- verifying skip()
- correct resource closing
- typos
Diffstat (limited to 'src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java')
-rw-r--r-- | src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java b/src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java index 546ece3..adff502 100644 --- a/src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java +++ b/src/org/jetbrains/java/decompiler/modules/renamer/IdentifierConverter.java @@ -232,11 +232,10 @@ public class IdentifierConverter { StructMethod mt = methods.get(i); String key = methods.getKey(i); - int access_flags = mt.getAccessFlags(); - boolean isPrivate = ((access_flags & CodeConstants.ACC_PRIVATE) != 0); + boolean isPrivate = mt.hasModifier(CodeConstants.ACC_PRIVATE); String name = mt.getName(); - if (!cl.isOwn() || (access_flags & CodeConstants.ACC_NATIVE) != 0) { + if (!cl.isOwn() || mt.hasModifier(CodeConstants.ACC_NATIVE)) { // external and native methods must not be renamed if (!isPrivate) { names.put(key, name); @@ -426,8 +425,7 @@ public class IdentifierConverter { break; } else { - - boolean isInterface = ((clstr.access_flags & CodeConstants.ACC_INTERFACE) != 0); + boolean isInterface = clstr.hasModifier(CodeConstants.ACC_INTERFACE); boolean found_parent = false; if (isInterface) { |