Package jminusminus
Class CLMethodInstruction
java.lang.Object
jminusminus.CLInstruction
jminusminus.CLMethodInstruction
Representation for METHOD1 and METHOD2 instructions.
- 
Field SummaryFields inherited from class jminusminus.CLInstructioninstructionInfo, localVariableIndex, mnemonic, opcode, operandCount, pc, stackUnits
- 
Constructor SummaryConstructorsConstructorDescriptionCLMethodInstruction(int opcode, int pc) Constructs a CLMethodInstruction object for METHOD2 instructions.CLMethodInstruction(int opcode, int pc, int index, int stackUnits) Constructs a CLMethodInstruction object for METHOD1 instructions.
- 
Method SummaryModifier and TypeMethodDescriptionvoidsetArgumentCount(int nArgs) Sets the number of arguments for the method for INVOKEINTERFACE instruction.toBytes()Returns the bytecode for this instruction.Methods inherited from class jminusminus.CLInstructionbyteAt, isValid, localVariableIndex, mnemonic, opcode, operandCount, pc, stackUnits
- 
Constructor Details- 
CLMethodInstructionpublic CLMethodInstruction(int opcode, int pc, int index, int stackUnits) Constructs a CLMethodInstruction object for METHOD1 instructions.- Parameters:
- opcode- the opcode for this instruction.
- pc- index of this instruction within the code array of a method.
- index- index into the constant pool, the item at which contains the name and descriptor of the method.
- stackUnits- words produced - words consumed from the operand stack by this instruction.
 
- 
CLMethodInstructionpublic CLMethodInstruction(int opcode, int pc) Constructs a CLMethodInstruction object for METHOD2 instructions.- Parameters:
- opcode- the opcode for this instruction.
- pc- index of this instruction within the code array of a method.
 
 
- 
- 
Method Details- 
setArgumentCountpublic void setArgumentCount(int nArgs) Sets the number of arguments for the method for INVOKEINTERFACE instruction.- Parameters:
- nArgs- number of arguments for the method.
 
- 
toBytesReturns the bytecode for this instruction.- Specified by:
- toBytesin class- CLInstruction
- Returns:
- the bytecode for this instruction.
 
 
-