diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/reflect/scala/reflect/api/Position.scala | 10 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/util/Position.scala | 10 |
2 files changed, 5 insertions, 15 deletions
diff --git a/src/reflect/scala/reflect/api/Position.scala b/src/reflect/scala/reflect/api/Position.scala index 2bbc9172da..9c63e4becf 100644 --- a/src/reflect/scala/reflect/api/Position.scala +++ b/src/reflect/scala/reflect/api/Position.scala @@ -50,12 +50,12 @@ trait Position extends Attachments { type Pos >: Null <: Position /** Java file corresponding to the source file of this position. + * + * The return type is [[scala.reflect.io.AbstractFile]], which belongs to an experimental part of Scala reflection. + * It should not be used unless you know what you are doing. In subsequent releases, this API will be refined + * and exposed as a part of scala.reflect.api. */ - def fileInfo: java.io.File - - /** Content of the source file that contains this position. - */ - def fileContent: Array[Char] + def source: scala.reflect.internal.util.SourceFile /** Is this position neither a NoPosition nor a FakePosition? * If isDefined is true, offset and source are both defined. diff --git a/src/reflect/scala/reflect/internal/util/Position.scala b/src/reflect/scala/reflect/internal/util/Position.scala index 0e5bbfa940..151a64daff 100644 --- a/src/reflect/scala/reflect/internal/util/Position.scala +++ b/src/reflect/scala/reflect/internal/util/Position.scala @@ -43,16 +43,6 @@ abstract class Position extends scala.reflect.api.Position { self => def withPos(newPos: Position): Attachments { type Pos = self.Pos } = newPos - /** Java file corresponding to the source file of this position. - */ - // necessary for conformance with scala.reflect.api.Position - def fileInfo: java.io.File = source.file.file - - /** Contents of the source file that contains this position. - */ - // necessary for conformance with scala.reflect.api.Position - def fileContent: Array[Char] = source.content - /** An optional value containing the source file referred to by this position, or * None if not defined. */ |