1 /*******************************************************************************
2 * Copyright (c) 2000, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.core;
14 * Represents a local variable declared in a method or an initializer.
15 * <code>ILocalVariable</code> are pseudo-elements created as the result of a <code>ICodeAssist.codeSelect(...)</code>
16 * operation. They are not part of the Java model (<code>exists()</code> returns whether the parent exists rather than
17 * whether the local variable exists in the parent) and they are not included in the children of an <code>IMethod</code>
18 * or an <code>IInitializer</code>.
20 * In particular such a pseudo-element should not be used as a handle. For example its name range won't be updated
21 * if the underlying source changes.
23 * This interface is not intended to be implemented by clients.
27 public interface ILocalVariable extends IJavaElement, ISourceReference {
30 * Returns the name of this local variable.
32 * @return the name of this local variable.
34 String getElementName();
37 * Returns the source range of this local variable's name.
39 * @return the source range of this local variable's name
41 ISourceRange getNameRange();
44 * Returns the type signature of this local variable.
46 * The type signature may be either unresolved (for source types)
47 * or resolved (for binary types), and either basic (for basic types)
48 * or rich (for parameterized types). See {@link Signature} for details.
51 * @return the type signature of this local variable.
54 String getTypeSignature();