public interface IASTName extends IASTNode, org.eclipse.cdt.core.dom.IName
IASTNode.CopyStyle| Modifier and Type | Field and Description |
|---|---|
static IASTName[] |
EMPTY_NAME_ARRAY
Constant sentinel.
|
EMPTY_NODE_ARRAY| Modifier and Type | Method and Description |
|---|---|
IASTName |
copy()
Returns a mutable copy of the tree rooted at this node.
|
IASTName |
copy(IASTNode.CopyStyle style)
Returns a mutable copy of the tree rooted at this node.
|
IBinding |
getBinding()
Returns the semantic object attached to this name.
|
IASTCompletionContext |
getCompletionContext()
Returns the completion context for this name.
|
IASTImageLocation |
getImageLocation()
Returns the image location for this name or
null if the information is not
available. |
IASTName |
getLastName()
For convenience this method returns the last name of a qualified name or
this
if this is not a qualified name. |
org.eclipse.cdt.core.dom.ILinkage |
getLinkage()
Determines the current linkage in which the name has to be resolved.
|
char[] |
getLookupKey()
Returns the key for looking up this name in a scope.
|
IBinding |
getPreBinding()
Returns the intermediate representation of the binding, if already available.
|
int |
getRoleOfName(boolean allowResolution)
Returns the role of this name.
|
boolean |
isQualified()
Returns whether this name is qualified, i.e. whether it is preceded by a scope operator.
|
IBinding |
resolveBinding()
Resolves the semantic object this name is referring to.
|
IBinding |
resolvePreBinding()
Resolves to an intermediate representation of the binding.
|
void |
setBinding(IBinding binding)
Sets the semantic object for this name to be the given binding
|
char[] |
toCharArray()
Returns the name including qualification and template arguments.
|
java.lang.String |
toString()
Same as
toCharArray(). |
accept, contains, getChildren, getContainingFilename, getFileLocation, getLeadingSyntax, getNodeLocations, getOriginalNode, getParent, getPropertyInParent, getRawSignature, getSyntax, getTrailingSyntax, getTranslationUnit, isActive, isFrozen, isPartOfTranslationUnitFile, setParent, setPropertyInParentstatic final IASTName[] EMPTY_NAME_ARRAY
char[] toCharArray()
toCharArray in interface org.eclipse.cdt.core.dom.INamejava.lang.String toString()
toCharArray().toString in class java.lang.ObjectIBinding getBinding()
IBinding if it has been resolved, otherwise nullIBinding resolveBinding()
IBinding bindingint getRoleOfName(boolean allowResolution)
allowResolution is set to false, then IASTNameOwner.r_unclear
is returned.allowResolution - whether or not resolving the name is allowed.IASTNameOwner.r_definition, IASTNameOwner.r_declaration,
IASTNameOwner.r_reference, IASTNameOwner.r_unclear.IASTCompletionContext getCompletionContext()
IASTCompletionContext the context for completionorg.eclipse.cdt.core.dom.ILinkage getLinkage()
IASTImageLocation getImageLocation()
null if the information is not
available.
An image location can be computed when the name is either found directly in the code, is (part of) an argument to a macro expansion or is (part of) a macro definition found in the source code.
The image location is null, when the name consists of multiple tokens
(qualified names) and the tokens are not found side by side in the code, or if the name is
the result of a token-paste operation or the name is found in the definition of a built-in
macro.
IASTName getLastName()
this
if this is not a qualified name.IASTName copy()
IASTNodecopy.getParent() == null copy.getPropertyInParent() == null copy.isFrozen() == falsePreprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.
Calling this method is equivalent to copy(CopyStyle.withoutLocations).
IASTName copy(IASTNode.CopyStyle style)
IASTNodecopy.getParent() == null copy.getPropertyInParent() == null copy.isFrozen() == falsePreprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.
copy in interface IASTNodestyle - IASTNode.CopyStyle create a copy with or without locations. Please see
IASTNode.CopyStyle for restrictions on copies with Locations.void setBinding(IBinding binding)
char[] getLookupKey()
IBinding getPreBinding()
IBinding resolvePreBinding()
boolean isQualified()
Copyright (c) IBM Corp. and others 2004, 2014. All Rights Reserved.