diff options
Diffstat (limited to 'src/cuchaz/enigma/analysis/SourceIndexBehaviorVisitor.java')
| -rw-r--r-- | src/cuchaz/enigma/analysis/SourceIndexBehaviorVisitor.java | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/cuchaz/enigma/analysis/SourceIndexBehaviorVisitor.java b/src/cuchaz/enigma/analysis/SourceIndexBehaviorVisitor.java index f307c11..b883087 100644 --- a/src/cuchaz/enigma/analysis/SourceIndexBehaviorVisitor.java +++ b/src/cuchaz/enigma/analysis/SourceIndexBehaviorVisitor.java | |||
| @@ -33,7 +33,6 @@ import cuchaz.enigma.mapping.ArgumentEntry; | |||
| 33 | import cuchaz.enigma.mapping.BehaviorEntry; | 33 | import cuchaz.enigma.mapping.BehaviorEntry; |
| 34 | import cuchaz.enigma.mapping.ClassEntry; | 34 | import cuchaz.enigma.mapping.ClassEntry; |
| 35 | import cuchaz.enigma.mapping.ConstructorEntry; | 35 | import cuchaz.enigma.mapping.ConstructorEntry; |
| 36 | import cuchaz.enigma.mapping.Entry; | ||
| 37 | import cuchaz.enigma.mapping.FieldEntry; | 36 | import cuchaz.enigma.mapping.FieldEntry; |
| 38 | import cuchaz.enigma.mapping.MethodEntry; | 37 | import cuchaz.enigma.mapping.MethodEntry; |
| 39 | 38 | ||
| @@ -100,10 +99,7 @@ public class SourceIndexBehaviorVisitor extends SourceIndexVisitor | |||
| 100 | } | 99 | } |
| 101 | if( tokenNode != null ) | 100 | if( tokenNode != null ) |
| 102 | { | 101 | { |
| 103 | index.addReference( | 102 | index.addReference( tokenNode, behaviorEntry, m_behaviorEntry ); |
| 104 | tokenNode, | ||
| 105 | new EntryReference<Entry,Entry>( behaviorEntry, m_behaviorEntry ) | ||
| 106 | ); | ||
| 107 | } | 103 | } |
| 108 | } | 104 | } |
| 109 | 105 | ||
| @@ -124,10 +120,7 @@ public class SourceIndexBehaviorVisitor extends SourceIndexVisitor | |||
| 124 | 120 | ||
| 125 | ClassEntry classEntry = new ClassEntry( ref.getDeclaringType().getInternalName() ); | 121 | ClassEntry classEntry = new ClassEntry( ref.getDeclaringType().getInternalName() ); |
| 126 | FieldEntry fieldEntry = new FieldEntry( classEntry, ref.getName() ); | 122 | FieldEntry fieldEntry = new FieldEntry( classEntry, ref.getName() ); |
| 127 | index.addReference( | 123 | index.addReference( node.getMemberNameToken(), fieldEntry, m_behaviorEntry ); |
| 128 | node.getMemberNameToken(), | ||
| 129 | new EntryReference<Entry,Entry>( fieldEntry, m_behaviorEntry ) | ||
| 130 | ); | ||
| 131 | } | 124 | } |
| 132 | 125 | ||
| 133 | return recurse( node, index ); | 126 | return recurse( node, index ); |
| @@ -140,10 +133,7 @@ public class SourceIndexBehaviorVisitor extends SourceIndexVisitor | |||
| 140 | if( node.getIdentifierToken().getStartLocation() != TextLocation.EMPTY ) | 133 | if( node.getIdentifierToken().getStartLocation() != TextLocation.EMPTY ) |
| 141 | { | 134 | { |
| 142 | ClassEntry classEntry = new ClassEntry( ref.getInternalName() ); | 135 | ClassEntry classEntry = new ClassEntry( ref.getInternalName() ); |
| 143 | index.addReference( | 136 | index.addReference( node.getIdentifierToken(), classEntry, m_behaviorEntry ); |
| 144 | node.getIdentifierToken(), | ||
| 145 | new EntryReference<Entry,Entry>( classEntry, m_behaviorEntry ) | ||
| 146 | ); | ||
| 147 | } | 137 | } |
| 148 | 138 | ||
| 149 | return recurse( node, index ); | 139 | return recurse( node, index ); |
| @@ -178,10 +168,7 @@ public class SourceIndexBehaviorVisitor extends SourceIndexVisitor | |||
| 178 | { | 168 | { |
| 179 | ClassEntry classEntry = new ClassEntry( ref.getDeclaringType().getInternalName() ); | 169 | ClassEntry classEntry = new ClassEntry( ref.getDeclaringType().getInternalName() ); |
| 180 | FieldEntry fieldEntry = new FieldEntry( classEntry, ref.getName() ); | 170 | FieldEntry fieldEntry = new FieldEntry( classEntry, ref.getName() ); |
| 181 | index.addReference( | 171 | index.addReference( node.getIdentifierToken(), fieldEntry, m_behaviorEntry ); |
| 182 | node.getIdentifierToken(), | ||
| 183 | new EntryReference<Entry,Entry>( fieldEntry, m_behaviorEntry ) | ||
| 184 | ); | ||
| 185 | } | 172 | } |
| 186 | 173 | ||
| 187 | return recurse( node, index ); | 174 | return recurse( node, index ); |
| @@ -197,10 +184,8 @@ public class SourceIndexBehaviorVisitor extends SourceIndexVisitor | |||
| 197 | ConstructorEntry constructorEntry = new ConstructorEntry( classEntry, ref.getSignature() ); | 184 | ConstructorEntry constructorEntry = new ConstructorEntry( classEntry, ref.getSignature() ); |
| 198 | if( node.getType() instanceof SimpleType ) | 185 | if( node.getType() instanceof SimpleType ) |
| 199 | { | 186 | { |
| 200 | index.addReference( | 187 | SimpleType simpleTypeNode = (SimpleType)node.getType(); |
| 201 | ((SimpleType)node.getType()).getIdentifierToken(), | 188 | index.addReference( simpleTypeNode.getIdentifierToken(), constructorEntry, m_behaviorEntry ); |
| 202 | new EntryReference<Entry,Entry>( constructorEntry, m_behaviorEntry ) | ||
| 203 | ); | ||
| 204 | } | 189 | } |
| 205 | } | 190 | } |
| 206 | 191 | ||