public class CompoundSourcePositionImpl extends SourcePositionImpl implements CompoundSourcePosition, java.io.Serializable
NOPOSITION
Constructor and Description |
---|
CompoundSourcePositionImpl(CompilationUnit compilationUnit,
int nameStart,
int nameEnd,
int declarationSourceStart,
int declarationSourceEnd,
int[] lineSeparatorPositions) |
Modifier and Type | Method and Description |
---|---|
int |
getDeclarationEnd()
returns the end of everything incl.
|
int |
getDeclarationStart()
returns the start of everything incl.
|
int |
getEndColumn()
Gets the end column in the source file (1 indexed).
|
int |
getEndLine()
Gets the end line in the source file (1 indexed).
|
int |
getNameEnd()
returns the end of name (int bar = 0 ➡ pos('r'))
|
int |
getNameStart()
returns the start of name (int foo = 0 ➡ pos('f'))
|
java.lang.String |
getSourceDetails()
Helper for debugging purposes.
|
int |
getSourceEnd()
Gets the index at which the position ends in the source file.
|
int |
getSourceStart()
Gets the index at which the position starts in the source file.
|
checkArgsAreAscending, equals, getColumn, getCompilationUnit, getFile, getFragment, getLine, hashCode, isValidPosition, searchColumnNumber, searchLineNumber, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getColumn, getCompilationUnit, getFile, getLine, isValidPosition, toString
public CompoundSourcePositionImpl(CompilationUnit compilationUnit, int nameStart, int nameEnd, int declarationSourceStart, int declarationSourceEnd, int[] lineSeparatorPositions)
public int getDeclarationEnd()
CompoundSourcePosition
getDeclarationEnd
in interface CompoundSourcePosition
public int getDeclarationStart()
CompoundSourcePosition
getDeclarationStart
in interface CompoundSourcePosition
public int getSourceEnd()
SourcePosition
getSourceEnd
in interface SourcePosition
getSourceEnd
in class SourcePositionImpl
public int getSourceStart()
SourcePosition
getSourceStart
in interface SourcePosition
getSourceStart
in class SourcePositionImpl
public int getNameStart()
CompoundSourcePosition
getNameStart
in interface CompoundSourcePosition
public int getNameEnd()
CompoundSourcePosition
getNameEnd
in interface CompoundSourcePosition
public int getEndLine()
SourcePosition
SourcePosition.getSourceEnd()
}.getEndLine
in interface SourcePosition
getEndLine
in class SourcePositionImpl
public int getEndColumn()
SourcePosition
Environment.getTabulationSize()
and
CtCompilationUnit.getOriginalSourceCode()
. Prefer SourcePosition.getSourceEnd()
.getEndColumn
in interface SourcePosition
getEndColumn
in class SourcePositionImpl
public java.lang.String getSourceDetails()
SourcePositionImpl
SourcePosition
If this instance is DeclarationSourcePosition
or BodyHolderSourcePosition
Then details about name, modifiers and body are included in resulting string toogetSourceDetails
in class SourcePositionImpl
SourcePosition
Copyright © 2007–2021 Inria. All rights reserved.