Interface DeclarationSourcePosition

All Superinterfaces:
CompoundSourcePosition, Serializable, SourcePosition
All Known Subinterfaces:
All Known Implementing Classes:
BodyHolderSourcePositionImpl, DeclarationSourcePositionImpl

public interface DeclarationSourcePosition extends CompoundSourcePosition
Represents the position of a program element in a source file in an immutable manner. The start/end represents range of whole program element including children element and comments The nameStart/End represents range of name of program element. The modifierSourceStart/End represents range of modifiers and annotations of the element
  • Method Details

    • getModifierSourceStart

      int getModifierSourceStart()
      returns the first char of the first modifier
    • getModifierSourceEnd

      int getModifierSourceEnd()
      returns the last char of the last modifier
    • getDefaultValueEnd

      int getDefaultValueEnd()
      returns the end of the default value int i = 0, j =1 ➡ returns the comma
    • addDefaultValueEnd

      DeclarationSourcePosition addDefaultValueEnd(int endDefaultValueDeclaration)
      returns a new position object enriched a default value declaration (immutability pattern)