Eclipse CDT
Pre-release 3.0

org.eclipse.cdt.core.dom.ast
Interface IASTName

All Superinterfaces:
IASTNode
All Known Subinterfaces:
ICPPASTConversionName, ICPPASTOperatorName, ICPPASTQualifiedName, ICPPASTTemplateId

public interface IASTName
extends IASTNode

This class represents a name in the program that represents a semantic object in the program. The toString method produces a string representation of the name as appropriate for the language.


Field Summary
static IASTName[] EMPTY_NAME_ARRAY
          Constant sentinel.
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
EMPTY_NODE_ARRAY
 
Method Summary
 IBinding getBinding()
          Get the semantic object attached to this name.
 boolean isDeclaration()
          Is this name being used in the AST as the introduction of a declaration?
 boolean isDefinition()
          Is this name being used in the AST as a reference rather than a declaration?
 boolean isReference()
          Is this name being used in the AST as a reference rather than a declaration?
 IBinding resolveBinding()
          Resolve the semantic object this name is referring to.
 IBinding[] resolvePrefix()
          Return a list of bindings in the scope of the name that have the name as a prefix.
 void setBinding(IBinding binding)
          Set the semantic object for this name to be the given binding
 char[] toCharArray()
          Return a char array representation of the name.
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
accept, getContainingFilename, getFileLocation, getNodeLocations, getParent, getPropertyInParent, getRawSignature, getTranslationUnit, setParent, setPropertyInParent
 

Field Detail

EMPTY_NAME_ARRAY

static final IASTName[] EMPTY_NAME_ARRAY
Constant sentinel.

Method Detail

resolveBinding

IBinding resolveBinding()
Resolve the semantic object this name is referring to.

Returns:
IBinding binding

getBinding

IBinding getBinding()
Get the semantic object attached to this name. May be null if this name has not yet been semantically resolved (@see resolveBinding)

Returns:
IBinding if it has been resolved, otherwise null

setBinding

void setBinding(IBinding binding)
Set the semantic object for this name to be the given binding

Parameters:
binding -

resolvePrefix

IBinding[] resolvePrefix()
Return a list of bindings in the scope of the name that have the name as a prefix.

Returns:
IBinding [] bindings that start with this name

toCharArray

char[] toCharArray()
Return a char array representation of the name.

Returns:
~ toString().toCharArray()

isDeclaration

boolean isDeclaration()
Is this name being used in the AST as the introduction of a declaration?

Returns:
boolean

isReference

boolean isReference()
Is this name being used in the AST as a reference rather than a declaration?

Returns:
boolean

isDefinition

boolean isDefinition()
Is this name being used in the AST as a reference rather than a declaration?

Returns:
boolean

Eclipse CDT
Pre-release 3.0

Copyright (c) IBM Corp. and others 2004. All Rights Reserved.