01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.core;
11:
12: /**
13: * Represents a local variable declared in a method or an initializer.
14: * <code>ILocalVariable</code> are pseudo-elements created as the result of a <code>ICodeAssist.codeSelect(...)</code>
15: * operation. They are not part of the Java model (<code>exists()</code> returns whether the parent exists rather than
16: * whether the local variable exists in the parent) and they are not included in the children of an <code>IMethod</code>
17: * or an <code>IInitializer</code>.
18: * <p>
19: * In particular such a pseudo-element should not be used as a handle. For example its name range won't be updated
20: * if the underlying source changes.
21: * </p><p>
22: * This interface is not intended to be implemented by clients.
23: * </p>
24: * @since 3.0
25: */
26: public interface ILocalVariable extends IJavaElement, ISourceReference {
27:
28: /**
29: * Returns the name of this local variable.
30: *
31: * @return the name of this local variable.
32: */
33: String getElementName();
34:
35: /**
36: * Returns the source range of this local variable's name.
37: *
38: * @return the source range of this local variable's name
39: */
40: ISourceRange getNameRange();
41:
42: /**
43: * Returns the type signature of this local variable.
44: * <p>
45: * The type signature may be either unresolved (for source types)
46: * or resolved (for binary types), and either basic (for basic types)
47: * or rich (for parameterized types). See {@link Signature} for details.
48: * </p>
49: *
50: * @return the type signature of this local variable.
51: * @see Signature
52: */
53: String getTypeSignature();
54: }
|