diff options
| author | 2014-08-13 00:22:12 -0400 | |
|---|---|---|
| committer | 2014-08-13 00:22:12 -0400 | |
| commit | cc74d0e62cfdcf14c5918234f69d587d264807ed (patch) | |
| tree | 7a11bd6af9b7cd2f28c3dbd43a281b4036464f77 /src/cuchaz/enigma/analysis/SourceIndexVisitor.java | |
| parent | got simple method call graph working! (diff) | |
| download | enigma-fork-cc74d0e62cfdcf14c5918234f69d587d264807ed.tar.gz enigma-fork-cc74d0e62cfdcf14c5918234f69d587d264807ed.tar.xz enigma-fork-cc74d0e62cfdcf14c5918234f69d587d264807ed.zip | |
added support for field access searches
added proper detection/handling for constructors
Diffstat (limited to 'src/cuchaz/enigma/analysis/SourceIndexVisitor.java')
| -rw-r--r-- | src/cuchaz/enigma/analysis/SourceIndexVisitor.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cuchaz/enigma/analysis/SourceIndexVisitor.java b/src/cuchaz/enigma/analysis/SourceIndexVisitor.java index 0ba5996..6c14ee9 100644 --- a/src/cuchaz/enigma/analysis/SourceIndexVisitor.java +++ b/src/cuchaz/enigma/analysis/SourceIndexVisitor.java | |||
| @@ -93,6 +93,7 @@ import com.strobel.decompiler.patterns.Pattern; | |||
| 93 | 93 | ||
| 94 | import cuchaz.enigma.mapping.ArgumentEntry; | 94 | import cuchaz.enigma.mapping.ArgumentEntry; |
| 95 | import cuchaz.enigma.mapping.ClassEntry; | 95 | import cuchaz.enigma.mapping.ClassEntry; |
| 96 | import cuchaz.enigma.mapping.ConstructorEntry; | ||
| 96 | import cuchaz.enigma.mapping.FieldEntry; | 97 | import cuchaz.enigma.mapping.FieldEntry; |
| 97 | import cuchaz.enigma.mapping.MethodEntry; | 98 | import cuchaz.enigma.mapping.MethodEntry; |
| 98 | 99 | ||
| @@ -158,7 +159,9 @@ public class SourceIndexVisitor implements IAstVisitor<SourceIndex, Void> | |||
| 158 | public Void visitConstructorDeclaration( ConstructorDeclaration node, SourceIndex index ) | 159 | public Void visitConstructorDeclaration( ConstructorDeclaration node, SourceIndex index ) |
| 159 | { | 160 | { |
| 160 | MethodDefinition def = node.getUserData( Keys.METHOD_DEFINITION ); | 161 | MethodDefinition def = node.getUserData( Keys.METHOD_DEFINITION ); |
| 161 | index.add( node.getNameToken(), new ClassEntry( def.getDeclaringType().getInternalName() ) ); | 162 | ClassEntry classEntry = new ClassEntry( def.getDeclaringType().getInternalName() ); |
| 163 | ConstructorEntry constructorEntry = new ConstructorEntry( classEntry, def.getSignature() ); | ||
| 164 | index.addDeclaration( node.getNameToken(), constructorEntry ); | ||
| 162 | 165 | ||
| 163 | return recurse( node, index ); | 166 | return recurse( node, index ); |
| 164 | } | 167 | } |