use of com.taobao.android.dx.cf.attrib.AttSignature in project atlas by alibaba.
the class StdAttributeFactory method signature.
/**
* Parses a {@code Signature} attribute.
*/
private Attribute signature(DirectClassFile cf, int offset, int length, ParseObserver observer) {
if (length != 2) {
throwBadLength(2);
}
ByteArray bytes = cf.getBytes();
ConstantPool pool = cf.getConstantPool();
int idx = bytes.getUnsignedShort(offset);
CstString cst = (CstString) pool.get(idx);
Attribute result = new AttSignature(cst);
if (observer != null) {
observer.parsed(bytes, offset, 2, "signature: " + cst);
}
return result;
}
Aggregations