1 package Analysis.OwnershipAnalysis;
7 // An access path is relevant in a callee method to
8 // a caller's heap. When mapping edges from a callee
9 // into the caller, if the caller's heap does not have
10 // any matching access paths, then the edge could not
11 // exist in that context and is ignored.
13 public class AccessPath {
18 public boolean equals( Object o ) {
23 if( !(o instanceof AccessPath) ) {
29 VariableSourceToken vst = (VariableSourceToken) o;
31 // the reference vars have no bearing on equality
32 return sese.equals( vst.sese ) &&
33 addrVar.equals( vst.addrVar ) &&
34 seseAge.equals( vst.seseAge );
38 public int hashCode() {
39 // the reference vars have no bearing on hashCode
40 return 1; //(sese.hashCode() << 3) * (addrVar.hashCode() << 4) ^ seseAge.intValue();
43 public String toString() {
47 public String toStringForDOT() {
49 if( disjointId != null ) {
50 return "disjoint "+disjointId+"\\n"+toString()+"\\n"+getType().toPrettyString();
52 return toString()+"\\n"+getType().toPrettyString();