Package org.jf.baksmali.Adaptors
Class RegisterFormatter
java.lang.Object
org.jf.baksmali.Adaptors.RegisterFormatter
This class contains the logic used for formatting registers
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRegisterFormatter(BaksmaliOptions options, int registerCount, int parameterRegisterCount) -
Method Summary
Modifier and TypeMethodDescriptionvoidwriteRegisterRange(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 Details
-
options
-
registerCount
public final int registerCount -
parameterRegisterCount
public final int parameterRegisterCount
-
-
Constructor Details
-
RegisterFormatter
public RegisterFormatter(@Nonnull BaksmaliOptions options, int registerCount, int parameterRegisterCount)
-
-
Method Details
-
writeRegisterRange
public void writeRegisterRange(BaksmaliWriter writer, int startRegister, int lastRegister) throws 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:
IOException
-
writeTo
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:
IOException
-