APIdia Launch Partner
Top Description Methods
com.sun.jdi

public Interface PrimitiveValue

extends Value
Known Direct Subinterfaces
com.sun.jdi.ShortValue, com.sun.jdi.BooleanValue, com.sun.jdi.ByteValue, com.sun.jdi.CharValue, com.sun.jdi.DoubleValue, com.sun.jdi.FloatValue, com.sun.jdi.IntegerValue, com.sun.jdi.LongValue
Known Direct Implementers
com.sun.tools.jdi.PrimitiveValueImpl

The value assigned to a field or variable of primitive type in a target VM. Each primitive values is accessed through a subinterface of this interface.
Authors
Robert Field, Gordon Hirsch, James McIlree
Since
1.3

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if this value is non-zero (or true if already a BooleanValue); false otherwise.
booleanValue
()

Converts this value to a BooleanValue and returns the result as a boolean.

public byte

Returns:

the value, converted to byte
byteValue
()

Converts this value to a ByteValue and returns the result as a byte.

public char

Returns:

the value, converted to char
charValue
()

Converts this value to a CharValue and returns the result as a char.

public double

Returns:

the value, converted to double
doubleValue
()

Converts this value to a DoubleValue and returns the result as a double.

public float

Returns:

the value, converted to float
floatValue
()

Converts this value to a FloatValue and returns the result as a float.

public int

Returns:

the value, converted to int
intValue
()

Converts this value to an IntegerValue and returns the result as an int.

public long

Returns:

the value, converted to long
longValue
()

Converts this value to a LongValue and returns the result as a long.

public short

Returns:

the value, converted to short
shortValue
()

Converts this value to a ShortValue and returns the result as a short.

Inherited from com.sun.jdi.Value:
type

Method Detail

booleanValueback to summary
public boolean booleanValue()

Converts this value to a BooleanValue and returns the result as a boolean.

Returns:boolean

true if this value is non-zero (or true if already a BooleanValue); false otherwise.

byteValueback to summary
public byte byteValue()

Converts this value to a ByteValue and returns the result as a byte. The value will be narrowed as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a byte).

Returns:byte

the value, converted to byte

charValueback to summary
public char charValue()

Converts this value to a CharValue and returns the result as a char. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a char, in the narrowing case).

Returns:char

the value, converted to char

doubleValueback to summary
public double doubleValue()

Converts this value to a DoubleValue and returns the result as a double. The value will be widened as necessary, and precision information may be lost.

Returns:double

the value, converted to double

floatValueback to summary
public float floatValue()

Converts this value to a FloatValue and returns the result as a float. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a float, in the narrowing case).

Returns:float

the value, converted to float

intValueback to summary
public int intValue()

Converts this value to an IntegerValue and returns the result as an int. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to an int, in the narrowing case).

Returns:int

the value, converted to int

longValueback to summary
public long longValue()

Converts this value to a LongValue and returns the result as a long. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a long, in the narrowing case).

Returns:long

the value, converted to long

shortValueback to summary
public short shortValue()

Converts this value to a ShortValue and returns the result as a short. The value will be narrowed or widened as necessary, and magnitude or precision information may be lost (as if the primitive had been cast to a short, in the narrowing case).

Returns:short

the value, converted to short