# com.bea.ide.debug
IDebugExpression Interface

public interface IDebugExpression

This is the interface for an expression. It is used by the watch window and the locals window for displaying values to the user. All of the values except `isStale()` are immutable. After evaluating an expression, a new IDebugExpression will be created to hold the values, but after the value becomes stale the expression's stale state will be toggled to true.

## Field Summary

`public static final int` | `NOT_ARRAY` Used as the arrayLength property for values that do not represent arrays

## Method Summary

`public int` | `getArrayLength`() Gets the length of this expression's value if it's an array, or indicates it's not an array
`public `String`` | `getDeclaredType`() If known, the declared type of the expression.
`public `String`` | `getExpression`() Gets the expression of this IDebugExpression, corresponding to its name in the current scope, such as "localVariable.someField"
`public `String`[]` | `getInterfaces`() Gets the list of interfaces implemented by this object.
`public `String`` | `getValue`() Gets the Value of this IDebugExpression
`public `String`` | `getValueType`() Gets the type of the Value of this IDebugExpression, such as "int" or "java.lang.StringBuffer"
`public boolean` | `isComplex`() IDebugExpressions are complex if they have children that are visible in the debugger
`public boolean` | `isEditable`() Gets whether the expression is editable or not.
`public boolean` | `isError`() Returns whether this expression caused an error getting evaluated or not.
`public boolean` | `isStale`() Gets whether the expression is stale or not.
`public boolean` | `isStatic`() Gets whether the expression is for a static member or not.

## Field Detail

### NOT_ARRAY

    public static final int NOT_ARRAY

  Used as the arrayLength property for values that do not represent arrays

## Method Detail

### getArrayLength() Method

    public int getArrayLength()

Gets the length of this expression's value if it's an array, or indicates it's not an array

#### Returns

the length of the array, or IDebugExpression.NOT_ARRAY if it's not an array

### getDeclaredType() Method

    public String getDeclaredType()

If known, the declared type of the expression. May be null if the information is not available. For example, in Java a variable may be an instance of java.lang.StringBuffer but assigned to a variable of type java.lang.Object

#### Returns

a string denoting the declared type of the expression.

### getExpression() Method

    public String getExpression()

Gets the expression of this IDebugExpression, corresponding to its name in the current scope, such as "localVariable.someField"

#### Returns

the expression's name

### getInterfaces() Method

    public String[] getInterfaces()

Gets the list of interfaces implemented by this object. This gets the full list, including interfaces implemented by superclasses

#### Returns

an array of strings representing the interfaces, null if there are no interfaces.

### getValue() Method

    public String getValue()

Gets the Value of this IDebugExpression

#### Returns

the expression's value

### getValueType() Method

    public String getValueType()

Gets the type of the Value of this IDebugExpression, such as "int" or "java.lang.StringBuffer"

#### Returns

the expression's type

### isComplex() Method

    public boolean isComplex()

IDebugExpressions are complex if they have children that are visible in the debugger

#### Returns

if the expression has children

### isEditable() Method

    public boolean isEditable()

Gets whether the expression is editable or not.

#### Returns

whether the expression is a value that can be edited - that is, the debugger will be able to track down the variable again and set it

### isError() Method

    public boolean isError()

Returns whether this expression caused an error getting evaluated or not.

#### Returns

true there was a problem evaluating the expression, such as incorrect syntax false the expression had no problem evaluating

### isStale() Method

    public boolean isStale()

Gets whether the expression is stale or not.

#### Returns

true if this expression's value has not been updated since the last debugger event, like a step, setting a variable value, etc

### isStatic() Method

    public boolean isStatic()

Gets whether the expression is for a static member or not.

#### Returns

whether the expression is a static member of a class.