本文整理汇总了Java中com.android.dx.dex.code.TargetInsn类的典型用法代码示例。如果您正苦于以下问题:Java TargetInsn类的具体用法?Java TargetInsn怎么用?Java TargetInsn使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TargetInsn类属于com.android.dx.dex.code包,在下文中一共展示了TargetInsn类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isCompatible
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
if (!((insn instanceof TargetInsn) &&
(insn.getRegisters().size() == 0))) {
return false;
}
TargetInsn ti = (TargetInsn) insn;
return ti.hasTargetOffset() ? branchFits(ti) : true;
}
示例2: branchFits
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean branchFits(TargetInsn insn) {
int offset = insn.getTargetOffset();
// Note: A zero offset would fit, but it is prohibited by the spec.
return (offset != 0) && signedFitsInShort(offset);
}
示例3: writeTo
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
int offset = ((TargetInsn) insn).getTargetOffset();
write(out, opcodeUnit(insn, 0), (short) offset);
}
示例4: branchFits
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean branchFits(TargetInsn insn) {
int offset = insn.getTargetOffset();
// Note: A zero offset would fit, but it is prohibited by the spec.
return (offset != 0) && signedFitsInByte(offset);
}
示例5: writeTo
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
int offset = ((TargetInsn) insn).getTargetOffset();
write(out, opcodeUnit(insn, (offset & 0xff)));
}
示例6: isCompatible
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
if (!((insn instanceof TargetInsn) &&
(regs.size() == 1) &&
unsignedFitsInByte(regs.get(0).getReg()))) {
return false;
}
return true;
}
示例7: writeTo
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
int offset = ((TargetInsn) insn).getTargetOffset();
write(out, opcodeUnit(insn, regs.get(0).getReg()), offset);
}
示例8: isCompatible
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
if (!((insn instanceof TargetInsn) &&
(insn.getRegisters().size() == 0))) {
return false;
}
return true;
}
示例9: writeTo
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
int offset = ((TargetInsn) insn).getTargetOffset();
write(out, opcodeUnit(insn, 0), offset);
}
示例10: isCompatible
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
if (!((insn instanceof TargetInsn) &&
(regs.size() == 1) &&
unsignedFitsInByte(regs.get(0).getReg()))) {
return false;
}
TargetInsn ti = (TargetInsn) insn;
return ti.hasTargetOffset() ? branchFits(ti) : true;
}
示例11: writeTo
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
int offset = ((TargetInsn) insn).getTargetOffset();
write(out,
opcodeUnit(insn, regs.get(0).getReg()),
(short) offset);
}
示例12: isCompatible
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
if (!((insn instanceof TargetInsn) &&
(regs.size() == 2) &&
unsignedFitsInNibble(regs.get(0).getReg()) &&
unsignedFitsInNibble(regs.get(1).getReg()))) {
return false;
}
TargetInsn ti = (TargetInsn) insn;
return ti.hasTargetOffset() ? branchFits(ti) : true;
}
示例13: writeTo
import com.android.dx.dex.code.TargetInsn; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
int offset = ((TargetInsn) insn).getTargetOffset();
write(out,
opcodeUnit(insn,
makeByte(regs.get(0).getReg(), regs.get(1).getReg())),
(short) offset);
}