use of com.taobao.android.dx.rop.cst.Constant in project atlas by alibaba.
the class AnnotationParser method parseConstant.
/**
* Helper for {@link #parseValue}, which parses a constant reference
* and returns the referred-to constant value.
*
* @return {@code non-null;} the parsed value
*/
private Constant parseConstant() throws IOException {
int constValueIndex = input.readUnsignedShort();
Constant value = (Constant) pool.get(constValueIndex);
if (observer != null) {
String human = (value instanceof CstString) ? ((CstString) value).toQuoted() : value.toHuman();
parsed(2, "constant_value: " + human);
}
return value;
}
Aggregations