Package spoon.reflect.cu.position
Interface CompoundSourcePosition
- All Superinterfaces:
Serializable
,SourcePosition
- All Known Subinterfaces:
BodyHolderSourcePosition
,DeclarationSourcePosition
- All Known Implementing Classes:
BodyHolderSourcePositionImpl
,CompoundSourcePositionImpl
,DeclarationSourcePositionImpl
This interface represents the position of a program element like an expression in a source file.
The start/end represents range of whole program element including children element and comments
The nameStart/End represents range of core part of program element.
-
Field Summary
Fields inherited from interface spoon.reflect.cu.SourcePosition
NOPOSITION
-
Method Summary
Modifier and TypeMethodDescriptionint
returns the end of everything incl.int
returns the start of everything incl.int
returns the end of name (int bar = 0 ➡ pos('r'))int
returns the start of name (int foo = 0 ➡ pos('f'))Methods inherited from interface spoon.reflect.cu.SourcePosition
getColumn, getCompilationUnit, getEndColumn, getEndLine, getFile, getLine, getSourceEnd, getSourceStart, isValidPosition, toString
-
Method Details
-
getDeclarationStart
int getDeclarationStart()returns the start of everything incl. type, name and default value -
getDeclarationEnd
int getDeclarationEnd()returns the end of everything incl. type, name and default value -
getNameStart
int getNameStart()returns the start of name (int foo = 0 ➡ pos('f')) -
getNameEnd
int getNameEnd()returns the end of name (int bar = 0 ➡ pos('r'))
-