Package org.eclipse.cdt.core.dom.ast
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 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 Modifier and Type Method Description IValue
getInitialValue()
Returns the value for a variable with an initializer, ornull
otherwise.IType
getType()
Returns the type of the variableboolean
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, ornull
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.
-
-