Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Korea smali plastic surgery
Korea smali plastic surgery
Hello,

1, original type:

V void can only be used for return value types.

Z boolean type

B byte

It's short

C character

I int

J long(64-bit)

F floating

D double precision (64-bit)

Object type:

Lpackage/name/ObjectName is equivalent to package.name.ObjectName in java, which is explained as follows:

L: indicates that this is an object type.

Package/Name: The package where the object is located.

; : Represents the end of the object name.

Representation of the array:

[I: represents a one-dimensional array of integers, which is equivalent to int [] of java;

For multidimensional arrays, just add [,[[I = int [] []; Note: each dimension is up to 255;

Representation of object array:

[Ljava/lang/String represents an object array of strings;

Representation of the method:

L package/name/object name; ——& gt; The method name (III)Z is explained as follows:

Lpackage/name/ObjectName indicates the type.

MethodName indicates the method name.

Representation of fields:

L package/name/object name; ——& gt; field name:Ljava/lang/String;

This means: package name, field name and field type.

Method parameters:

When a method is called, the parameters of the method are placed in the last n registers;

For example, a method has two parameters and five registers (v0~v4).

Then, the parameters will be put into the last two registers (v3 and v4).

The first parameter in a non-static method is always the object that calls the method;

Note: For static methods, it is the same except that this parameter is not implied.

Naming of registers:

V naming

The first registe named p is that first paramete register in this method.

Comparison: p is named to avoid the disadvantage that parameter registers need to be renumbered when adding registers to methods in the future:

Specifically, both Long and Double types are 64 bits, and two registers are required.

For example, for non-static methods

lmy object——& gt; My method (IJZ) V;

There are four parameters: LMyObject, int, long and bool need five registers to store the parameters;

P0 this

P 1 I (integer)

P3·P2 (length)

P4 Z (Boolean)