Interface ASTNode

All Known Subinterfaces:
Member, TypeDeclaration
All Known Implementing Classes:
AbstractASTNode, AbstractMember, AbstractTypeDeclarationNode, CodeBlock, CompilationUnit, EnumBody, EnumDeclaration, Field, FormalParameter, ImportDeclaration, LocalVariable, Method, NormalClassDeclaration, NormalInterfaceDeclaration, Package

public interface ASTNode
A node in a Java AST.
Version:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the "name" of this node.
    int
    Returns the end offset of the "name" of this node.
    int
    Returns the start offset of the "name" of this node.
  • Method Details

    • getName

      String getName()
      Returns the "name" of this node. This will be the name of the method, the name of the member or local variable, etc. For CodeBlocks it will be CodeBlock.NAME.

      Note that this may not be unique. For example, a class with an overloaded method will have multiple methods with the same "name," just with different signatures.

      Returns:
      The "name" of this node.
    • getNameEndOffset

      int getNameEndOffset()
      Returns the end offset of the "name" of this node.
      Returns:
      The end offset.
    • getNameStartOffset

      int getNameStartOffset()
      Returns the start offset of the "name" of this node.
      Returns:
      The start offset.