com.android.dx.rop.cst
Class TypedConstant
java.lang.Object
com.android.dx.rop.cst.Constant
com.android.dx.rop.cst.TypedConstant
- All Implemented Interfaces:
- TypeBearer, ToHuman, Comparable<Constant>
- Direct Known Subclasses:
- CstLiteralBits, CstMemberRef, CstString, CstType
public abstract class TypedConstant
- extends Constant
- implements TypeBearer
Base class for constants which implement TypeBearer.
|
Method Summary |
int |
getBasicFrameType()
Gets the basic type corresponding to this instance's frame type. |
int |
getBasicType()
Gets the basic type corresponding to this instance. |
TypeBearer |
getFrameType()
Gets the frame type corresponding to this type. |
boolean |
isConstant()
Returns whether this instance represents a constant value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypedConstant
public TypedConstant()
getFrameType
public final TypeBearer getFrameType()
- Gets the frame type corresponding to this type. This method returns
this, except if Type.isIntlike() on the underlying
type returns true but the underlying type is not in
fact Type.INT, in which case this method returns an instance
whose underlying type is INT.
This implementation always returns this.
- Specified by:
getFrameType in interface TypeBearer
- Returns:
non-null; the frame type for this instance
getBasicType
public final int getBasicType()
- Gets the basic type corresponding to this instance.
- Specified by:
getBasicType in interface TypeBearer
- Returns:
- the basic type; one of the
BT_* constants
defined by Type
getBasicFrameType
public final int getBasicFrameType()
- Gets the basic type corresponding to this instance's frame type. This
is equivalent to
getFrameType().getBasicType(), and
is the same as calling getFrameType() unless this
instance is an int-like type, in which case this method returns
BT_INT.
- Specified by:
getBasicFrameType in interface TypeBearer
- Returns:
- the basic frame type; one of the
BT_* constants
defined by Type - See Also:
TypeBearer.getBasicType(),
TypeBearer.getFrameType()
isConstant
public final boolean isConstant()
- Returns whether this instance represents a constant value.
- Specified by:
isConstant in interface TypeBearer
- Returns:
true if this instance represents a constant value
and false if not
Copyright © 2013. All Rights Reserved.