Class MethodState
- All Implemented Interfaces:
Serializable
Holds on to the state of a method frame.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final int
private final Object[]
private final LockState
private final int
private MethodState
private MethodState
private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionMethodState
(String className, int methodId, int continuationPoint, Object[] data, LockState lockState) Do not use -- for internal use only. -
Method Summary
Modifier and TypeMethodDescriptionDo not use -- for internal use only.int
Do not use -- for internal use only.Object[]
getData()
Do not use -- for internal use only.static String
getIdentifyingFieldName
(int methodId, int continuationPointId) Do not use -- for internal use only.Do not use -- for internal use only.int
Do not use -- for internal use only.(package private) MethodState
getNext()
Do not use -- for internal use only.(package private) MethodState
Do not use -- for internal use only.static boolean
isValid
(ClassLoader classLoader, String className, int methodId, int continuationPointId) Do not use -- for internal use only.(package private) void
setNext
(MethodState next) Do not use -- for internal use only.(package private) void
setPrevious
(MethodState previous) Do not use -- for internal use only.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
className
-
methodId
private final int methodId -
continuationPoint
private final int continuationPoint -
data
-
lockState
-
next
-
previous
-
-
Constructor Details
-
MethodState
public MethodState(String className, int methodId, int continuationPoint, Object[] data, LockState lockState) Do not use -- for internal use only.Constructs a
MethodState
object.- Parameters:
className
- name of owner (class) for method at which state was savedmethodId
- identifier for method at which state was savedcontinuationPoint
- point in the method at which state was saved (does not refer to offset, just an id that's generated by the instrumenter to mark that point)data
- locals and operand stack at the point which state was savedlockState
- monitors entered at the point which state was saved (may benull
)
-
-
Method Details
-
getClassName
Do not use -- for internal use only.Get name of owner (class) for method at which state was saved
- Returns:
- name of owner (class) for method at which state was saved
-
getMethodId
public int getMethodId()Do not use -- for internal use only.Get identifier of method for which state was saved
- Returns:
- ID of method for which state was saved
-
getContinuationPoint
public int getContinuationPoint()Do not use -- for internal use only.Get the point in the code at which state was saved (does not refer to offset, just an id that's generated by the instrumenter to mark that point)
- Returns:
- point in the code at which state was saved
-
getData
Do not use -- for internal use only.Get locals and operand stack at the point which state was saved.
- Returns:
- locals and operand stack at the point which state was saved
-
getLockState
Do not use -- for internal use only.Get the monitors entered at the point which state was saved.
- Returns:
- monitors entered at the point which state was saved
-
getNext
MethodState getNext()Do not use -- for internal use only.Get the next method state.
- Returns:
- next method state
-
setNext
Do not use -- for internal use only.Set the next method state.
- Parameters:
next
- next method state
-
getPrevious
MethodState getPrevious()Do not use -- for internal use only.Get the previous method state.
- Returns:
- previous method state
-
setPrevious
Do not use -- for internal use only.Set the previous method state.
- Parameters:
previous
- previous method state
-
isValid
public static boolean isValid(ClassLoader classLoader, String className, int methodId, int continuationPointId) Do not use -- for internal use only.Determine if this method state is valid. Valid means that the method that this method state is for exists and the method is the correct version for this method state.
- Parameters:
classLoader
- class loader to use to look for the class (null
will attempt to use this Object's classloader / the thread's context class loader)className
- class namemethodId
- method idcontinuationPointId
- continuation point id- Returns:
true
if method for this method state exists and is of the correct version,false
otherwise- Throws:
NullPointerException
- ifclassName
isnull
IllegalArgumentException
- ifcontinuationPointId < 0
-
getIdentifyingFieldName
Do not use -- for internal use only.Get the name of the field that will be inserted into a class for some method id and version combination.
- Parameters:
methodId
- method idcontinuationPointId
- continuation point id- Returns:
- field name
- Throws:
IllegalArgumentException
- ifcontinuationPointId < 0
-