diff options
| author | 2016-07-02 18:04:57 +1000 | |
|---|---|---|
| committer | 2016-07-02 18:04:57 +1000 | |
| commit | 64c359d3c1d2347001e5c6becb1d7561457f52cc (patch) | |
| tree | bc2f37325b770475237437d204e95254dbfa0b3d /src/main/java/cuchaz/enigma/convert/ClassIdentifier.java | |
| parent | Fixed Null.json and #4 (diff) | |
| download | enigma-fork-64c359d3c1d2347001e5c6becb1d7561457f52cc.tar.gz enigma-fork-64c359d3c1d2347001e5c6becb1d7561457f52cc.tar.xz enigma-fork-64c359d3c1d2347001e5c6becb1d7561457f52cc.zip | |
Renamed Fields
Diffstat (limited to 'src/main/java/cuchaz/enigma/convert/ClassIdentifier.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/convert/ClassIdentifier.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/cuchaz/enigma/convert/ClassIdentifier.java b/src/main/java/cuchaz/enigma/convert/ClassIdentifier.java index e1153a6..cc7f25b 100644 --- a/src/main/java/cuchaz/enigma/convert/ClassIdentifier.java +++ b/src/main/java/cuchaz/enigma/convert/ClassIdentifier.java | |||
| @@ -24,30 +24,30 @@ import javassist.CtClass; | |||
| 24 | 24 | ||
| 25 | public class ClassIdentifier { | 25 | public class ClassIdentifier { |
| 26 | 26 | ||
| 27 | private JarIndex m_index; | 27 | private JarIndex index; |
| 28 | private SidedClassNamer m_namer; | 28 | private SidedClassNamer namer; |
| 29 | private boolean m_useReferences; | 29 | private boolean useReferences; |
| 30 | private TranslatingTypeLoader m_loader; | 30 | private TranslatingTypeLoader loader; |
| 31 | private Map<ClassEntry, ClassIdentity> m_cache; | 31 | private Map<ClassEntry, ClassIdentity> cache; |
| 32 | 32 | ||
| 33 | public ClassIdentifier(JarFile jar, JarIndex index, SidedClassNamer namer, boolean useReferences) { | 33 | public ClassIdentifier(JarFile jar, JarIndex index, SidedClassNamer namer, boolean useReferences) { |
| 34 | m_index = index; | 34 | this.index = index; |
| 35 | m_namer = namer; | 35 | this.namer = namer; |
| 36 | m_useReferences = useReferences; | 36 | this.useReferences = useReferences; |
| 37 | m_loader = new TranslatingTypeLoader(jar, index); | 37 | this.loader = new TranslatingTypeLoader(jar, index); |
| 38 | m_cache = Maps.newHashMap(); | 38 | this.cache = Maps.newHashMap(); |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | public ClassIdentity identify(ClassEntry classEntry) | 41 | public ClassIdentity identify(ClassEntry classEntry) |
| 42 | throws ClassNotFoundException { | 42 | throws ClassNotFoundException { |
| 43 | ClassIdentity identity = m_cache.get(classEntry); | 43 | ClassIdentity identity = this.cache.get(classEntry); |
| 44 | if (identity == null) { | 44 | if (identity == null) { |
| 45 | CtClass c = m_loader.loadClass(classEntry.getName()); | 45 | CtClass c = this.loader.loadClass(classEntry.getName()); |
| 46 | if (c == null) { | 46 | if (c == null) { |
| 47 | throw new ClassNotFoundException(classEntry.getName()); | 47 | throw new ClassNotFoundException(classEntry.getName()); |
| 48 | } | 48 | } |
| 49 | identity = new ClassIdentity(c, m_namer, m_index, m_useReferences); | 49 | identity = new ClassIdentity(c, this.namer, this.index, this.useReferences); |
| 50 | m_cache.put(classEntry, identity); | 50 | this.cache.put(classEntry, identity); |
| 51 | } | 51 | } |
| 52 | return identity; | 52 | return identity; |
| 53 | } | 53 | } |