Class BodyHolderSourcePositionImpl
java.lang.Object
spoon.support.reflect.cu.position.SourcePositionImpl
spoon.support.reflect.cu.position.CompoundSourcePositionImpl
spoon.support.reflect.cu.position.DeclarationSourcePositionImpl
spoon.support.reflect.cu.position.BodyHolderSourcePositionImpl
- All Implemented Interfaces:
Serializable
,Cloneable
,BodyHolderSourcePosition
,CompoundSourcePosition
,DeclarationSourcePosition
,SourcePosition
public class BodyHolderSourcePositionImpl
extends DeclarationSourcePositionImpl
implements BodyHolderSourcePosition
This class represents the position of a Java program element in a source
file.
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from interface spoon.reflect.cu.SourcePosition
NOPOSITION
-
Constructor Summary
ConstructorDescriptionBodyHolderSourcePositionImpl(CompilationUnit compilationUnit, int nameStart, int nameEnd, int modifierSourceStart, int modifierSourceEnd, int declarationSourceStart, int declarationSourceEnd, int bodyStart, int bodyEnd, int[] lineSeparatorPositions)
-
Method Summary
Modifier and TypeMethodDescriptionint
int
Helper for debugging purposes.Methods inherited from class spoon.support.reflect.cu.position.DeclarationSourcePositionImpl
addDefaultValueEnd, getDefaultValueEnd, getModifierSourceEnd, getModifierSourceStart, getSourceEnd, setModifierSourceEnd
Methods inherited from class spoon.support.reflect.cu.position.CompoundSourcePositionImpl
getDeclarationEnd, getDeclarationStart, getEndColumn, getEndLine, getNameEnd, getNameStart, getSourceStart
Methods inherited from class spoon.support.reflect.cu.position.SourcePositionImpl
checkArgsAreAscending, equals, getColumn, getCompilationUnit, getFile, getFragment, getLine, hashCode, isValidPosition, searchColumnNumber, searchLineNumber, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface spoon.reflect.cu.position.CompoundSourcePosition
getDeclarationEnd, getDeclarationStart, getNameEnd, getNameStart
Methods inherited from interface spoon.reflect.cu.position.DeclarationSourcePosition
addDefaultValueEnd, getDefaultValueEnd, getModifierSourceEnd, getModifierSourceStart
Methods inherited from interface spoon.reflect.cu.SourcePosition
getColumn, getCompilationUnit, getEndColumn, getEndLine, getFile, getLine, getSourceEnd, getSourceStart, isValidPosition, toString
-
Constructor Details
-
BodyHolderSourcePositionImpl
public BodyHolderSourcePositionImpl(CompilationUnit compilationUnit, int nameStart, int nameEnd, int modifierSourceStart, int modifierSourceEnd, int declarationSourceStart, int declarationSourceEnd, int bodyStart, int bodyEnd, int[] lineSeparatorPositions)
-
-
Method Details
-
getBodyStart
public int getBodyStart()- Specified by:
getBodyStart
in interfaceBodyHolderSourcePosition
-
getBodyEnd
public int getBodyEnd()- Specified by:
getBodyEnd
in interfaceBodyHolderSourcePosition
-
getSourceDetails
Description copied from class:SourcePositionImpl
Helper for debugging purposes. Displays |startIndex; endIndex|sourceCode| of thisSourcePosition
If this instance isDeclarationSourcePosition
orBodyHolderSourcePosition
Then details about name, modifiers and body are included in resulting string too- Overrides:
getSourceDetails
in classDeclarationSourcePositionImpl
- Returns:
- details about source code of this
SourcePosition
-