Package xyz.cofe.trambda.bc.mth
Class MIincInsn
- java.lang.Object
-
- xyz.cofe.trambda.bc.mth.MAbstractBC
-
- xyz.cofe.trambda.bc.mth.MIincInsn
-
- All Implemented Interfaces:
Serializable
,xyz.cofe.collection.ImTree<ByteCode>
,xyz.cofe.collection.ImTreeWalk<ByteCode>
,ByteCode
,MethodByteCode
,MethodWriter
public class MIincInsn extends MAbstractBC implements MethodWriter
Increment local variable by constant (jvm spec).Operation
Increment local variable by constantFormat
iinc index const
Forms
iinc = 132 (0x84)Operand Stack
No changeDescription
The index is an unsigned byte that must be an index into the local variable array of the current frame (§2.6). The const is an immediate signed byte. The local variable at index must contain an int. The value const is first sign-extended to an int, and then the local variable at index is incremented by that amount.Notes
The iinc opcode can be used in conjunction with the wide instruction (§wide) to access a local variable using a two-byte unsigned index and to increment it by a two-byte immediate signed value.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MIincInsn
clone()
int
getIncrement()
Возвращает величину увеличения значения переменнойint
getVariable()
Возвращает индекс переменнойvoid
setIncrement(int increment)
Указывает величину увеличения значения переменнойvoid
setVariable(int variable)
Указывает индекс переменнойString
toString()
void
write(org.objectweb.asm.MethodVisitor v, MethodWriterCtx ctx)
-
-
-
Constructor Detail
-
MIincInsn
public MIincInsn()
Конструктор по умолчанию
-
MIincInsn
public MIincInsn(int variable, int increment)
-
MIincInsn
public MIincInsn(MIincInsn sample)
Конструктор копирования- Parameters:
sample
- образец
-
-
Method Detail
-
clone
public MIincInsn clone()
- Specified by:
clone
in interfaceMethodByteCode
- Specified by:
clone
in classMAbstractBC
-
getVariable
public int getVariable()
Возвращает индекс переменной- Returns:
- индекс переменной
-
setVariable
public void setVariable(int variable)
Указывает индекс переменной- Parameters:
variable
- индекс переменной
-
getIncrement
public int getIncrement()
Возвращает величину увеличения значения переменной- Returns:
- значение
-
setIncrement
public void setIncrement(int increment)
Указывает величину увеличения значения переменной- Parameters:
increment
- значение
-
write
public void write(org.objectweb.asm.MethodVisitor v, MethodWriterCtx ctx)
- Specified by:
write
in interfaceMethodWriter
-
-