AttConstantValuepublic final class AttConstantValue extends BaseAttribute Attribute class for standard {@code ConstantValue} attributes. |
Fields Summary |
---|
public static final String | ATTRIBUTE_NAME{@code non-null;} attribute name for attributes of this type | private final com.android.dx.rop.cst.TypedConstant | constantValue{@code non-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: {@code CstString},
{@code CstInteger}, {@code CstLong},
{@code CstFloat}, or {@code CstDouble}.
return constantValue;
|
|