本文整理汇总了Java中com.android.dx.rop.cst.Constant.toHuman方法的典型用法代码示例。如果您正苦于以下问题:Java Constant.toHuman方法的具体用法?Java Constant.toHuman怎么用?Java Constant.toHuman使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.android.dx.rop.cst.Constant
的用法示例。
在下文中一共展示了Constant.toHuman方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseConstant
import com.android.dx.rop.cst.Constant; //导入方法依赖的package包/类
/**
* 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;
}
示例2: getInlineString
import com.android.dx.rop.cst.Constant; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public String getInlineString() {
Constant cst = getConstant();
String constantString = cst.toHuman();
if (cst instanceof CstString) {
constantString = ((CstString) cst).toQuoted();
}
return constantString + " " + ThrowingInsn.toCatchString(catches);
}
示例3: cstString
import com.android.dx.rop.cst.Constant; //导入方法依赖的package包/类
/**
* Helper method to return the constant string for a {@link CstInsn}
* in human form.
*
* @param insn {@code non-null;} a constant-bearing instruction
* @return {@code non-null;} the human string form of the contained
* constant
*/
protected static String cstString(DalvInsn insn) {
CstInsn ci = (CstInsn) insn;
Constant cst = ci.getConstant();
return cst instanceof CstString ? ((CstString) cst).toQuoted() : cst.toHuman();
}