ReferenceType that applies to true classes in the JLS
sense of the definition (not an interface, not an array type). Any
ObjectReference that mirrors an instance of such a class
will have a ClassType as its type.
ObjectReference
| Modifier and Type | Field and Description |
|---|---|
| public static final int | INVOKE_SINGLE_THREADED
Perform method invocation with only the invoking thread resumed |
| Modifier and Type | Method and Description |
|---|---|
| public List | Returns: a List ofInterfaceType objects each mirroring
an interface of this ClassType in the target VM.
If none exist, returns a zero length List.Gets the interfaces directly and indirectly implemented by this class. |
| public Method | concreteMethodByName(String
the name of the method to find. name, String the signature of the method to find signature)Returns a single non-abstract |
| public List | Returns: a List ofInterfaceType objects each mirroring
a direct interface this ClassType in the target VM.
If none exist, returns a zero length List.Gets the interfaces directly implemented by this class. |
| public Value | Returns: aValue mirror of the invoked method's return value.the thread in which to invoke. thread, Method the method, List<? extends Value> Method to invoke.the list of arguments, int Value arguments bound to the
invoked method. Values from the list are assigned to arguments
in the order they appear in the method signature.the integer bit flag options. options)Invokes the specified static |
| public boolean | Returns: true if this class was declared as an enum; false
otherwise.Determine if this class was declared as an enum. |
| public ObjectReference | Returns: anObjectReference mirror of the newly created
object.the thread in which to invoke. thread, Method the constructor method, List<? extends Value> Method to invoke.the list of arguments, int Value arguments bound to the
invoked constructor. Values from the list are assigned to arguments
in the order they appear in the constructor signature.the integer bit flag options. options)Constructs a new instance of this type, using
the given constructor |
| public void | |
| public List | Returns: a List ofClassType objects each mirroring a loaded
subclass of this class in the target VM. If no such classes
exist, this method returns a zero-length list.Gets the currently loaded, direct subclasses of this class. |
| public ClassType | Returns: aClassType that mirrors the superclass
of this class in the target VM. If no such class exists,
returns nullGets the superclass of this class. |
| INVOKE_SINGLE_THREADED | back to summary |
|---|---|
| public static final int INVOKE_SINGLE_THREADED Perform method invocation with only the invoking thread resumed | |
| allInterfaces | back to summary |
|---|---|
| public List Gets the interfaces directly and indirectly implemented
by this class. Interfaces returned by
| |
| concreteMethodByName | back to summary |
|---|---|
| public Method concreteMethodByName(String name, String signature) Returns a single non-abstract
The returned method (if non-null) is a component of
| |
| interfaces | back to summary |
|---|---|
| public List Gets the interfaces directly implemented by this class. Only the interfaces that are declared with the "implements" keyword in this class are included.
| |
| invokeMethod | back to summary |
|---|---|
| public Value invokeMethod(ThreadReference thread, Method method, List<? extends Value> arguments, int options) throws InvalidTypeException, ClassNotLoadedException, IncompatibleThreadStateException, InvocationException Invokes the specified static
The method invocation will occur in the specified thread.
Method invocation can occur only if the specified thread
has been suspended by an event which occurred in that thread.
Method invocation is not supported
when the target VM has been suspended through
The specified method is invoked with the arguments in the specified
argument list. The method invocation is synchronous; this method
does not return until the invoked method returns in the target VM.
If the invoked method throws an exception, this method will throw
an Object arguments must be assignment compatible with the argument type (This implies that the argument type must be loaded through the enclosing class' class loader). Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. If the method being called accepts a variable number of arguments, then the last argument type is an array of some component type. The argument in the matching position can be omitted, or can be null, an array of the same component type, or an argument of the component type followed by any number of other arguments of the same type. If the argument is omitted, then a 0 length array of the component type is passed. The component type can be a primitive type. Autoboxing is not supported. See Section 5.2 of The Java Language Specification for more information on assignment compatibility.
By default, all threads in the target VM are resumed while
the method is being invoked if they were previously
suspended by an event or by
The resumption of other threads during the invocation can be prevented
by specifying the
If the target VM is disconnected during the invoke (for example, through
API Note Virtual threads
are typically user-mode threads scheduled by the Java runtime rather than
the operating system. As such, there may be more cases with virtual threads
where the
| |
| isEnum | back to summary |
|---|---|
| public boolean isEnum() Determine if this class was declared as an enum.
| |
| newInstance | back to summary |
|---|---|
| public ObjectReference newInstance(ThreadReference thread, Method method, List<? extends Value> arguments, int options) throws InvalidTypeException, ClassNotLoadedException, IncompatibleThreadStateException, InvocationException Constructs a new instance of this type, using
the given constructor
Instance creation will occur in the specified thread.
Instance creation can occur only if the specified thread
has been suspended by an event which occurred in that thread.
Instance creation is not supported
when the target VM has been suspended through
The specified constructor is invoked with the arguments in the specified
argument list. The invocation is synchronous; this method
does not return until the constructor returns in the target VM.
If the invoked method throws an
exception, this method will throw an Object arguments must be assignment compatible with the argument type (This implies that the argument type must be loaded through the enclosing class' class loader). Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. If the method being called accepts a variable number of arguments, then the last argument type is an array of some component type. The argument in the matching position can be omitted, or can be null, an array of the same component type, or an argument of the component type, followed by any number of other arguments of the same type. If the argument is omitted, then a 0 length array of the component type is passed. The component type can be a primitive type. Autoboxing is not supported. See section 5.2 of The Java Language Specification for more information on assignment compatibility.
By default, all threads in the target VM are resumed while
the method is being invoked if they were previously
suspended by an event or by
The resumption of other threads during the invocation can be prevented
by specifying the
If the target VM is disconnected during the invoke (for example, through
API Note Virtual threads
are typically user-mode threads scheduled by the Java runtime rather than
the operating system. As such, there may be more cases with virtual threads
where the
| |
| setValue | back to summary |
|---|---|
| public void setValue(Field field, Value value) throws InvalidTypeException, ClassNotLoadedException Assigns a value to a static field.
The Object values must be assignment compatible with the field type (This implies that the field type must be loaded through the enclosing class' class loader). Primitive values must be either assignment compatible with the field type or must be convertible to the field type without loss of information. See JLS section 5.2 for more information on assignment compatibility.
| |
| subclasses | back to summary |
|---|---|
| public List Gets the currently loaded, direct subclasses of this class. No ordering of this list is guaranteed. | |
| superclass | back to summary |
|---|---|
| public ClassType superclass() Gets the superclass of this class. | |