AttConstantValuepublic final class AttConstantValue extends BaseAttribute Attribute class for standard ConstantValue attributes. |
Fields Summary |
---|
public static final String | ATTRIBUTE_NAMEnon-null; attribute name for attributes of this type | private final com.android.dx.rop.cst.TypedConstant | constantValuenon-null; the constant value |
Constructors Summary |
---|
public AttConstantValue(com.android.dx.rop.cst.TypedConstant constantValue)Constructs an instance.
super(ATTRIBUTE_NAME);
if (!((constantValue instanceof CstString) ||
(constantValue instanceof CstInteger) ||
(constantValue instanceof CstLong) ||
(constantValue instanceof CstFloat) ||
(constantValue instanceof CstDouble))) {
if (constantValue == null) {
throw new NullPointerException("constantValue == null");
}
throw new IllegalArgumentException("bad type for constantValue");
}
this.constantValue = constantValue;
|
Methods Summary |
---|
public int | byteLength(){@inheritDoc}
return 8;
| public com.android.dx.rop.cst.TypedConstant | getConstantValue()Gets the constant value of this instance. The returned value
is an instance of one of: CstString ,
CstInteger , CstLong ,
CstFloat , or CstDouble .
return constantValue;
|
|