2016-09-18 00:58:54 +00:00
|
|
|
/*
|
2018-10-30 00:09:20 +00:00
|
|
|
* Copyright (c) 2016-2018 The University of Sheffield.
|
|
|
|
*
|
2016-09-18 00:58:54 +00:00
|
|
|
* All rights reserved. This program and the accompanying materials
|
2018-10-30 00:09:20 +00:00
|
|
|
* This program and the accompanying materials are made
|
|
|
|
* available under the terms of the Eclipse Public License 2.0
|
|
|
|
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
2016-09-18 00:58:54 +00:00
|
|
|
*
|
2018-10-30 00:09:20 +00:00
|
|
|
* SPDX-License-Identifier: EPL-2.0
|
2016-09-18 00:58:54 +00:00
|
|
|
*/
|
|
|
|
|
2017-05-21 14:58:16 +00:00
|
|
|
package com.logicalhacking.dasca.dataflow.util;
|
2016-09-18 00:58:54 +00:00
|
|
|
|
|
|
|
import com.ibm.wala.ssa.SSAInstruction;
|
|
|
|
|
|
|
|
public class SSAInstructionKey {
|
|
|
|
|
2016-10-30 16:12:19 +00:00
|
|
|
private final SSAInstruction key;
|
|
|
|
public SSAInstructionKey(SSAInstruction key) {
|
|
|
|
this.key = key;
|
|
|
|
}
|
2016-09-18 00:58:54 +00:00
|
|
|
|
2016-10-30 16:12:19 +00:00
|
|
|
public int hashCode() {
|
|
|
|
return key.hashCode();
|
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
|
|
|
if (null == key) {
|
|
|
|
return "null (key)";
|
|
|
|
} else {
|
|
|
|
return key.toString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean equals(Object obj) {
|
|
|
|
if (null == obj) {
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
if (obj instanceof SSAInstructionKey) {
|
|
|
|
return key == ((SSAInstructionKey) obj).key;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-09-18 00:58:54 +00:00
|
|
|
}
|