org.eclipse.cdt.core.dom.ast

## Interface IVariable

All Superinterfaces:
  IBinding

All Known Subinterfaces:
  ICPPField, ICPPFieldTemplate, ICPPParameter, ICPPTemplateNonTypeParameter, ICPPVariable, ICPPVariableInstance, ICPPVariableTemplate, ICPPVariableTemplatePartialSpecialization, IField, IParameter

    public interface IVariable
    extends IBinding

Interface for all sorts of variables: local, parameter, global, field.

### Field Summary

Fields
`static IVariable[]` `EMPTY_VARIABLE_ARRAY`

### Fields inherited from interface org.eclipse.cdt.core.dom.ast.IBinding

`EMPTY_BINDING_ARRAY`

### Method Summary

All Methods Instance Methods Abstract Methods
`IValue` `getInitialValue()` Returns the value for a variable with an initializer, or `null` otherwise.
`IType` `getType()` Returns the type of the variable
`boolean` `isAuto()` Returns whether this variable is an automatic variable.
`boolean` `isExtern()` Returns whether this variable is declared extern.
`boolean` `isRegister()` Returns whether this variable is declared register.
`boolean` `isStatic()` Returns whether this variable is declared static.

### Methods inherited from interface org.eclipse.cdt.core.dom.ast.IBinding

`getLinkage, getName, getNameCharArray, getOwner, getScope`

### Field Detail

#### EMPTY_VARIABLE_ARRAY

    static final IVariable[] EMPTY_VARIABLE_ARRAY

Since:
  5.4

### Method Detail

#### getType

    IType getType()

Returns the type of the variable

#### getInitialValue

    IValue getInitialValue()

Returns the value for a variable with an initializer, or `null` otherwise.

Since:
  5.1

#### isStatic

    boolean isStatic()

Returns whether this variable is declared static.

#### isExtern

    boolean isExtern()

Returns whether this variable is declared extern.

#### isAuto

    boolean isAuto()

Returns whether this variable is an automatic variable.

#### isRegister

    boolean isRegister()

Returns whether this variable is declared register.