use of com.taobao.android.dx.rop.cst.Constant in project atlas by alibaba.
the class Form51l method isCompatible.
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
if (!((insn instanceof CstInsn) && (regs.size() == 1) && unsignedFitsInByte(regs.get(0).getReg()))) {
return false;
}
CstInsn ci = (CstInsn) insn;
Constant cst = ci.getConstant();
return (cst instanceof CstLiteral64);
}
use of com.taobao.android.dx.rop.cst.Constant in project atlas by alibaba.
the class AnnotationItem method annotateTo.
/**
* Write a (listing file) annotation for this instance to the given
* output, that consumes no bytes of output. This is for annotating
* a reference to this instance at the point of the reference.
*
* @param out {@code non-null;} where to output to
* @param prefix {@code non-null;} prefix for each line of output
*/
public void annotateTo(AnnotatedOutput out, String prefix) {
out.annotate(0, prefix + "visibility: " + annotation.getVisibility().toHuman());
out.annotate(0, prefix + "type: " + annotation.getType().toHuman());
for (NameValuePair pair : annotation.getNameValuePairs()) {
CstString name = pair.getName();
Constant value = pair.getValue();
out.annotate(0, prefix + name.toHuman() + ": " + ValueEncoder.constantToHuman(value));
}
}
Aggregations