blob: 199e36c2b72b994a8d679eb413da9481bb9e1762 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/*******************************************************************************
* Copyright (c) 2006, 2012 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom;
import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
import org.eclipse.cdt.core.dom.ast.IASTNode;
/**
* Common interface for names in the index and the AST.
* @since 4.0
* @noimplement This interface is not intended to be implemented by clients.
* @noextend This interface is not intended to be extended by clients.
*/
public interface IName {
/**
* @since 5.2
*/
public static final IName[] EMPTY_ARRAY= {};
/**
* Returns the name without qualification and without template arguments.
* @since 5.1
*/
public char[] getSimpleID();
/**
* @deprecated Using this method is problematic, because for names from the
* index never contain qualification or template arguments, which is different
* for names from the AST.
* Use {@link #getSimpleID()}, instead.
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public char[] toCharArray();
/**
* Is this name being used in the AST as the introduction of a declaration?
* @return boolean
*/
public boolean isDeclaration();
/**
* Is this name being used in the AST as a reference rather than a declaration?
* @return boolean
*/
public boolean isReference();
/**
* Is this name being used in the AST as a definition rather than a declaration?
* @return boolean
*/
public boolean isDefinition();
/**
* Same as {@link IASTNode#getFileLocation()}
* @return the file location of this name.
*/
public IASTFileLocation getFileLocation();
}
|