jaxp/src/com/sun/org/apache/bcel/internal/generic/ReturnaddressType.java
Print this page
@@ -56,11 +56,11 @@
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
import com.sun.org.apache.bcel.internal.Constants;
-import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
+import java.util.Objects;
/**
* Returnaddress, the type JSR or JSR_W instructions push upon the stack.
*
* see vmspec2 3.3.3
@@ -84,13 +84,19 @@
public ReturnaddressType(InstructionHandle returnTarget) {
super(Constants.T_ADDRESS, "<return address targeting "+returnTarget+">");
this.returnTarget = returnTarget;
}
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(this.returnTarget);
+ }
+
/**
* Returns if the two Returnaddresses refer to the same target.
*/
+ @Override
public boolean equals(Object rat){
if(!(rat instanceof ReturnaddressType))
return false;
return ((ReturnaddressType)rat).returnTarget.equals(this.returnTarget);