public abstract class JVMInvokeInstruction extends InvokeInstruction implements JVMInstruction
Modifier and Type | Field and Description |
---|---|
protected int |
argSize |
protected java.lang.Object[] |
arguments |
protected java.lang.String |
cname |
protected MethodInfo |
invokedMethod
watch out - this is only const for static and special invocation
all virtuals will use it only as a cache
|
protected int |
lastObj
to cache the last callee object
|
protected java.lang.String |
mname |
protected java.lang.String |
signature |
attr, insnIndex, mi, position
Modifier | Constructor and Description |
---|---|
protected |
JVMInvokeInstruction() |
protected |
JVMInvokeInstruction(java.lang.String clsName,
java.lang.String methodName,
java.lang.String signature) |
Modifier and Type | Method and Description |
---|---|
void |
accept(JVMInstructionVisitor insVisitor) |
abstract int |
getArgSize()
this is slot size, i.e.
|
java.lang.Object[] |
getArgumentAttrs(ThreadInfo ti) |
java.lang.Object |
getArgumentValue(java.lang.String id,
ThreadInfo ti)
<2do> - this relies on same order of arguments and LocalVariableTable entries, which
seems to hold for javac, but is not required by the VM spec, which only
says that arguments are stored in consecutive slots starting at 0
|
java.lang.Object[] |
getArgumentValues(ThreadInfo ti)
this is a little helper to find out about call argument values from listeners that
don't want to dig through MethodInfos and Types.
|
java.lang.Object |
getFieldOrArgumentValue(java.lang.String id,
ThreadInfo ti) |
abstract java.lang.Object |
getFieldValue(java.lang.String id,
ThreadInfo ti) |
MethodInfo |
getInvokedMethod() |
abstract MethodInfo |
getInvokedMethod(ThreadInfo ti) |
java.lang.String |
getInvokedMethodClassName()
be aware of that this might differ from getInvokedMethod(), since it only
denotes the target type info we have at the static point of the call, i.e.
|
java.lang.String |
getInvokedMethodName() |
java.lang.String |
getInvokedMethodSignature() |
int |
getLastObjRef() |
int |
getLength()
return the length in bytes of this instruction.
|
int |
getReturnType() |
java.lang.String |
getReturnTypeName() |
boolean |
hasArgumentAttr(ThreadInfo ti,
java.lang.Class<?> type)
check if there is any argument attr of the specified type
(use this before using any of the more expensive retrievers)
|
boolean |
hasArgumentObjectAttr(ThreadInfo ti,
java.lang.Class<?> type)
do we have a reference argument that has an object attribute?
less efficient, but still without object creation
|
boolean |
isCompleted(ThreadInfo ti)
this is for listeners that process instructionExecuted(), but need to
determine if there was a CG registration, an overlayed direct call
(like clinit) etc.
|
boolean |
isReferenceReturnType() |
void |
setInvokedMethod(java.lang.String clsName,
java.lang.String mthName,
java.lang.String sig)
this is for explicit initialization (not BCEL)
|
protected void |
setupCallee(ThreadInfo ti,
MethodInfo callee) |
Instruction |
typeSafeClone(MethodInfo mi)
this is overridden by any Instruction that use a cache for class or
method to provide a type safe cloning
|
reschedulesLockAcquisition
addAttr, asInstruction, attrIterator, attrIterator, cleanupTransients, execute, getAttr, getAttr, getFileLocation, getFilePos, getInstructionIndex, getLineNumber, getMethodInfo, getMnemonic, getNext, getNext, getNextAttr, getPosition, getPrev, getSourceLine, getSourceLocation, getSourceOrLocation, hasAttr, hasAttr, init, isBackJump, isExtendedInstruction, isFirstInstruction, isMonitorEnterPrologue, isSchedulingRelevant, removeAttr, replaceAttr, requiresClinitExecution, setAttr, setContext, setLocation, setMethodInfo, toPostExecString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asInstruction, execute, getByteCode, getFileLocation, getFilePos, getInstructionIndex, getLineNumber, getMethodInfo, getMnemonic, getNext, getNext, getPosition, getPrev, getSourceLine, getSourceLocation, isBackJump, isExtendedInstruction, isFirstInstruction, toPostExecString
addAttr, attrIterator, attrIterator, getAttr, getAttr, getNextAttr, hasAttr, hasAttr, removeAttr, replaceAttr, setAttr
protected java.lang.String cname
protected java.lang.String mname
protected java.lang.String signature
protected int argSize
protected int lastObj
protected MethodInfo invokedMethod
protected java.lang.Object[] arguments
protected JVMInvokeInstruction(java.lang.String clsName, java.lang.String methodName, java.lang.String signature)
protected JVMInvokeInstruction()
public int getLength()
Instruction
getLength
in interface InstructionInterface
getLength
in class Instruction
public int getLastObjRef()
public void setInvokedMethod(java.lang.String clsName, java.lang.String mthName, java.lang.String sig)
public java.lang.String getInvokedMethodClassName()
getInvokedMethodClassName
in class InvokeInstruction
public java.lang.String getInvokedMethodSignature()
getInvokedMethodSignature
in class InvokeInstruction
public java.lang.String getInvokedMethodName()
getInvokedMethodName
in class InvokeInstruction
public abstract MethodInfo getInvokedMethod(ThreadInfo ti)
public MethodInfo getInvokedMethod()
getInvokedMethod
in class InvokeInstruction
public boolean isCompleted(ThreadInfo ti)
Instruction
isCompleted
in interface InstructionInterface
isCompleted
in class Instruction
protected void setupCallee(ThreadInfo ti, MethodInfo callee)
public java.lang.Object[] getArgumentValues(ThreadInfo ti)
public java.lang.Object[] getArgumentAttrs(ThreadInfo ti)
public boolean hasArgumentAttr(ThreadInfo ti, java.lang.Class<?> type)
public boolean hasArgumentObjectAttr(ThreadInfo ti, java.lang.Class<?> type)
public abstract int getArgSize()
public int getReturnType()
public boolean isReferenceReturnType()
public java.lang.String getReturnTypeName()
public java.lang.Object getFieldOrArgumentValue(java.lang.String id, ThreadInfo ti)
public abstract java.lang.Object getFieldValue(java.lang.String id, ThreadInfo ti)
public java.lang.Object getArgumentValue(java.lang.String id, ThreadInfo ti)
public void accept(JVMInstructionVisitor insVisitor)
accept
in interface JVMInstruction
public Instruction typeSafeClone(MethodInfo mi)
Instruction
typeSafeClone
in class Instruction