FileDocCategorySizeDatePackage
ReturnAddress.javaAPI DocAndroid 5.1 API2988Thu Mar 12 22:18:30 GMT 2015com.android.dx.cf.code

ReturnAddress

public final class ReturnAddress extends Object implements com.android.dx.rop.type.TypeBearer
Representation of a subroutine return address. In Java verification, somewhat counterintuitively, the salient bit of information you need to know about a return address is the start address of the subroutine being returned from, not the address being returned to, so that's what instances of this class hang onto.

Fields Summary
private final int
subroutineAddress
{@code >= 0;} the start address of the subroutine being returned from
Constructors Summary
public ReturnAddress(int subroutineAddress)
Constructs an instance.

param
subroutineAddress {@code >= 0;} the start address of the subroutine being returned from

        if (subroutineAddress < 0) {
            throw new IllegalArgumentException("subroutineAddress < 0");
        }

        this.subroutineAddress = subroutineAddress;
    
Methods Summary
public booleanequals(java.lang.Object other)
{@inheritDoc}

        if (!(other instanceof ReturnAddress)) {
            return false;
        }

        return subroutineAddress == ((ReturnAddress) other).subroutineAddress;
    
public intgetBasicFrameType()
{@inheritDoc}

        return Type.RETURN_ADDRESS.getBasicFrameType();
    
public intgetBasicType()
{@inheritDoc}

        return Type.RETURN_ADDRESS.getBasicType();
    
public com.android.dx.rop.type.TypeBearergetFrameType()
{@inheritDoc}

        return this;
    
public intgetSubroutineAddress()
Gets the subroutine address.

return
{@code >= 0;} the subroutine address

        return subroutineAddress;
    
public com.android.dx.rop.type.TypegetType()
{@inheritDoc}

        return Type.RETURN_ADDRESS;
    
public inthashCode()
{@inheritDoc}

        return subroutineAddress;
    
public booleanisConstant()
{@inheritDoc}

        return false;
    
public java.lang.StringtoHuman()
{@inheritDoc}

        return toString();
    
public java.lang.StringtoString()
{@inheritDoc}

        return ("<addr:" + Hex.u2(subroutineAddress) + ">");