joeq.Compiler.BytecodeAnalysis
Class Bytecodes.InvokeInstruction

java.lang.Object
  extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
      extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.CPInstruction
          extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.FieldOrMethod
              extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.InvokeInstruction
All Implemented Interfaces:
Serializable, Cloneable, Bytecodes.ExceptionThrower, Bytecodes.LoadClass, Bytecodes.StackConsumer, Bytecodes.StackProducer, Bytecodes.TypedInstruction
Direct Known Subclasses:
Bytecodes.INVOKEINTERFACE, Bytecodes.INVOKESPECIAL, Bytecodes.INVOKESTATIC, Bytecodes.INVOKEVIRTUAL
Enclosing interface:
Bytecodes

public abstract static class Bytecodes.InvokeInstruction
extends Bytecodes.FieldOrMethod
implements Bytecodes.ExceptionThrower, Bytecodes.TypedInstruction, Bytecodes.StackConsumer, Bytecodes.StackProducer

See Also:
Serialized Form

Field Summary
 
Fields inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.CPInstruction
index, o
 
Fields inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
length, opcode
 
Constructor Summary
protected Bytecodes.InvokeInstruction(short opcode, jq_Method f)
           
 
Method Summary
 int consumeStack()
          Also works for instructions whose stack effect depends on the constant pool entry they reference.
 jq_Type[] getArgumentTypes()
           
 jq_Method getMethod()
           
 String getMethodName()
           
 jq_Type getReturnType()
           
 jq_Type getType()
          Returns the type associated with this instruction.
 int produceStack()
          Also works for instructions whose stack effect depends on the constant pool entry they reference.
 String toString()
           
 
Methods inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.FieldOrMethod
getClassName, getClassType, getLoadClassType, getName, getSignature, initFromFile
 
Methods inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.CPInstruction
dump, getIndex, getObject, setIndex, setObject, toString
 
Methods inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
accept, copy, getLength, getOpcode, readInstruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface joeq.Compiler.BytecodeAnalysis.Bytecodes.ExceptionThrower
getExceptions
 

Constructor Detail

Bytecodes.InvokeInstruction

protected Bytecodes.InvokeInstruction(short opcode,
                                      jq_Method f)
Parameters:
opcode - instruction opcode
f - method
Method Detail

toString

public String toString()
Overrides:
toString in class Bytecodes.CPInstruction
Returns:
mnemonic for instruction with symbolic references resolved

getMethod

public jq_Method getMethod()

consumeStack

public int consumeStack()
Also works for instructions whose stack effect depends on the constant pool entry they reference.

Specified by:
consumeStack in interface Bytecodes.StackConsumer
Overrides:
consumeStack in class Bytecodes.Instruction
Returns:
Number of words consumed from stack by this instruction

produceStack

public int produceStack()
Also works for instructions whose stack effect depends on the constant pool entry they reference.

Specified by:
produceStack in interface Bytecodes.StackProducer
Overrides:
produceStack in class Bytecodes.Instruction
Returns:
Number of words produced onto stack by this instruction

getType

public jq_Type getType()
Description copied from interface: Bytecodes.LoadClass
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 ANEWARRAY instruction that creates an int[][].

Specified by:
getType in interface Bytecodes.LoadClass
Specified by:
getType in interface Bytecodes.TypedInstruction
Overrides:
getType in class Bytecodes.CPInstruction
Returns:
return type of referenced method.
See Also:
Bytecodes.LoadClass.getLoadClassType()

getMethodName

public String getMethodName()
Returns:
name of referenced method.

getReturnType

public jq_Type getReturnType()
Returns:
return type of referenced method.

getArgumentTypes

public jq_Type[] getArgumentTypes()
Returns:
argument types of referenced method.


Copyright © 2001-2008 John Whaley. All Rights Reserved.