本文整理了Java中org.jf.dexlib2.iface.instruction.WideLiteralInstruction.getWideLiteral()
方法的一些代码示例,展示了WideLiteralInstruction.getWideLiteral()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WideLiteralInstruction.getWideLiteral()
方法的具体详情如下:
包路径:org.jf.dexlib2.iface.instruction.WideLiteralInstruction
类名称:WideLiteralInstruction
方法名:getWideLiteral
暂无
代码示例来源:origin: JesusFreke/smali
protected void writeLiteral(IndentingWriter writer) throws IOException {
LongRenderer.writeSignedIntOrLongTo(writer, ((WideLiteralInstruction)instruction).getWideLiteral());
}
代码示例来源:origin: JesusFreke/smali
protected void writeCommentIfLikelyDouble(IndentingWriter writer) throws IOException {
writeCommentIfLikelyDouble(writer, ((WideLiteralInstruction)instruction).getWideLiteral());
}
代码示例来源:origin: CalebFenton/simplify
@Override
public ConstOp create(MethodLocation location, TIntObjectMap<MethodLocation> addressToLocation, VirtualMachine vm) {
MethodLocation child = Utils.getNextLocation(location, addressToLocation);
BuilderInstruction instruction = (BuilderInstruction) location.getInstruction();
int destRegister = ((OneRegisterInstruction) instruction).getRegisterA();
ConstantType constantType;
Object literal;
String opName = instruction.getOpcode().name;
if (opName.matches("const-string(?:/jumbo)?")) {
ReferenceInstruction instr = (ReferenceInstruction) location.getInstruction();
literal = ((StringReference) instr.getReference()).getString();
constantType = ConstantType.STRING;
} else if (opName.endsWith("-class")) {
// Don't lookup the class here. Defer to actual execution to handle any possible exceptions.
ReferenceInstruction instr = (ReferenceInstruction) location.getInstruction();
Reference classRef = instr.getReference();
literal = ReferenceUtil.getReferenceString(classRef);
constantType = ConstantType.CLASS;
} else if (opName.contains("-wide")) {
WideLiteralInstruction instr = (WideLiteralInstruction) location.getInstruction();
literal = instr.getWideLiteral();
constantType = ConstantType.WIDE;
} else {
NarrowLiteralInstruction instr = (NarrowLiteralInstruction) location.getInstruction();
literal = instr.getNarrowLiteral();
constantType = ConstantType.NARROW;
}
return new ConstOp(location, child, destRegister, constantType, literal, vm.getClassLoader(),
vm.getExceptionFactory());
}
代码示例来源:origin: Sable/soot
literal = ((WideLiteralInstruction) instruction).getWideLiteral();
} else if (instruction instanceof NarrowLiteralInstruction) {
literal = ((NarrowLiteralInstruction) instruction).getNarrowLiteral();
代码示例来源:origin: CalebFenton/simplify
private static void testEquals(BuilderInstruction expected, ExecutionGraphManipulator manipulator, int address) {
BuilderInstruction actual = manipulator.getInstruction(address);
assertEquals(expected.getOpcode(), actual.getOpcode());
if (expected instanceof OneRegisterInstruction) {
int expectedRegister = ((OneRegisterInstruction) expected).getRegisterA();
int actualRegister = ((OneRegisterInstruction) actual).getRegisterA();
assertEquals(expectedRegister, actualRegister);
}
if (expected instanceof NarrowLiteralInstruction) {
int expectedLiteral = ((NarrowLiteralInstruction) expected).getNarrowLiteral();
int actualLiteral = ((NarrowLiteralInstruction) actual).getNarrowLiteral();
assertEquals(expectedLiteral, actualLiteral);
}
if (expected instanceof WideLiteralInstruction) {
long expectedLiteral = ((WideLiteralInstruction) expected).getWideLiteral();
long actualLiteral = ((WideLiteralInstruction) actual).getWideLiteral();
assertEquals(expectedLiteral, actualLiteral);
}
if (expected instanceof ReferenceInstruction) {
Reference expectedRef = ((ReferenceInstruction) expected).getReference();
Reference actualRef = ((ReferenceInstruction) actual).getReference();
assertEquals(expectedRef, actualRef);
}
}
代码示例来源:origin: CalebFenton/simplify
private static void testEquals(Instruction expectedInstr, Instruction actualInstr) {
assertEquals(expectedInstr.getOpcode(), actualInstr.getOpcode());
if (expectedInstr instanceof OneRegisterInstruction) {
OneRegisterInstruction expected = (OneRegisterInstruction) expectedInstr;
OneRegisterInstruction actual = (OneRegisterInstruction) actualInstr;
assertEquals(expected.getRegisterA(), actual.getRegisterA());
}
if (expectedInstr instanceof NarrowLiteralInstruction) {
NarrowLiteralInstruction expected = (NarrowLiteralInstruction) expectedInstr;
NarrowLiteralInstruction actual = (NarrowLiteralInstruction) actualInstr;
assertEquals(expected.getNarrowLiteral(), actual.getNarrowLiteral());
}
if (expectedInstr instanceof WideLiteralInstruction) {
WideLiteralInstruction expected = (WideLiteralInstruction) expectedInstr;
WideLiteralInstruction actual = (WideLiteralInstruction) actualInstr;
assertEquals(expected.getWideLiteral(), actual.getWideLiteral());
}
if (expectedInstr instanceof ReferenceInstruction) {
ReferenceInstruction expected = (ReferenceInstruction) expectedInstr;
ReferenceInstruction actual = (ReferenceInstruction) actualInstr;
assertEquals(expected.getReferenceType(), actual.getReferenceType());
assertEquals(expected.getReference(), actual.getReference());
}
}
代码示例来源:origin: KB5201314/ZjDroid
protected void writeLiteral(IndentingWriter writer) throws IOException {
LongRenderer.writeSignedIntOrLongTo(writer, ((WideLiteralInstruction)instruction).getWideLiteral());
}
代码示例来源:origin: org.smali/baksmali
protected void writeCommentIfLikelyDouble(IndentingWriter writer) throws IOException {
writeCommentIfLikelyDouble(writer, ((WideLiteralInstruction)instruction).getWideLiteral());
}
代码示例来源:origin: com.taobao.android/dex_patch
protected void writeLiteral(IndentingWriter writer) throws IOException {
LongRenderer.writeSignedIntOrLongTo(writer, ((WideLiteralInstruction) instruction).getWideLiteral());
}
代码示例来源:origin: org.smali/baksmali
protected void writeLiteral(IndentingWriter writer) throws IOException {
LongRenderer.writeSignedIntOrLongTo(writer, ((WideLiteralInstruction)instruction).getWideLiteral());
}
代码示例来源:origin: com.taobao.android/dex_patch
protected void writeCommentIfLikelyDouble(IndentingWriter writer) throws IOException {
writeCommentIfLikelyDouble(writer, ((WideLiteralInstruction) instruction).getWideLiteral());
}
代码示例来源:origin: org.smali/dexlib2
long value = ((WideLiteralInstruction)instruction).getWideLiteral();
if (NumberUtils.isLikelyDouble(value)) {
args.add(String.format("%d # %f", value, Double.longBitsToDouble(value)));
代码示例来源:origin: KB5201314/ZjDroid
long value = ((WideLiteralInstruction)instruction).getWideLiteral();
if (NumberUtils.isLikelyDouble(value)) {
args.add(String.format("%d # %f", value, Double.longBitsToDouble(value)));
代码示例来源:origin: testwhat/SmaliEx
long value = ((WideLiteralInstruction)instruction).getWideLiteral();
if (NumberUtils.isLikelyDouble(value)) {
args.add(String.format("%d # %f", value, Double.longBitsToDouble(value)));
代码示例来源:origin: KB5201314/ZjDroid
constantValue = ((WideLiteralInstruction)instructions.get(p)).getWideLiteral();
constantValue = ((WideLiteralInstruction)instructions.get(p)).getWideLiteral();
代码示例来源:origin: testwhat/SmaliEx
constantValue = ((WideLiteralInstruction)instructions.get(p)).getWideLiteral();
constantValue = ((WideLiteralInstruction)instructions.get(p)).getWideLiteral();
代码示例来源:origin: org.smali/dexlib2
constantValue = ((WideLiteralInstruction)instructions.get(p)).getWideLiteral();
constantValue = ((WideLiteralInstruction)instructions.get(p)).getWideLiteral();
代码示例来源:origin: droidefense/engine
constantValue = ((WideLiteralInstruction) instructions.get(p)).getWideLiteral();
constantValue = ((WideLiteralInstruction) instructions.get(p)).getWideLiteral();
内容来源于网络,如有侵权,请联系作者删除!