summaryrefslogtreecommitdiff
path: root/src/cuchaz/enigma/analysis/EntryReference.java
diff options
context:
space:
mode:
authorGravatar jeff2014-08-21 01:10:37 -0400
committerGravatar jeff2014-08-21 01:10:37 -0400
commit237b2ed2a6b6f537cdbdf9fc9c6d0c7743f34375 (patch)
treeebad059c7fa0bc7723858cb25eed0bb6e95fe42a /src/cuchaz/enigma/analysis/EntryReference.java
parentfixed recognition of inner class tokens (diff)
downloadenigma-fork-237b2ed2a6b6f537cdbdf9fc9c6d0c7743f34375.tar.gz
enigma-fork-237b2ed2a6b6f537cdbdf9fc9c6d0c7743f34375.tar.xz
enigma-fork-237b2ed2a6b6f537cdbdf9fc9c6d0c7743f34375.zip
fixed call graph searching
added system to navigate multiple tokens for the same entry in a behavior
Diffstat (limited to '')
-rw-r--r--src/cuchaz/enigma/analysis/EntryReference.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/cuchaz/enigma/analysis/EntryReference.java b/src/cuchaz/enigma/analysis/EntryReference.java
index 869e08c..768c113 100644
--- a/src/cuchaz/enigma/analysis/EntryReference.java
+++ b/src/cuchaz/enigma/analysis/EntryReference.java
@@ -18,14 +18,13 @@ public class EntryReference<E extends Entry, C extends Entry>
18{ 18{
19 public E entry; 19 public E entry;
20 public C context; 20 public C context;
21 public int pos;
22 21
23 public EntryReference( E entry ) 22 public EntryReference( E entry )
24 { 23 {
25 this( entry, null, -1 ); 24 this( entry, null );
26 } 25 }
27 26
28 public EntryReference( E entry, C context, int pos ) 27 public EntryReference( E entry, C context )
29 { 28 {
30 if( entry == null ) 29 if( entry == null )
31 { 30 {
@@ -34,7 +33,6 @@ public class EntryReference<E extends Entry, C extends Entry>
34 33
35 this.entry = entry; 34 this.entry = entry;
36 this.context = context; 35 this.context = context;
37 this.pos = pos;
38 } 36 }
39 37
40 public ClassEntry getClassEntry( ) 38 public ClassEntry getClassEntry( )
@@ -51,7 +49,7 @@ public class EntryReference<E extends Entry, C extends Entry>
51 { 49 {
52 if( context != null ) 50 if( context != null )
53 { 51 {
54 return Util.combineHashesOrdered( entry.hashCode(), context.hashCode(), Integer.valueOf( pos ).hashCode() ); 52 return Util.combineHashesOrdered( entry.hashCode(), context.hashCode() );
55 } 53 }
56 return entry.hashCode(); 54 return entry.hashCode();
57 } 55 }
@@ -82,7 +80,7 @@ public class EntryReference<E extends Entry, C extends Entry>
82 } 80 }
83 else if( context != null && other.context != null ) 81 else if( context != null && other.context != null )
84 { 82 {
85 return context.equals( other.context ) && pos == other.pos; 83 return context.equals( other.context );
86 } 84 }
87 return false; 85 return false;
88 } 86 }
@@ -96,9 +94,6 @@ public class EntryReference<E extends Entry, C extends Entry>
96 { 94 {
97 buf.append( " called from " ); 95 buf.append( " called from " );
98 buf.append( context ); 96 buf.append( context );
99 buf.append( " (" );
100 buf.append( pos );
101 buf.append( ")" );
102 } 97 }
103 return buf.toString(); 98 return buf.toString();
104 } 99 }