code array of a Code attribute, other than invokedynamic.
Corresponding opcodes have a kind of Opcode.Kind#INVOKE .
Delivered as a CodeElement when traversing the elements of a CodeModel.
A method invocation instruction is composite:
InvokeInstruction( Opcode opcode, MethodRefEntry | InterfaceMethodRefEntry method) )
method must be an InterfaceMethodRefEntry for invokeinterface opcode, and must be a MethodRefEntry for invokevirtual opcode.
invokestatic and invokespecial can have either type of entry for method.
Opcode.Kind#INVOKE , CodeBuilder::invoke
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: thecount value of an invokeinterface instruction,
or 0 for other instructionsReturns the |
| public boolean | Returns: whether the class or interface holding the method is an interfaceReturns whether the class or interface holding the method is an interface. |
| public MemberRefEntry | method()
Returns the |
| public default Utf8Entry | |
| public static InvokeInstruction | Returns: an invocation instructionthe opcode for the specific type of invocation instruction,
which must be of kind op, MemberRefEntry Opcode.a constant pool entry describing the method method)Returns an invocation instruction. |
| public static InvokeInstruction | Returns: an invocation instructionthe opcode for the specific type of invocation instruction,
which must be of kind op, ClassEntry Opcode.the class holding the method owner, Utf8Entry the name of the method name, Utf8Entry the method descriptor type, boolean whether the class holding the method is an interface isInterface)Returns an invocation instruction. |
| public static InvokeInstruction | Returns: an invocation instructionthe opcode for the specific type of invocation instruction,
which must be of kind op, ClassEntry Opcode.the class holding the method owner, NameAndTypeEntry the name and type of the method nameAndType, boolean whether the class holding the method is an interface isInterface)Returns an invocation instruction. |
| public default ClassEntry | Returns: the class or interface holding the methodReturns the class or interface holding the method. |
| public default Utf8Entry | Returns: the method descriptor string of the methodReturns the method descriptor string of the method. |
| public default MethodTypeDesc | Returns: a symbolic descriptor for the method typeReturns a symbolic descriptor for the method type. |
| count | back to summary |
|---|---|
| public int count() Returns the
For an
| |
| isInterface | back to summary |
|---|---|
| public boolean isInterface() Returns whether the class or interface holding the method is an interface.
| |
| method | back to summary |
|---|---|
| public MemberRefEntry method() Returns the
| |
| name | back to summary |
|---|---|
| public default Utf8Entry name() Returns the name of the method.
| |
| of | back to summary |
|---|---|
| public static InvokeInstruction of(Opcode op, MemberRefEntry method) Returns an invocation instruction.
| |
| of | back to summary |
|---|---|
| public static InvokeInstruction of(Opcode op, ClassEntry owner, Utf8Entry name, Utf8Entry type, boolean isInterface) Returns an invocation instruction.
| |
| of | back to summary |
|---|---|
| public static InvokeInstruction of(Opcode op, ClassEntry owner, NameAndTypeEntry nameAndType, boolean isInterface) Returns an invocation instruction.
| |
| owner | back to summary |
|---|---|
| public default ClassEntry owner() Returns the class or interface holding the method.
| |
| type | back to summary |
|---|---|
| public default Utf8Entry type() Returns the method descriptor string of the method. API Note A symbolic descriptor for the type of the method is available through
| |
| typeSymbol | back to summary |
|---|---|
| public default MethodTypeDesc typeSymbol() Returns a symbolic descriptor for the method type.
| |