Package spoon.reflect.cu
Interface SourcePositionHolder
- All Known Subinterfaces:
CompilationUnit
,CtAbstractInvocation<T>
,CtAbstractSwitch<S>
,CtAnnotation<A>
,CtAnnotationFieldAccess<T>
,CtAnnotationMethod<T>
,CtAnnotationType<T>
,CtAnonymousExecutable
,CtArrayAccess<T,E>
,CtArrayRead<T>
,CtArrayTypeReference<T>
,CtArrayWrite<T>
,CtAssert<T>
,CtAssignment<T,A>
,CtBinaryOperator<T>
,CtBlock<R>
,CtBodyHolder
,CtBreak
,CtCase<S>
,CtCatch
,CtCatchVariable<T>
,CtCatchVariableReference<T>
,CtCFlowBreak
,CtClass<T>
,CtCodeElement
,CtCodeSnippetExpression<T>
,CtCodeSnippetStatement
,CtComment
,CtCompilationUnit
,CtConditional<T>
,CtConstructor<T>
,CtConstructorCall<T>
,CtContinue
,CtDo
,CtElement
,CtEnum<T>
,CtEnumValue<T>
,CtExecutable<R>
,CtExecutableReference<T>
,CtExecutableReferenceExpression<T,E>
,CtExpression<T>
,CtField<T>
,CtFieldAccess<T>
,CtFieldRead<T>
,CtFieldReference<T>
,CtFieldWrite<T>
,CtFor
,CtForEach
,CtFormalTypeDeclarer
,CtIf
,CtImport
,CtInterface<T>
,CtIntersectionTypeReference<T>
,CtInvocation<T>
,CtJavaDoc
,CtJavaDocTag
,CtLabelledFlowBreak
,CtLambda<T>
,CtLiteral<T>
,CtLocalVariable<T>
,CtLocalVariableReference<T>
,CtLoop
,CtMethod<T>
,CtModifiable
,CtModule
,CtModuleDirective
,CtModuleReference
,CtModuleRequirement
,CtMultiTypedElement
,CtNamedElement
,CtNewArray<T>
,CtNewClass<T>
,CtOperatorAssignment<T,A>
,CtPackage
,CtPackageDeclaration
,CtPackageExport
,CtPackageReference
,CtParameter<T>
,CtParameterReference<T>
,CtPattern
,CtProvidedService
,CtRecord
,CtRecordComponent
,CtReference
,CtResource<T>
,CtReturn<R>
,CtStatement
,CtStatementList
,CtSuperAccess<T>
,CtSwitch<S>
,CtSwitchExpression<T,S>
,CtSynchronized
,CtTargetedExpression<T,E>
,CtTextBlock
,CtThisAccess<T>
,CtThrow
,CtTry
,CtTryWithResource
,CtType<T>
,CtTypeAccess<A>
,CtTypedElement<T>
,CtTypeMember
,CtTypeMemberWildcardImportReference
,CtTypeParameter
,CtTypeParameterReference
,CtTypePattern
,CtTypeReference<T>
,CtUnaryOperator<T>
,CtUnboundVariableReference<T>
,CtUsedService
,CtVariable<T>
,CtVariableAccess<T>
,CtVariableRead<T>
,CtVariableReference<T>
,CtVariableWrite<T>
,CtWhile
,CtWildcardReference
,CtYieldStatement
- All Known Implementing Classes:
CompilationUnitImpl
,CtAnnotationFieldAccessImpl
,CtAnnotationImpl
,CtAnnotationMethodImpl
,CtAnnotationTypeImpl
,CtAnonymousExecutableImpl
,CtArrayAccessImpl
,CtArrayReadImpl
,CtArrayTypeReferenceImpl
,CtArrayWriteImpl
,CtAssertImpl
,CtAssignmentImpl
,CtBinaryOperatorImpl
,CtBlockImpl
,CtBreakImpl
,CtCaseImpl
,CtCatchImpl
,CtCatchVariableImpl
,CtCatchVariableReferenceImpl
,CtClassImpl
,CtCodeElementImpl
,CtCodeSnippetExpressionImpl
,CtCodeSnippetStatementImpl
,CtCommentImpl
,CtCompilationUnitImpl
,CtConditionalImpl
,CtConstructorCallImpl
,CtConstructorImpl
,CtContinueImpl
,CtDoImpl
,CtElementImpl
,CtEnumImpl
,CtEnumValueImpl
,CtExecutableImpl
,CtExecutableReferenceExpressionImpl
,CtExecutableReferenceImpl
,CtExpressionImpl
,CtExtendedModifier
,CtFieldAccessImpl
,CtFieldImpl
,CtFieldReadImpl
,CtFieldReferenceImpl
,CtFieldWriteImpl
,CtForEachImpl
,CtForImpl
,CtIfImpl
,CtImportImpl
,CtInterfaceImpl
,CtIntersectionTypeReferenceImpl
,CtInvocationImpl
,CtJavaDocImpl
,CtJavaDocTagImpl
,CtLambdaImpl
,CtLiteralImpl
,CtLocalVariableImpl
,CtLocalVariableReferenceImpl
,CtLoopImpl
,CtMethodImpl
,CtModelImpl.CtRootPackage
,CtModuleImpl
,CtModuleReferenceImpl
,CtModuleRequirementImpl
,CtNamedElementImpl
,CtNewArrayImpl
,CtNewClassImpl
,CtOperatorAssignmentImpl
,CtPackageDeclarationImpl
,CtPackageExportImpl
,CtPackageImpl
,CtPackageReferenceImpl
,CtParameterImpl
,CtParameterReferenceImpl
,CtProvidedServiceImpl
,CtRecordComponentImpl
,CtRecordImpl
,CtReferenceImpl
,CtReturnImpl
,CtStatementImpl
,CtStatementListImpl
,CtSuperAccessImpl
,CtSwitchExpressionImpl
,CtSwitchImpl
,CtSynchronizedImpl
,CtTargetedExpressionImpl
,CtTextBlockImpl
,CtThisAccessImpl
,CtThrowImpl
,CtTryImpl
,CtTryWithResourceImpl
,CtTypeAccessImpl
,CtTypeImpl
,CtTypeMemberWildcardImportReferenceImpl
,CtTypeParameterImpl
,CtTypeParameterReferenceImpl
,CtTypePatternImpl
,CtTypeReferenceImpl
,CtUnaryOperatorImpl
,CtUnboundVariableReferenceImpl
,CtUnresolvedImport
,CtUsedServiceImpl
,CtVariableAccessImpl
,CtVariableReadImpl
,CtVariableReferenceImpl
,CtVariableWriteImpl
,CtWhileImpl
,CtWildcardReferenceImpl
,CtYieldStatementImpl
,InvisibleArrayConstructorImpl
,ModuleFactory.CtUnnamedModule
,NoSourcePosition.NullCompilationUnit
public interface SourcePositionHolder
This interface represents an element which knows its position in a source file.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the original source code (maybe different from toString() if a transformation has been applied).If the element comes from a Java source file (hence has not created during transformation), returns the position in the original source file
-
Method Details
-
getPosition
SourcePosition getPosition()If the element comes from a Java source file (hence has not created during transformation), returns the position in the original source file -
getOriginalSourceFragment
SourceFragment getOriginalSourceFragment()Returns the original source code (maybe different from toString() if a transformation has been applied). Warning: this is a advanced method which cannot be considered as part of the stable API
-