KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > ILocalVariable


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.core;
12
13 /**
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>.
19  * <p>
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.
22  * </p><p>
23  * This interface is not intended to be implemented by clients.
24  * </p>
25  * @since 3.0
26  */

27 public interface ILocalVariable extends IJavaElement, ISourceReference {
28
29     /**
30      * Returns the name of this local variable.
31      *
32      * @return the name of this local variable.
33      */

34     String JavaDoc getElementName();
35     
36     /**
37      * Returns the source range of this local variable's name.
38      *
39      * @return the source range of this local variable's name
40      */

41     ISourceRange getNameRange();
42     
43     /**
44      * Returns the type signature of this local variable.
45      * <p>
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.
49      * </p>
50      *
51      * @return the type signature of this local variable.
52      * @see Signature
53      */

54     String JavaDoc getTypeSignature();
55 }
56
Popular Tags