org.apache.bcel.generic

Class INVOKEINTERFACE

Implemented Interfaces:
Cloneable, ExceptionThrower, Node, java.io.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
See Also:
Serialized Form

Field Summary

Fields inherited from class org.apache.bcel.classfile.FieldOrMethod

attributes, attributes_count, constant_pool, name_index, signature_index

Fields inherited from class org.apache.bcel.classfile.AccessFlags

access_flags

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.classfile.FieldOrMethod

copy_, dump, getAttributes, getConstantPool, getName, getNameIndex, getSignature, getSignatureIndex, setAttributes, setConstantPool, setNameIndex, setSignatureIndex

Methods inherited from class org.apache.bcel.classfile.AccessFlags

getAccessFlags, getModifiers, isAbstract, isAbstract, isFinal, isFinal, isInterface, isInterface, isNative, isNative, isPrivate, isPrivate, isProtected, isProtected, isPublic, isPublic, isStatic, isStatic, isStrictfp, isStrictfp, isSynchronized, isSynchronized, isTransient, isTransient, isVolatile, isVolatile, setAccessFlags, setModifiers

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.
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 FieldOrMethod
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.

toString

public String toString(ConstantPool cp)
Overrides:
toString in interface InvokeInstruction
Returns:
mnemonic for instruction with symbolic references resolved