Interface IVariable

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, 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.
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final IVariable[]
     

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

    EMPTY_BINDING_ARRAY
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value for a variable with an initializer, or null otherwise.
    Returns the type of the variable
    boolean
    Returns whether this variable is an automatic variable.
    boolean
    Returns whether this variable is declared extern.
    boolean
    Returns whether this variable is declared register.
    boolean
    Returns whether this variable is declared static.

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

    getAdapter

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

    getLinkage, getName, getNameCharArray, getOwner, getScope
  • Field Details

    • EMPTY_VARIABLE_ARRAY

      static final IVariable[] EMPTY_VARIABLE_ARRAY
      Since:
      5.4
  • Method Details

    • 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.