Package org.jf.baksmali.Adaptors
Class RegisterFormatter
- java.lang.Object
-
- org.jf.baksmali.Adaptors.RegisterFormatter
-
public class RegisterFormatter extends java.lang.ObjectThis class contains the logic used for formatting registers
-
-
Field Summary
Fields Modifier and Type Field Description BaksmaliOptionsoptionsintparameterRegisterCountintregisterCount
-
Constructor Summary
Constructors Constructor Description RegisterFormatter(BaksmaliOptions options, int registerCount, int parameterRegisterCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwriteRegisterRange(BaksmaliWriter writer, int startRegister, int lastRegister)Write out the register range value used by Format3rc.voidwriteTo(BaksmaliWriter writer, int register)Writes a register with the appropriate format.
-
-
-
Field Detail
-
options
@Nonnull public final BaksmaliOptions options
-
registerCount
public final int registerCount
-
parameterRegisterCount
public final int parameterRegisterCount
-
-
Constructor Detail
-
RegisterFormatter
public RegisterFormatter(@Nonnull BaksmaliOptions options, int registerCount, int parameterRegisterCount)
-
-
Method Detail
-
writeRegisterRange
public void writeRegisterRange(BaksmaliWriter writer, int startRegister, int lastRegister) throws java.io.IOException
Write out the register range value used by Format3rc. If baksmali.noParameterRegisters is true, it will always output the registers in the vformat. But if false, then it will check if *both* registers are parameter registers, and if so, use the p format for both. If only the last register is a parameter register, it will use the v format for both, otherwise it would be confusing to have something like {v20 .. p1} - Parameters:
writer- theBaksmaliWriterto write tostartRegister- the first register in the rangelastRegister- the last register in the range- Throws:
java.io.IOException
-
writeTo
public void writeTo(BaksmaliWriter writer, int register) throws java.io.IOException
Writes a register with the appropriate format. If baksmali.noParameterRegisters is true, then it will always output a register in the vformat. If false, then it determines if the register is a parameter register, and if so, formats it in the p format instead. - Parameters:
writer- theBaksmaliWriterto write toregister- the register number- Throws:
java.io.IOException
-
-