Code example for BitSet

Methods: set

0
 
    /** {@inheritDoc} */ 
    @Override 
    public BitSet compatibleRegs(DalvInsn insn) {
        RegisterSpecList regs = insn.getRegisters();
        BitSet bits = new BitSet(2);
 
        bits.set(0, unsignedFitsInByte(regs.get(0).getReg()));
        bits.set(1, unsignedFitsInByte(regs.get(1).getReg()));
        return bits;
    } 
 
    /** {@inheritDoc} */ 
    @Override 
    public void writeTo(AnnotatedOutput out, DalvInsn insn) {
        RegisterSpecList regs = insn.getRegisters();
        int value =
            ((CstLiteralBits) ((CstInsn) insn).getConstant()).getIntBits();
 
        write(out,
              opcodeUnit(insn, regs.get(0).getReg()),