public abstract class InvokeInstruction extends FieldOrMethod implements ExceptionThrower, StackConsumer, StackProducer
indexlength, 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, getSignaturedump, getIndex, initFromFile, setIndex, toStringaccept, copy, equals, getComparator, getLength, getName, getOpcode, hashCode, isValidByte, isValidShort, readInstruction, setComparator, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetExceptionsprotected InvokeInstruction(short opcode, int index)
index - to constant poolpublic int consumeStack(ConstantPoolGen cpg)
consumeStack in interface StackConsumerconsumeStack in class Instructionpublic Type[] getArgumentTypes(ConstantPoolGen cpg)
public String getClassName(ConstantPoolGen cpg)
getClassName in class FieldOrMethodIllegalArgumentException - 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)
LoadClassGETFIELD 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 LoadClassgetType in interface TypedInstructiongetType in class CPInstructioncpg - A ConstantPoolGenLoadClass.getLoadClassType(ConstantPoolGen)public int produceStack(ConstantPoolGen cpg)
produceStack in interface StackProducerproduceStack in class Instructionpublic String toString(ConstantPool cp)
toString in class CPInstructionCopyright © 2004–2022 The Apache Software Foundation. All rights reserved.