Top Description Constructors Methods
com.sun.org.apache.bcel.internal.generic

public abstract Class InvokeInstruction

extends FieldOrMethod
implements ExceptionThrower, StackConsumer, StackProducer
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.bcel.internal.generic.StackProducer, com.sun.org.apache.bcel.internal.generic.StackConsumer, com.sun.org.apache.bcel.internal.generic.ExceptionThrower
Known Direct Subclasses
com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE, com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL, com.sun.org.apache.bcel.internal.generic.INVOKESTATIC, com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL, com.sun.org.apache.bcel.internal.generic.INVOKEDYNAMIC
Imports
java.util.StringTokenizer, com.sun.org.apache.bcel.internal.Const, com.sun.org.apache.bcel.internal.classfile.Constant, .ConstantCP, .ConstantPool, .Utility

Super class for the INVOKExxx family of instructions.

Constructor Summary

AccessConstructor and Description
pack-priv
InvokeInstruction()

Empty constructor needed for Instruction.readInstruction.

protected
InvokeInstruction(final short opcode, final int
to constant pool
index
)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

Number of words consumed from stack by this instruction
consumeStack
(final ConstantPoolGen cpg)

Overrides com.sun.org.apache.bcel.internal.generic.Instruction.consumeStack.

Implements com.sun.org.apache.bcel.internal.generic.StackConsumer.consumeStack.

Also works for instructions whose stack effect depends on the constant pool entry they reference.
public Type[]

Returns:

argument types of referenced method.
getArgumentTypes
(final ConstantPoolGen cpg)

public String

Returns:

name of the referenced class/interface
getClassName
(final ConstantPoolGen cpg)

Overrides com.sun.org.apache.bcel.internal.generic.FieldOrMethod.getClassName.

Deprecated
This overrides the deprecated version as we know here that the referenced class may legally be an array.
public String

Returns:

name of referenced method.
getMethodName
(final ConstantPoolGen cpg)

public Type

Returns:

return type of referenced method.
getReturnType
(final ConstantPoolGen cpg)

public Type

Returns:

return type of referenced method.
getType
(final ConstantPoolGen
A ConstantPoolGen
cpg
)

Overrides com.sun.org.apache.bcel.internal.generic.CPInstruction.getType.

Implements com.sun.org.apache.bcel.internal.generic.LoadClass.getType, com.sun.org.apache.bcel.internal.generic.TypedInstruction.getType.

Returns the type associated with this instruction.
public int

Returns:

Number of words produced onto stack by this instruction
produceStack
(final ConstantPoolGen cpg)

Overrides com.sun.org.apache.bcel.internal.generic.Instruction.produceStack.

Implements com.sun.org.apache.bcel.internal.generic.StackProducer.produceStack.

Also works for instructions whose stack effect depends on the constant pool entry they reference.
public String

Returns:

mnemonic for instruction with symbolic references resolved
toString
(final ConstantPool cp)

Overrides com.sun.org.apache.bcel.internal.generic.CPInstruction.toString.

Inherited from com.sun.org.apache.bcel.internal.generic.FieldOrMethod:
getClassTypegetLoadClassTypegetNamegetReferenceTypegetSignature

Constructor Detail

InvokeInstructionback to summary
pack-priv InvokeInstruction()

Empty constructor needed for Instruction.readInstruction. Not to be used otherwise.

InvokeInstructionback to summary
protected InvokeInstruction(final short opcode, final int index)
Parameters
index:int

to constant pool

Method Detail

consumeStackback to summary
public int consumeStack(final ConstantPoolGen cpg)

Overrides com.sun.org.apache.bcel.internal.generic.Instruction.consumeStack.

Implements com.sun.org.apache.bcel.internal.generic.StackConsumer.consumeStack.

Also works for instructions whose stack effect depends on the constant pool entry they reference.

Returns:int

Number of words consumed from stack by this instruction

Annotations
@Override
getArgumentTypesback to summary
public Type[] getArgumentTypes(final ConstantPoolGen cpg)
Returns:Type[]

argument types of referenced method.

getClassNameback to summary
public String getClassName(final ConstantPoolGen cpg)

Overrides com.sun.org.apache.bcel.internal.generic.FieldOrMethod.getClassName.

Deprecated

This overrides the deprecated version as we know here that the referenced class may legally be an array.

Returns:String

name of the referenced class/interface

Annotations
@Override
@Deprecated
Exceptions
IllegalArgumentException:
if the referenced class is an array (this should not happen)
getMethodNameback to summary
public String getMethodName(final ConstantPoolGen cpg)
Returns:String

name of referenced method.

getReturnTypeback to summary
public Type getReturnType(final ConstantPoolGen cpg)
Returns:Type

return type of referenced method.

getTypeback to summary
public Type getType(final ConstantPoolGen cpg)

Overrides com.sun.org.apache.bcel.internal.generic.CPInstruction.getType.

Implements com.sun.org.apache.bcel.internal.generic.LoadClass.getType, com.sun.org.apache.bcel.internal.generic.TypedInstruction.getType.

Doc from com.sun.org.apache.bcel.internal.generic.LoadClass.getType.

Returns the type associated with this instruction. LoadClass instances are always typed, but this type does not always refer to the type of the class or interface that it possibly forces to load. For example, GETFIELD would return the type of the field and not the type of the class where the field is defined. If no class is forced to be loaded, null is returned. An example for this is an NEWARRAY instruction that creates an int[][].

Parameters
cpg:ConstantPoolGen

A ConstantPoolGen

Returns:Type

return type of referenced method.

Annotations
@Override
produceStackback to summary
public int produceStack(final ConstantPoolGen cpg)

Overrides com.sun.org.apache.bcel.internal.generic.Instruction.produceStack.

Implements com.sun.org.apache.bcel.internal.generic.StackProducer.produceStack.

Also works for instructions whose stack effect depends on the constant pool entry they reference.

Returns:int

Number of words produced onto stack by this instruction

Annotations
@Override
toStringback to summary
public String toString(final ConstantPool cp)

Overrides com.sun.org.apache.bcel.internal.generic.CPInstruction.toString.

Returns:String

mnemonic for instruction with symbolic references resolved

Annotations
@Override