org.eclipse.wst.jsdt.core

## Interface ILocalVariable

All Superinterfaces:
  IJavaScriptElement, ILookupScope, ISourceReference

    public interface ILocalVariable
    extends IJavaScriptElement, ISourceReference

Represents a local variable declared in a method.. `ILocalVariable` are pseudo-elements created as the result of a `ICodeAssist.codeSelect(...)` operation. They are not part of the JavaScript model (`exists()` returns whether the parent exists rather than whether the local variable exists in the parent) and they are not included in the children of an `IFunction` or an `IInitializer`.

In particular such a pseudo-element should not be used as a handle. For example its name range won't be updated if the underlying source changes.

This interface is not intended to be implemented by clients.

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

### Field Summary

### Fields inherited from interface org.eclipse.wst.jsdt.core.IJavaScriptElement

`CLASS_FILE, EXPORT_CONTAINER, EXPORT_DECLARATION, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVASCRIPT_MODEL, JAVASCRIPT_PROJECT, JAVASCRIPT_UNIT, LOCAL_VARIABLE, METHOD, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE`

### Method Summary

All Methods Instance Methods Abstract Methods
`java.lang.String` `getElementName()` Returns the name of this local variable.
`ISourceRange` `getNameRange()` Returns the source range of this local variable's name.
`java.lang.String` `getTypeSignature()` Returns the type signature of this local variable.

### Methods inherited from interface org.eclipse.wst.jsdt.core.IJavaScriptElement

`exists, getAncestor, getAttachedJavadoc, getCommonSuperType, getCorrespondingResource, getDisplayName, getElementType, getHandleIdentifier, getHostPath, getJavaScriptModel, getJavaScriptProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnown, isVirtual`

### Methods inherited from interface org.eclipse.wst.jsdt.core.ILookupScope

`newNameLookup, newNameLookup, newSearchableNameEnvironment, newSearchableNameEnvironment`

### Methods inherited from interface org.eclipse.wst.jsdt.core.ISourceReference

`exists, getSource, getSourceRange`

### Method Detail

#### getElementName

    java.lang.String getElementName()

Returns the name of this local variable.

Specified by:
  `getElementName` in interface `IJavaScriptElement`
Returns:
  the name of this local variable.

#### getNameRange

    ISourceRange getNameRange()

Returns the source range of this local variable's name.

Returns:
  the source range of this local variable's name

#### getTypeSignature

    java.lang.String getTypeSignature()

Returns the type signature of this local variable.

The type signature may be either unresolved (for source types) or resolved (for binary types), and either basic (for basic types) or rich (for parameterized types). See `Signature` for details.

Returns:
  the type signature of this local variable.
See Also:
  `Signature`