|
Java Debug Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides access to an array object and its components in the target VM.
Each array component is mirrored by a Value
object.
The array components, in aggregate, are placed in List
objects instead of arrays for consistency with the rest of the API and
for interoperability with other APIs.
Fields inherited from class com.sun.jdi.ObjectReference |
INVOKE_NONVIRTUAL,
INVOKE_SINGLE_THREADED |
Method Summary | |
Value |
getValue(int index)
Returns an array component value. |
java.util.List |
getValues()
Returns all of the components in this array. |
java.util.List |
getValues(int index,
int length)
Returns a range of array components. |
int |
length()
Returns the number of components in this array. |
void |
setValue(int index,
Value value)
Replaces an array component with another value. |
void |
setValues(int index,
java.util.List values,
int srcIndex,
int length)
Replaces a range of array components with other values. |
void |
setValues(java.util.List values)
Replaces all array components with other values. |
Methods inherited from interface com.sun.jdi.ObjectReference |
disableCollection,
enableCollection,
entryCount,
equals,
getValue,
getValues,
hashCode,
invokeMethod,
isCollected,
owningThread,
referenceType,
setValue,
uniqueID,
waitingThreads |
Methods inherited from interface com.sun.jdi.Value |
type |
Methods inherited from interface com.sun.jdi.Mirror |
toString,
virtualMachine |
Method Detail |
public int length()
public Value getValue(int index)
index
- the index of the component to retrieveValue
at the given index.public java.util.List getValues()
Value
objects, one for each array
component ordered by array index.public java.util.List getValues(int index, int length)
index
- the index of the first component to retrievelength
- the number of components to retrieve, or -1 to
retrieve all components to the end of this array.Value
objects, one for each requested
array component ordered by array index.index + length
is an index beyond the end of this array.public void setValue(int index, Value value) throws InvalidTypeException, ClassNotLoadedException
Object values must be assignment compatible with the component type (This implies that the component type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the component type or must be convertible to the component type without loss of information. See JLS section 5.2 for more information on assignment compatibility.
value
- the new valueindex
- the index of the component to setindex
is beyond the end of this array.value
is not compatible with the declared type of array components.Mirror
argument and this object
do not belong to the same VirtualMachine
.public void setValues(java.util.List values) throws InvalidTypeException, ClassNotLoadedException
Object values must be assignment compatible with the element type (This implies that the component type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the component type or must be convertible to the component type without loss of information. See JLS section 5.2 for more information on assignment compatibility.
values
- a list of Value
objects to be placed
in this arrayvalues
is not compatible with the declared type of array components.values
is larger than the length of this array.Mirror
argument and this object
do not belong to the same VirtualMachine
.public void setValues(int index, java.util.List values, int srcIndex, int length) throws InvalidTypeException, ClassNotLoadedException
Object values must be assignment compatible with the component type (This implies that the component type must be loaded through the enclosing class's class loader). Primitive values must be either assignment compatible with the component type or must be convertible to the component type without loss of information. See JLS section 5.2 for more information on assignment compatibility.
index
- the index of the first component to set.values
- a list of Value
objects to be placed
in this array.srcIndex
- the index of the first source value to to use.length
- the number of components to set, or -1 to set
all components to the end of this array.values
is not compatible with the declared type of array components.srcIndex + length
is beyond the end of this array or if
values
is smaller inside than the given range.Mirror
argument and this object
do not belong to the same VirtualMachine
.
|
Java Debug Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |