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
16 * <code>ICodeAssist.codeSelect(...)</code> operation. They are not part of
17 * the Java model (<code>exists()</code> returns whether the parent exists
18 * rather than whether the local variable exists in the parent) and they are not
19 * included in the children of an <code>IMethod</code> or an
20 * <code>IInitializer</code>.
22 * In particular such a pseudo-element should not be used as a handle. For
23 * example its name range won't be updated if the underlying source changes.
26 * This interface is not intended to be implemented by clients.
31 public interface ILocalVariable extends IJavaElement, ISourceReference {
34 * Returns the name of this local variable.
36 * @return the name of this local variable.
38 String getElementName();
41 * Returns the source range of this local variable's name.
43 * @return the source range of this local variable's name
45 ISourceRange getNameRange();
48 * Returns the type signature of this local variable.
50 * The type signature may be either unresolved (for source types) or
51 * resolved (for binary types), and either basic (for basic types) or rich
52 * (for parameterized types). See {@link Signature} for details.
55 * @return the type signature of this local variable.
58 String getTypeSignature();