org.jf.dexlib2.util.Preconditions Java Examples

The following examples show how to use org.jf.dexlib2.util.Preconditions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ImmutableInstruction35mi.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
public ImmutableInstruction35mi(@Nonnull Opcode opcode,
                                int registerCount,
                                int registerC,
                                int registerD,
                                int registerE,
                                int registerF,
                                int registerG,
                                int inlineIndex) {
    super(opcode);
    this.registerCount = Preconditions.check35cRegisterCount(registerCount);
    this.registerC = (registerCount>0) ? Preconditions.checkNibbleRegister(registerC) : 0;
    this.registerD = (registerCount>1) ? Preconditions.checkNibbleRegister(registerD) : 0;
    this.registerE = (registerCount>2) ? Preconditions.checkNibbleRegister(registerE) : 0;
    this.registerF = (registerCount>3) ? Preconditions.checkNibbleRegister(registerF) : 0;
    this.registerG = (registerCount>4) ? Preconditions.checkNibbleRegister(registerG) : 0;
    this.inlineIndex = Preconditions.checkInlineIndex(inlineIndex);
}
 
Example #2
Source File: ImmutableInstruction35mi.java    From zjdroid with Apache License 2.0 6 votes vote down vote up
public ImmutableInstruction35mi(@Nonnull Opcode opcode,
                                int registerCount,
                                int registerC,
                                int registerD,
                                int registerE,
                                int registerF,
                                int registerG,
                                int inlineIndex) {
    super(opcode);
    this.registerCount = Preconditions.check35cRegisterCount(registerCount);
    this.registerC = (registerCount>0) ? Preconditions.checkNibbleRegister(registerC) : 0;
    this.registerD = (registerCount>1) ? Preconditions.checkNibbleRegister(registerD) : 0;
    this.registerE = (registerCount>2) ? Preconditions.checkNibbleRegister(registerE) : 0;
    this.registerF = (registerCount>3) ? Preconditions.checkNibbleRegister(registerF) : 0;
    this.registerG = (registerCount>4) ? Preconditions.checkNibbleRegister(registerG) : 0;
    this.inlineIndex = Preconditions.checkInlineIndex(inlineIndex);
}
 
Example #3
Source File: ImmutableInstruction35ms.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
public ImmutableInstruction35ms(@Nonnull Opcode opcode,
                                int registerCount,
                                int registerC,
                                int registerD,
                                int registerE,
                                int registerF,
                                int registerG,
                                int vtableIndex) {
    super(opcode);
    this.registerCount = Preconditions.check35cRegisterCount(registerCount);
    this.registerC = (registerCount>0) ? Preconditions.checkNibbleRegister(registerC) : 0;
    this.registerD = (registerCount>1) ? Preconditions.checkNibbleRegister(registerD) : 0;
    this.registerE = (registerCount>2) ? Preconditions.checkNibbleRegister(registerE) : 0;
    this.registerF = (registerCount>3) ? Preconditions.checkNibbleRegister(registerF) : 0;
    this.registerG = (registerCount>4) ? Preconditions.checkNibbleRegister(registerG) : 0;
    this.vtableIndex = Preconditions.checkVtableIndex(vtableIndex);
}
 
Example #4
Source File: ImmutableInstruction35c.java    From ZjDroid with Apache License 2.0 6 votes vote down vote up
public ImmutableInstruction35c(@Nonnull Opcode opcode,
                               int registerCount,
                               int registerC,
                               int registerD,
                               int registerE,
                               int registerF,
                               int registerG,
                               @Nonnull Reference reference) {
    super(opcode);
    this.registerCount = Preconditions.check35cRegisterCount(registerCount);
    this.registerC = (registerCount>0) ? Preconditions.checkNibbleRegister(registerC) : 0;
    this.registerD = (registerCount>1) ? Preconditions.checkNibbleRegister(registerD) : 0;
    this.registerE = (registerCount>2) ? Preconditions.checkNibbleRegister(registerE) : 0;
    this.registerF = (registerCount>3) ? Preconditions.checkNibbleRegister(registerF) : 0;
    this.registerG = (registerCount>4) ? Preconditions.checkNibbleRegister(registerG) : 0;
    this.reference = ImmutableReferenceFactory.of(opcode.referenceType, reference);
}
 
Example #5
Source File: ImmutableInstruction35c.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
public ImmutableInstruction35c(@Nonnull Opcode opcode,
                               int registerCount,
                               int registerC,
                               int registerD,
                               int registerE,
                               int registerF,
                               int registerG,
                               @Nonnull Reference reference) {
    super(opcode);
    this.registerCount = Preconditions.check35cRegisterCount(registerCount);
    this.registerC = (registerCount>0) ? Preconditions.checkNibbleRegister(registerC) : 0;
    this.registerD = (registerCount>1) ? Preconditions.checkNibbleRegister(registerD) : 0;
    this.registerE = (registerCount>2) ? Preconditions.checkNibbleRegister(registerE) : 0;
    this.registerF = (registerCount>3) ? Preconditions.checkNibbleRegister(registerF) : 0;
    this.registerG = (registerCount>4) ? Preconditions.checkNibbleRegister(registerG) : 0;
    this.reference = ImmutableReferenceFactory.of(opcode.referenceType, reference);
}
 
Example #6
Source File: ImmutableInstruction35ms.java    From zjdroid with Apache License 2.0 6 votes vote down vote up
public ImmutableInstruction35ms(@Nonnull Opcode opcode,
                                int registerCount,
                                int registerC,
                                int registerD,
                                int registerE,
                                int registerF,
                                int registerG,
                                int vtableIndex) {
    super(opcode);
    this.registerCount = Preconditions.check35cRegisterCount(registerCount);
    this.registerC = (registerCount>0) ? Preconditions.checkNibbleRegister(registerC) : 0;
    this.registerD = (registerCount>1) ? Preconditions.checkNibbleRegister(registerD) : 0;
    this.registerE = (registerCount>2) ? Preconditions.checkNibbleRegister(registerE) : 0;
    this.registerF = (registerCount>3) ? Preconditions.checkNibbleRegister(registerF) : 0;
    this.registerG = (registerCount>4) ? Preconditions.checkNibbleRegister(registerG) : 0;
    this.vtableIndex = Preconditions.checkVtableIndex(vtableIndex);
}
 
Example #7
Source File: BuilderInstruction35c.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
public BuilderInstruction35c(@Nonnull Opcode opcode,
                             int registerCount,
                             int registerC,
                             int registerD,
                             int registerE,
                             int registerF,
                             int registerG,
                             @Nonnull Reference reference) {
    super(opcode);
    this.registerCount = Preconditions.check35cRegisterCount(registerCount);
    this.registerC = (registerCount>0) ? Preconditions.checkNibbleRegister(registerC) : 0;
    this.registerD = (registerCount>1) ? Preconditions.checkNibbleRegister(registerD) : 0;
    this.registerE = (registerCount>2) ? Preconditions.checkNibbleRegister(registerE) : 0;
    this.registerF = (registerCount>3) ? Preconditions.checkNibbleRegister(registerF) : 0;
    this.registerG = (registerCount>4) ? Preconditions.checkNibbleRegister(registerG) : 0;
    this.reference = reference;
}
 
Example #8
Source File: ImmutableInstruction35ms.java    From HeyGirl with Apache License 2.0 6 votes vote down vote up
public ImmutableInstruction35ms(@Nonnull Opcode opcode,
                                int registerCount,
                                int registerC,
                                int registerD,
                                int registerE,
                                int registerF,
                                int registerG,
                                int vtableIndex) {
    super(opcode);
    this.registerCount = Preconditions.check35cRegisterCount(registerCount);
    this.registerC = (registerCount>0) ? Preconditions.checkNibbleRegister(registerC) : 0;
    this.registerD = (registerCount>1) ? Preconditions.checkNibbleRegister(registerD) : 0;
    this.registerE = (registerCount>2) ? Preconditions.checkNibbleRegister(registerE) : 0;
    this.registerF = (registerCount>3) ? Preconditions.checkNibbleRegister(registerF) : 0;
    this.registerG = (registerCount>4) ? Preconditions.checkNibbleRegister(registerG) : 0;
    this.vtableIndex = Preconditions.checkVtableIndex(vtableIndex);
}
 
Example #9
Source File: ImmutableInstruction31i.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public ImmutableInstruction31i(@Nonnull Opcode opcode,
                               int registerA,
                               int literal) {
    super(opcode);
    this.registerA = Preconditions.checkByteRegister(registerA);
    this.literal = literal;
}
 
Example #10
Source File: ImmutableInstruction21s.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public ImmutableInstruction21s(@Nonnull Opcode opcode,
                               int registerA,
                               int literal) {
    super(opcode);
    this.registerA = Preconditions.checkByteRegister(registerA);
    this.literal = Preconditions.checkShortLiteral(literal);
}
 
Example #11
Source File: BuilderInstruction22x.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction22x(@Nonnull Opcode opcode,
                             int registerA,
                             int registerB) {
    super(opcode);
    this.registerA = Preconditions.checkByteRegister(registerA);
    this.registerB = Preconditions.checkShortRegister(registerB);
}
 
Example #12
Source File: BuilderInstruction23x.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction23x(@Nonnull Opcode opcode,
                             int registerA,
                             int registerB,
                             int registerC) {
    super(opcode);
    this.registerA = Preconditions.checkByteRegister(registerA);
    this.registerB = Preconditions.checkByteRegister(registerB);
    this.registerC = Preconditions.checkByteRegister(registerC);
}
 
Example #13
Source File: BuilderInstruction21c.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction21c(@Nonnull Opcode opcode,
                             int registerA,
                             @Nonnull Reference reference) {
    super(opcode);
    this.registerA = Preconditions.checkByteRegister(registerA);
    this.reference = reference;
}
 
Example #14
Source File: BuilderInstruction21s.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction21s(@Nonnull Opcode opcode,
                             int registerA,
                             int literal) {
    super(opcode);
    this.registerA = Preconditions.checkByteRegister(registerA);
    this.literal = Preconditions.checkShortLiteral(literal);
}
 
Example #15
Source File: ImmutableInstruction22t.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public ImmutableInstruction22t(@Nonnull Opcode opcode,
                               int registerA,
                               int registerB,
                               int codeOffset) {
    super(opcode);
    this.registerA = Preconditions.checkNibbleRegister(registerA);
    this.registerB = Preconditions.checkNibbleRegister(registerB);
    this.codeOffset = Preconditions.checkShortCodeOffset(codeOffset);
}
 
Example #16
Source File: ImmutableInstruction20bc.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public ImmutableInstruction20bc(@Nonnull Opcode opcode,
                               int verificationError,
                               @Nonnull Reference reference) {
    super(opcode);
    this.verificationError = Preconditions.checkVerificationError(verificationError);
    this.reference = ImmutableReferenceFactory.of(opcode.referenceType, reference);
}
 
Example #17
Source File: ImmutableInstruction20bc.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public ImmutableInstruction20bc(@Nonnull Opcode opcode,
                               int verificationError,
                               @Nonnull Reference reference) {
    super(opcode);
    this.verificationError = Preconditions.checkVerificationError(verificationError);
    this.reference = ImmutableReferenceFactory.of(opcode.referenceType, reference);
}
 
Example #18
Source File: ImmutableInstruction22c.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public ImmutableInstruction22c(@Nonnull Opcode opcode,
                               int registerA,
                               int registerB,
                               @Nonnull Reference reference) {
    super(opcode);
    this.registerA = Preconditions.checkNibbleRegister(registerA);
    this.registerB = Preconditions.checkNibbleRegister(registerB);
    this.reference = ImmutableReferenceFactory.of(opcode.referenceType, reference);
}
 
Example #19
Source File: ImmutableInstruction3rc.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public ImmutableInstruction3rc(@Nonnull Opcode opcode,
                               int startRegister,
                               int registerCount,
                               @Nonnull Reference reference) {
    super(opcode);
    this.startRegister = Preconditions.checkShortRegister(startRegister);
    this.registerCount = Preconditions.checkRegisterRangeCount(registerCount);
    this.reference = ImmutableReferenceFactory.of(opcode.referenceType, reference);
}
 
Example #20
Source File: BuilderInstruction51l.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction51l(@Nonnull Opcode opcode,
                             int registerA,
                             long literal) {
    super(opcode);
    this.registerA = Preconditions.checkByteRegister(registerA);
    this.literal = literal;
}
 
Example #21
Source File: BuilderInstruction32x.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction32x(@Nonnull Opcode opcode,
                             int registerA,
                             int registerB) {
    super(opcode);
    this.registerA = Preconditions.checkShortRegister(registerA);
    this.registerB = Preconditions.checkShortRegister(registerB);
}
 
Example #22
Source File: BuilderInstruction23x.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction23x(@Nonnull Opcode opcode,
                             int registerA,
                             int registerB,
                             int registerC) {
    super(opcode);
    this.registerA = Preconditions.checkByteRegister(registerA);
    this.registerB = Preconditions.checkByteRegister(registerB);
    this.registerC = Preconditions.checkByteRegister(registerC);
}
 
Example #23
Source File: ImmutableInstruction23x.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
public ImmutableInstruction23x(@Nonnull Opcode opcode,
                               int registerA,
                               int registerB,
                               int registerC) {
    super(opcode);
    this.registerA = Preconditions.checkByteRegister(registerA);
    this.registerB = Preconditions.checkByteRegister(registerB);
    this.registerC = Preconditions.checkByteRegister(registerC);
}
 
Example #24
Source File: BuilderInstruction12x.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction12x(@Nonnull Opcode opcode,
                             int registerA,
                             int registerB) {
    super(opcode);
    this.registerA = Preconditions.checkNibbleRegister(registerA);
    this.registerB = Preconditions.checkNibbleRegister(registerB);
}
 
Example #25
Source File: BuilderInstruction22t.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction22t(@Nonnull Opcode opcode,
                             int registerA,
                             int registerB,
                             @Nonnull Label target) {
    super(opcode, target);
    this.registerA = Preconditions.checkNibbleRegister(registerA);
    this.registerB = Preconditions.checkNibbleRegister(registerB);
}
 
Example #26
Source File: BuilderInstruction21c.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction21c(@Nonnull Opcode opcode,
                             int registerA,
                             @Nonnull Reference reference) {
    super(opcode);
    this.registerA = Preconditions.checkByteRegister(registerA);
    this.reference = reference;
}
 
Example #27
Source File: ImmutableInstruction12x.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public ImmutableInstruction12x(@Nonnull Opcode opcode,
                               int registerA,
                               int registerB) {
    super(opcode);
    this.registerA = Preconditions.checkNibbleRegister(registerA);
    this.registerB = Preconditions.checkNibbleRegister(registerB);
}
 
Example #28
Source File: BuilderInstruction3rc.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction3rc(@Nonnull Opcode opcode,
                             int startRegister,
                             int registerCount,
                             @Nonnull Reference reference) {
    super(opcode);
    this.startRegister = Preconditions.checkShortRegister(startRegister);
    this.registerCount = Preconditions.checkRegisterRangeCount(registerCount);
    this.reference = reference;
}
 
Example #29
Source File: BuilderInstruction22t.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public BuilderInstruction22t(@Nonnull Opcode opcode,
                             int registerA,
                             int registerB,
                             @Nonnull Label target) {
    super(opcode, target);
    this.registerA = Preconditions.checkNibbleRegister(registerA);
    this.registerB = Preconditions.checkNibbleRegister(registerB);
}
 
Example #30
Source File: ImmutableInstruction31t.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public ImmutableInstruction31t(@Nonnull Opcode opcode,
                               int registerA,
                               int codeOffset) {
    super(opcode);
    this.registerA = Preconditions.checkByteRegister(registerA);
    this.codeOffset = codeOffset;
}