Class ReturnAddress
java.lang.Object
com.android.dx.cf.code.ReturnAddress
- All Implemented Interfaces:
TypeBearer, ToHuman
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGets the basic type corresponding to this instance's frame type.intGets the basic type corresponding to this instance.Gets the frame type corresponding to this type.intGets the subroutine address.getType()Gets the type associated with this instance.inthashCode()booleanReturns whether this instance represents a constant value.toHuman()Return the "human" string form of this instance.toString()
-
Constructor Details
-
ReturnAddress
public ReturnAddress(int subroutineAddress) Constructs an instance.- Parameters:
subroutineAddress->= 0;the start address of the subroutine being returned from
-
-
Method Details
-
toString
-
toHuman
-
getType
Gets the type associated with this instance.- Specified by:
getTypein interfaceTypeBearer- Returns:
non-null;the type
-
getFrameType
Gets the frame type corresponding to this type. This method returnsthis, except ifType.isIntlike()on the underlying type returnstruebut the underlying type is not in factType.INT, in which case this method returns an instance whose underlying type isINT.- Specified by:
getFrameTypein interfaceTypeBearer- Returns:
non-null;the frame type for this instance
-
getBasicType
public int getBasicType()Gets the basic type corresponding to this instance.- Specified by:
getBasicTypein interfaceTypeBearer- Returns:
- the basic type; one of the
BT_*constants defined byType
-
getBasicFrameType
public int getBasicFrameType()Gets the basic type corresponding to this instance's frame type. This is equivalent togetFrameType().getBasicType(), and is the same as callinggetFrameType()unless this instance is an int-like type, in which case this method returnsBT_INT.- Specified by:
getBasicFrameTypein interfaceTypeBearer- Returns:
- the basic frame type; one of the
BT_*constants defined byType - See Also:
-
isConstant
public boolean isConstant()Returns whether this instance represents a constant value.- Specified by:
isConstantin interfaceTypeBearer- Returns:
trueif this instance represents a constant value andfalseif not
-
equals
-
hashCode
-
getSubroutineAddress
public int getSubroutineAddress()Gets the subroutine address.- Returns:
>= 0;the subroutine address
-