# Interface IJavaVariable

All Superinterfaces:
  `org.eclipse.core.runtime.IAdaptable, org.eclipse.debug.core.model.IDebugElement, IJavaModifiers, org.eclipse.debug.core.model.IValueModification, org.eclipse.debug.core.model.IVariable`

All Known Subinterfaces:
  `IJavaFieldVariable`

public interface IJavaVariable extends org.eclipse.debug.core.model.IVariable, IJavaModifiers
A local variable, field slot, or receiver (this) in a Java virtual machine.

See Also:
  - `IVariable`
Restriction:
  This interface is not intended to be implemented by clients.
Restriction:
  This interface is not intended to be extended by clients.

## Method Summary

Modifier and Type
Method
Description
`String`
`getGenericSignature()`
Returns the generic signature as defined in the JVM specification for the declared type of this variable, or `null` if the type associated with the signature is not yet loaded in the target VM.
`IJavaType`
`getJavaType()`
Returns the declared type of this variable.
`String`
`getSignature()`
Returns the JNI-style signature for the declared type of this variable, or `null` if the type associated with the signature is not yet loaded in the target VM.
`boolean`
`isLocal()`
Returns whether this variable is local.

### Methods inherited from interface org.eclipse.core.runtime.IAdaptable

`getAdapter`

### Methods inherited from interface org.eclipse.debug.core.model.IDebugElement

`getDebugTarget, getLaunch, getModelIdentifier`

### Methods inherited from interface IJavaModifiers

`isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isSynthetic`

### Methods inherited from interface org.eclipse.debug.core.model.IValueModification

`setValue, setValue, supportsValueModification, verifyValue, verifyValue`

### Methods inherited from interface org.eclipse.debug.core.model.IVariable

`getName, getReferenceTypeName, getValue, hasValueChanged`

## Method Details

### getSignature

String getSignature() throws org.eclipse.debug.core.DebugException
Returns the JNI-style signature for the declared type of this variable, or `null` if the type associated with the signature is not yet loaded in the target VM.

Returns:
  signature, or `null` if not accessible
Throws:
  `org.eclipse.debug.core.DebugException` - if this method fails. Reasons include:
  - Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
  - The type associated with the signature is not yet loaded

### getGenericSignature

String getGenericSignature() throws org.eclipse.debug.core.DebugException
Returns the generic signature as defined in the JVM specification for the declared type of this variable, or `null` if the type associated with the signature is not yet loaded in the target VM. Returns the same value as #getSignature() if the declared type of this variable is not a generic type.

Returns:
  generic signature, or `null` if not accessible
Throws:
  `org.eclipse.debug.core.DebugException` - if this method fails. Reasons include:
  - Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
  - The type associated with the signature is not yet loaded
Since:
  3.1

### getJavaType

IJavaType getJavaType() throws org.eclipse.debug.core.DebugException
Returns the declared type of this variable.

Returns:
  the declared type of this variable
Throws:
  `org.eclipse.debug.core.DebugException` - if this method fails. Reasons include:
  - Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
  - The type associated with the signature is not yet loaded
Since:
  2.0

### isLocal

boolean isLocal() throws org.eclipse.debug.core.DebugException
Returns whether this variable is local.

Returns:
  whether this variable is a local variable
Throws:
  `org.eclipse.debug.core.DebugException` - if this method fails. Reasons include:
  - Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
Since:
  2.1