Interface IASTNodeSelector
-
public interface IASTNodeSelectorInterface for searching nodes in a translation unit. An instance of this interface, responsible for one file contained in a translation-unit, can be obtained usingIASTTranslationUnit.getNodeSelector(String).- Since:
- 5.0
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IASTImplicitNamefindEnclosingImplicitName(int offset, int length)Returns the first implicit name enclosing the given range.IASTPreprocessorMacroExpansionfindEnclosingMacroExpansion(int offset, int length)Returns a macro expansion enclosing the given range, ornull.IASTNamefindEnclosingName(int offset, int length)Returns the smallest name enclosing the given range, ornullif there is no such node.IASTNodefindEnclosingNode(int offset, int length)Returns the smallest node enclosing the given range, ornullif there is no such node.IASTNodefindEnclosingNodeInExpansion(int offset, int length)Returns the smallest node enclosing the range, ornullif there is no such node.IASTNamefindFirstContainedName(int offset, int length)Returns the first name contained in the given range, ornullif there is no such node.IASTNodefindFirstContainedNode(int offset, int length)Returns the first node contained in the given range, ornullif there is no such node.IASTNodefindFirstContainedNodeInExpansion(int offset, int length)Returns the first node contained in the given expansion, ornullif there is no such node.IASTImplicitNamefindImplicitName(int offset, int length)Returns the implicit name for the exact given range, ornullif there is no such node.IASTNamefindName(int offset, int length)Returns the name for the exact given range, ornullif there is no such node.IASTNodefindNode(int offset, int length)Returns the node for the exact given range, ornullif there is no such node.IASTNodefindNodeInExpansion(int offset, int length)Returns the node for the exact given range, ornullif there is no such node.IASTNodefindStrictlyEnclosingNode(int offset, int length)Returns the smallest node strictly enclosing the given range, ornullif there is no such node.
-
-
-
Method Detail
-
findName
IASTName findName(int offset, int length)
Returns the name for the exact given range, ornullif there is no such node. Will not return an implicit name.
-
findEnclosingName
IASTName findEnclosingName(int offset, int length)
Returns the smallest name enclosing the given range, ornullif there is no such node. Will not return an implicit name.
-
findFirstContainedName
IASTName findFirstContainedName(int offset, int length)
Returns the first name contained in the given range, ornullif there is no such node. Will not return an implicit name.
-
findImplicitName
IASTImplicitName findImplicitName(int offset, int length)
Returns the implicit name for the exact given range, ornullif there is no such node. Note that there can be more than one implicit name in the same location. The implicit name's parent can be used to get all the names at the location.- Since:
- 5.1
-
findEnclosingImplicitName
IASTImplicitName findEnclosingImplicitName(int offset, int length)
Returns the first implicit name enclosing the given range. Note that there can be more than one implicit name in the same location. The implicit name's parent can be used to get all the names at the location.- Since:
- 5.1
-
findNode
IASTNode findNode(int offset, int length)
Returns the node for the exact given range, ornullif there is no such node.For nodes with the same location, macro-expansions (
IASTPreprocessorMacroExpansion) are preferred over c/c++-nodes and children are preferred over their parents.
-
findEnclosingNode
IASTNode findEnclosingNode(int offset, int length)
Returns the smallest node enclosing the given range, ornullif there is no such node.For nodes with the same location, macro-expansions (
IASTPreprocessorMacroExpansion) are preferred over c/c++-nodes nodes and children are preferred over their parents.
-
findStrictlyEnclosingNode
IASTNode findStrictlyEnclosingNode(int offset, int length)
Returns the smallest node strictly enclosing the given range, ornullif there is no such node.For nodes with the same location, macro-expansions (
IASTPreprocessorMacroExpansion) are preferred over c/c++-nodes nodes and children are preferred over their parents.- Since:
- 5.3
-
findFirstContainedNode
IASTNode findFirstContainedNode(int offset, int length)
Returns the first node contained in the given range, ornullif there is no such node.For nodes with the same location, macro-expansions (
IASTPreprocessorMacroExpansion) are preferred over c/c++-nodes nodes and children are preferred over their parents.
-
findNodeInExpansion
IASTNode findNodeInExpansion(int offset, int length)
Returns the node for the exact given range, ornullif there is no such node.The method never returns a macro expansion (
IASTPreprocessorMacroExpansion) or the name for an expansion. Rather than that the expansion itself is searched for a matching node.- Since:
- 5.1
-
findEnclosingNodeInExpansion
IASTNode findEnclosingNodeInExpansion(int offset, int length)
Returns the smallest node enclosing the range, ornullif there is no such node.The method never returns a macro expansion (
IASTPreprocessorMacroExpansion) or the name for an expansion. Rather than that the expansion itself is searched for a matching node.- Since:
- 5.1
-
findFirstContainedNodeInExpansion
IASTNode findFirstContainedNodeInExpansion(int offset, int length)
Returns the first node contained in the given expansion, ornullif there is no such node.The method never returns a macro expansion (
IASTPreprocessorMacroExpansion) or the name for an expansion. Rather than that the expansion itself is searched for a matching node.- Since:
- 5.1
-
findEnclosingMacroExpansion
IASTPreprocessorMacroExpansion findEnclosingMacroExpansion(int offset, int length)
Returns a macro expansion enclosing the given range, ornull.
-
-