jaxp/src/com/sun/org/apache/bcel/internal/generic/ReturnaddressType.java
changeset 17538 d8d911c4e5d4
parent 12457 c348e06f0e82
equal deleted inserted replaced
17537:50528ec0ea37 17538:d8d911c4e5d4
    56  * individuals on behalf of the Apache Software Foundation.  For more
    56  * individuals on behalf of the Apache Software Foundation.  For more
    57  * information on the Apache Software Foundation, please see
    57  * information on the Apache Software Foundation, please see
    58  * <http://www.apache.org/>.
    58  * <http://www.apache.org/>.
    59  */
    59  */
    60 import com.sun.org.apache.bcel.internal.Constants;
    60 import com.sun.org.apache.bcel.internal.Constants;
    61 import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
    61 import java.util.Objects;
    62 
    62 
    63 /**
    63 /**
    64  * Returnaddress, the type JSR or JSR_W instructions push upon the stack.
    64  * Returnaddress, the type JSR or JSR_W instructions push upon the stack.
    65  *
    65  *
    66  * see vmspec2 3.3.3
    66  * see vmspec2 3.3.3
    84   public ReturnaddressType(InstructionHandle returnTarget) {
    84   public ReturnaddressType(InstructionHandle returnTarget) {
    85     super(Constants.T_ADDRESS, "<return address targeting "+returnTarget+">");
    85     super(Constants.T_ADDRESS, "<return address targeting "+returnTarget+">");
    86         this.returnTarget = returnTarget;
    86         this.returnTarget = returnTarget;
    87   }
    87   }
    88 
    88 
       
    89   @Override
       
    90   public int hashCode() {
       
    91       return Objects.hashCode(this.returnTarget);
       
    92   }
       
    93 
    89   /**
    94   /**
    90    * Returns if the two Returnaddresses refer to the same target.
    95    * Returns if the two Returnaddresses refer to the same target.
    91    */
    96    */
       
    97   @Override
    92   public boolean equals(Object rat){
    98   public boolean equals(Object rat){
    93     if(!(rat instanceof ReturnaddressType))
    99     if(!(rat instanceof ReturnaddressType))
    94       return false;
   100       return false;
    95 
   101 
    96     return ((ReturnaddressType)rat).returnTarget.equals(this.returnTarget);
   102     return ((ReturnaddressType)rat).returnTarget.equals(this.returnTarget);