public abstract class InvokeInstruction extends FieldOrMethod implements ExceptionThrower, StackConsumer, StackProducer
index
length, opcode
Modifier | Constructor and Description |
---|---|
protected |
InvokeInstruction(short opcode,
int index) |
Modifier and Type | Method and Description |
---|---|
int |
consumeStack(ConstantPoolGen cpg)
Also works for instructions whose stack effect depends on the constant pool entry they reference.
|
Type[] |
getArgumentTypes(ConstantPoolGen cpg) |
String |
getClassName(ConstantPoolGen cpg)
This overrides the deprecated version as we know here that the referenced class may legally be an array.
|
String |
getMethodName(ConstantPoolGen cpg) |
Type |
getReturnType(ConstantPoolGen cpg) |
Type |
getType(ConstantPoolGen cpg)
Returns the type associated with this instruction.
|
int |
produceStack(ConstantPoolGen cpg)
Also works for instructions whose stack effect depends on the constant pool entry they reference.
|
String |
toString(ConstantPool cp) |
getClassType, getLoadClassType, getName, getReferenceType, getSignature
dump, getIndex, initFromFile, setIndex, toString
accept, copy, equals, getComparator, getLength, getName, getOpcode, hashCode, isValidByte, isValidShort, readInstruction, setComparator, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getExceptions
protected InvokeInstruction(short opcode, int index)
index
- to constant poolpublic int consumeStack(ConstantPoolGen cpg)
consumeStack
in interface StackConsumer
consumeStack
in class Instruction
public Type[] getArgumentTypes(ConstantPoolGen cpg)
public String getClassName(ConstantPoolGen cpg)
getClassName
in class FieldOrMethod
IllegalArgumentException
- if the referenced class is an array (this should not happen)public String getMethodName(ConstantPoolGen cpg)
public Type getReturnType(ConstantPoolGen cpg)
public Type getType(ConstantPoolGen cpg)
LoadClass
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[][]
.getType
in interface LoadClass
getType
in interface TypedInstruction
getType
in class CPInstruction
cpg
- A ConstantPoolGenLoadClass.getLoadClassType(ConstantPoolGen)
public int produceStack(ConstantPoolGen cpg)
produceStack
in interface StackProducer
produceStack
in class Instruction
public String toString(ConstantPool cp)
toString
in class CPInstruction
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.