org.eclipse.cdt.core.dom.ast

## Class ASTCompletionNode

- java.lang.Object
- - org.eclipse.cdt.core.dom.ast.ASTCompletionNode

All Implemented Interfaces:
  IASTCompletionNode

    public class ASTCompletionNode
    extends Object
    implements IASTCompletionNode

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.cdt.core.dom.ast.IASTCompletionNode

`IASTCompletionNode.CompletionNameEntry`

### Constructor Summary

Constructors
Constructor and Description
`ASTCompletionNode(IToken completionToken, IASTTranslationUnit translationUnit)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addName(IASTName name)`
`boolean` `containsName(IASTName name)` Returns true if this completion node contains a `IASTCompletionNode.CompletionNameEntry` with the given name.
`IASTCompletionNode.CompletionNameEntry[]` `getEntries()` Returns a list of names that fir in this context, along with their parents.
`int` `getLength()` Returns the length of the completion point.
`IASTName[]` `getNames()` Returns a list of names that fit in this context.
`String` `getPrefix()` If the point of completion was at the end of a potential identifier, this string contains the text of that identifier.
`IASTTranslationUnit` `getTranslationUnit()` Returns the translation unit for this completion.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ASTCompletionNode

    public ASTCompletionNode(IToken completionToken,
                             IASTTranslationUnit translationUnit)

### Method Detail

#### addName

    public void addName(IASTName name)

#### getPrefix

    public String getPrefix()

Description copied from interface: `IASTCompletionNode`
If the point of completion was at the end of a potential identifier, this string contains the text of that identifier.

Specified by:
  `getPrefix` in interface `IASTCompletionNode`
Returns:
  the prefix text up to the point of completion

#### getLength

    public int getLength()

Description copied from interface: `IASTCompletionNode`
Returns the length of the completion point.

Specified by:
  `getLength` in interface `IASTCompletionNode`

#### containsName

    public boolean containsName(IASTName name)

Description copied from interface: `IASTCompletionNode`
Returns true if this completion node contains a `IASTCompletionNode.CompletionNameEntry` with the given name.

Specified by:
  `containsName` in interface `IASTCompletionNode`

#### getNames

    public IASTName[] getNames()

Description copied from interface: `IASTCompletionNode`
Returns a list of names that fit in this context. If doing computations based on the name's parent, prefer calling getEntries() instead and obtaining the parent from there.

Specified by:
  `getNames` in interface `IASTCompletionNode`

#### getEntries

    public IASTCompletionNode.CompletionNameEntry[] getEntries()

Description copied from interface: `IASTCompletionNode`
Returns a list of names that fir in this context, along with their parents. See `IASTCompletionNode.CompletionNameEntry` for more details.

Specified by:
  `getEntries` in interface `IASTCompletionNode`

#### getTranslationUnit

    public IASTTranslationUnit getTranslationUnit()

Description copied from interface: `IASTCompletionNode`
Returns the translation unit for this completion.

Specified by:
  `getTranslationUnit` in interface `IASTCompletionNode`