2014-11-19 03:27:25 +00:00
|
|
|
package com.ibm.wala.cast.js.callgraph.fieldbased.flowgraph.vertices;
|
|
|
|
|
|
|
|
import com.ibm.wala.ipa.callgraph.propagation.PointerKey;
|
|
|
|
|
|
|
|
public class PrototypeFieldVertex extends Vertex implements PointerKey {
|
|
|
|
|
2017-07-12 23:54:57 +00:00
|
|
|
public enum PrototypeField { __proto__, prototype }
|
2014-11-19 03:27:25 +00:00
|
|
|
|
|
|
|
private final PrototypeField field;
|
|
|
|
private final ObjectVertex type;
|
|
|
|
|
|
|
|
public PrototypeFieldVertex(PrototypeField field, ObjectVertex type) {
|
|
|
|
this.field = field;
|
|
|
|
this.type = type;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public <T> T accept(VertexVisitor<T> visitor) {
|
|
|
|
return visitor.visitPrototypeVertex(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return field + ":" + type;
|
|
|
|
}
|
|
|
|
}
|