org.apache.bcel.generic

Class INVOKEINTERFACE

Implemented Interfaces:
Cloneable, ExceptionThrower, IndexedInstruction, LoadClass, Serializable, StackConsumer, StackProducer, TypedInstruction

public final class INVOKEINTERFACE
extends InvokeInstruction

INVOKEINTERFACE - Invoke interface method
Stack: ..., objectref, [arg1, [arg2 ...]] -> ...

Version:
$Id: INVOKEINTERFACE.java,v 1.1.1.1 2001/10/29 20:00:16 jvanzyl Exp $

Author:
M. Dahm

Nested Class Summary

Field Summary

Fields inherited from class org.apache.bcel.generic.CPInstruction

index

Fields inherited from class org.apache.bcel.generic.Instruction

length, opcode

Constructor Summary

INVOKEINTERFACE(int index, int nargs)

Method Summary

void
accept(Visitor v)
Call corresponding visitor method(s).
int
consumeStack(ConstantPoolGen cpg)
Also works for instructions whose stack effect depends on the constant pool entry they reference.
void
dump(DataOutputStream out)
Dump instruction as byte code to stream out.
int
getCount()
The count argument according to the Java Language Specification, Second Edition.
Class[]
getExceptions()
protected void
initFromFile(ByteSequence bytes, boolean wide)
Read needed data (i.e., index) from file.
String
toString(ConstantPool cp)

Methods inherited from class org.apache.bcel.generic.InvokeInstruction

consumeStack, getArgumentTypes, getMethodName, getReturnType, getType, produceStack, toString

Methods inherited from class org.apache.bcel.generic.FieldOrMethod

getClassName, getClassType, getLoadClassType, getName, getSignature

Methods inherited from class org.apache.bcel.generic.CPInstruction

dump, getIndex, getType, initFromFile, setIndex, toString, toString

Methods inherited from class org.apache.bcel.generic.Instruction

accept, consumeStack, copy, dump, equals, getComparator, getLength, getName, getOpcode, initFromFile, produceStack, readInstruction, setComparator, toString, toString, toString

Constructor Details

INVOKEINTERFACE

public INVOKEINTERFACE(int index,
                       int nargs)

Method Details

accept

public void accept(Visitor v)
Call corresponding visitor method(s). The order is: Call visitor methods of implemented interfaces first, then call methods according to the class hierarchy in descending order, i.e., the most specific visitXXX() call comes last.
Overrides:
accept in interface Instruction

Parameters:
v - Visitor object


consumeStack

public int consumeStack(ConstantPoolGen cpg)
Also works for instructions whose stack effect depends on the constant pool entry they reference.
Specified by:
consumeStack in interface StackConsumer
Overrides:
consumeStack in interface InvokeInstruction

Returns:
Number of words consumed from stack by this instruction


dump

public void dump(DataOutputStream out)
            throws IOException
Dump instruction as byte code to stream out.
Overrides:
dump in interface CPInstruction

Parameters:
out - Output stream


getCount

public int getCount()
The count argument according to the Java Language Specification, Second Edition.


getExceptions

public Class[] getExceptions()
Specified by:
getExceptions in interface ExceptionThrower


initFromFile

protected void initFromFile(ByteSequence bytes,
                            boolean wide)
            throws IOException
Read needed data (i.e., index) from file.
Overrides:
initFromFile in interface CPInstruction


toString

public String toString(ConstantPool cp)
Overrides:
toString in interface InvokeInstruction

Returns:
mnemonic for instruction with symbolic references resolved