Package spoon.reflect.cu.position
Interface DeclarationSourcePosition
-
- All Superinterfaces:
CompoundSourcePosition
,Serializable
,SourcePosition
- All Known Subinterfaces:
BodyHolderSourcePosition
- 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
-
-
Field Summary
-
Fields inherited from interface spoon.reflect.cu.SourcePosition
NOPOSITION
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DeclarationSourcePosition
addDefaultValueEnd(int endDefaultValueDeclaration)
returns a new position object enriched a default value declaration (immutability pattern)int
getDefaultValueEnd()
returns the end of the default value int i = 0, j =1 ➡ returns the commaint
getModifierSourceEnd()
returns the last char of the last modifierint
getModifierSourceStart()
returns the first char of the first modifier-
Methods inherited from interface spoon.reflect.cu.position.CompoundSourcePosition
getDeclarationEnd, getDeclarationStart, getNameEnd, getNameStart
-
Methods inherited from interface spoon.reflect.cu.SourcePosition
getColumn, getCompilationUnit, getEndColumn, getEndLine, getFile, getLine, getSourceEnd, getSourceStart, isValidPosition, toString
-
-
-
-
Method Detail
-
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)
-
-