summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/reflect/scala/reflect/api')
-rw-r--r--src/reflect/scala/reflect/api/Annotations.scala58
-rw-r--r--src/reflect/scala/reflect/api/FlagSets.scala1
-rw-r--r--src/reflect/scala/reflect/api/Internals.scala86
-rw-r--r--src/reflect/scala/reflect/api/Names.scala12
-rw-r--r--src/reflect/scala/reflect/api/Position.scala32
-rw-r--r--src/reflect/scala/reflect/api/Printers.scala2
-rw-r--r--src/reflect/scala/reflect/api/StandardDefinitions.scala2
-rw-r--r--src/reflect/scala/reflect/api/StandardNames.scala4
-rw-r--r--src/reflect/scala/reflect/api/Symbols.scala53
-rw-r--r--src/reflect/scala/reflect/api/Trees.scala54
-rw-r--r--src/reflect/scala/reflect/api/TypeTags.scala2
-rw-r--r--src/reflect/scala/reflect/api/Types.scala40
12 files changed, 177 insertions, 169 deletions
diff --git a/src/reflect/scala/reflect/api/Annotations.scala b/src/reflect/scala/reflect/api/Annotations.scala
index b880fad756..a7a5647859 100644
--- a/src/reflect/scala/reflect/api/Annotations.scala
+++ b/src/reflect/scala/reflect/api/Annotations.scala
@@ -55,10 +55,10 @@ trait Annotations { self: Universe =>
abstract class AnnotationExtractor {
def apply(tree: Tree): Annotation = treeToAnnotation(tree)
- @deprecated("Use `apply(tree: Tree): Annotation` instead", "2.11.0")
+ @deprecated("use `apply(tree: Tree): Annotation` instead", "2.11.0")
def apply(tpe: Type, scalaArgs: List[Tree], javaArgs: ListMap[Name, JavaArgument]): Annotation
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
def unapply(ann: Annotation): Option[(Type, List[Tree], ListMap[Name, JavaArgument])]
}
@@ -71,19 +71,19 @@ trait Annotations { self: Universe =>
def tree: Tree = annotationToTree(this.asInstanceOf[Annotation])
/** The type of the annotation. */
- @deprecated("Use `tree.tpe` instead", "2.11.0")
+ @deprecated("use `tree.tpe` instead", "2.11.0")
def tpe: Type
/** Payload of the Scala annotation: a list of abstract syntax trees that represent the argument.
* Empty for Java annotations.
*/
- @deprecated("Use `tree.children.tail` instead", "2.11.0")
+ @deprecated("use `tree.children.tail` instead", "2.11.0")
def scalaArgs: List[Tree]
/** Payload of the Java annotation: a list of name-value pairs.
* Empty for Scala annotations.
*/
- @deprecated("Use `tree.children.tail` instead", "2.11.0")
+ @deprecated("use `tree.children.tail` instead", "2.11.0")
def javaArgs: ListMap[Name, JavaArgument]
}
@@ -94,37 +94,37 @@ trait Annotations { self: Universe =>
* @template
* @group Annotations
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
type JavaArgument >: Null <: AnyRef with JavaArgumentApi
/** Has no special methods. Is here to provides erased identity for `CompoundType`.
* @group API
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
trait JavaArgumentApi
- /** A literal argument to a Java annotation as `"Use X instead"` in `@Deprecated("Use X instead")`
+ /** A literal argument to a Java annotation as `"use X instead"` in `@Deprecated("use X instead")`
* @template
* @group Annotations
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
type LiteralArgument >: Null <: LiteralArgumentApi with JavaArgument
/** The constructor/extractor for `LiteralArgument` instances.
* @group Extractors
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
val LiteralArgument: LiteralArgumentExtractor
/** An extractor class to create and pattern match with syntax `LiteralArgument(value)`
* where `value` is the constant argument.
* @group Extractors
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
abstract class LiteralArgumentExtractor {
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
def apply(value: Constant): LiteralArgument
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
def unapply(arg: LiteralArgument): Option[Constant]
}
@@ -132,10 +132,10 @@ trait Annotations { self: Universe =>
* The main source of information about annotations is the [[scala.reflect.api.Annotations]] page.
* @group API
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
trait LiteralArgumentApi {
/** The underlying compile-time constant value. */
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
def value: Constant
}
@@ -143,24 +143,24 @@ trait Annotations { self: Universe =>
* @template
* @group Annotations
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
type ArrayArgument >: Null <: ArrayArgumentApi with JavaArgument
/** The constructor/extractor for `ArrayArgument` instances.
* @group Extractors
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
val ArrayArgument: ArrayArgumentExtractor
/** An extractor class to create and pattern match with syntax `ArrayArgument(args)`
* where `args` is the argument array.
* @group Extractors
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
abstract class ArrayArgumentExtractor {
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
def apply(args: Array[JavaArgument]): ArrayArgument
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
def unapply(arg: ArrayArgument): Option[Array[JavaArgument]]
}
@@ -168,10 +168,10 @@ trait Annotations { self: Universe =>
* The main source of information about annotations is the [[scala.reflect.api.Annotations]] page.
* @group API
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
trait ArrayArgumentApi {
/** The underlying array of Java annotation arguments. */
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
def args: Array[JavaArgument]
}
@@ -179,24 +179,24 @@ trait Annotations { self: Universe =>
* @template
* @group Annotations
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
type NestedArgument >: Null <: NestedArgumentApi with JavaArgument
/** The constructor/extractor for `NestedArgument` instances.
* @group Extractors
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
val NestedArgument: NestedArgumentExtractor
/** An extractor class to create and pattern match with syntax `NestedArgument(annotation)`
* where `annotation` is the nested annotation.
* @group Extractors
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
abstract class NestedArgumentExtractor {
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
def apply(annotation: Annotation): NestedArgument
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
def unapply(arg: NestedArgument): Option[Annotation]
}
@@ -204,10 +204,10 @@ trait Annotations { self: Universe =>
* The main source of information about annotations is the [[scala.reflect.api.Annotations]] page.
* @group API
*/
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
trait NestedArgumentApi {
/** The underlying nested annotation. */
- @deprecated("Use `Annotation.tree` to inspect annotation arguments", "2.11.0")
+ @deprecated("use `Annotation.tree` to inspect annotation arguments", "2.11.0")
def annotation: Annotation
}
}
diff --git a/src/reflect/scala/reflect/api/FlagSets.scala b/src/reflect/scala/reflect/api/FlagSets.scala
index d3294dad9b..14852c0231 100644
--- a/src/reflect/scala/reflect/api/FlagSets.scala
+++ b/src/reflect/scala/reflect/api/FlagSets.scala
@@ -173,6 +173,7 @@ trait FlagSets { self: Universe =>
* - the enum's class
* - enum constants
**/
+ @deprecated("use `isJavaEnum` on the corresponding symbol instead", since = "2.11.8")
val ENUM: FlagSet
/** Flag indicating that tree represents a parameter of the primary constructor of some class
diff --git a/src/reflect/scala/reflect/api/Internals.scala b/src/reflect/scala/reflect/api/Internals.scala
index f57d7efa00..c2339700de 100644
--- a/src/reflect/scala/reflect/api/Internals.scala
+++ b/src/reflect/scala/reflect/api/Internals.scala
@@ -116,7 +116,7 @@ trait Internals { self: Universe =>
/** Substitute given tree `to` for occurrences of nodes that represent
* `C.this`, where `C` refers to the given class `clazz`.
*/
- def substituteThis(tree: Tree, clazz: Symbol, to: Tree): Tree
+ def substituteThis(tree: Tree, clazz: Symbol, to: => Tree): Tree
/** A factory method for `ClassDef` nodes.
*/
@@ -391,7 +391,7 @@ trait Internals { self: Universe =>
def substituteTypes(from: List[Symbol], to: List[Type]): Tree = internal.substituteTypes(tree, from, to)
/** @see [[internal.substituteThis]] */
- def substituteThis(clazz: Symbol, to: Tree): Tree = internal.substituteThis(tree, clazz, to)
+ def substituteThis(clazz: Symbol, to: => Tree): Tree = internal.substituteThis(tree, clazz, to)
}
/** Extension methods for symbols */
@@ -841,10 +841,10 @@ trait Internals { self: Universe =>
}
}
- @deprecated("Use `internal.reificationSupport` instead", "2.11.0")
+ @deprecated("use `internal.reificationSupport` instead", "2.11.0")
val build: ReificationSupportApi
- @deprecated("Use `internal.ReificationSupportApi` instead", "2.11.0")
+ @deprecated("use `internal.ReificationSupportApi` instead", "2.11.0")
type BuildApi = ReificationSupportApi
/** This trait provides support for importers, a facility to migrate reflection artifacts between universes.
@@ -934,12 +934,12 @@ trait Internals { self: Universe =>
def importPosition(pos: from.Position): Position
}
- @deprecated("Use `internal.createImporter` instead", "2.11.0")
+ @deprecated("use `internal.createImporter` instead", "2.11.0")
def mkImporter(from0: Universe): Importer { val from: from0.type } = internal.createImporter(from0)
/** Marks underlying reference to id as boxed.
*
- * <b>Precondition:</b> id must refer to a captured variable
+ * <b>Precondition:<\b> id must refer to a captured variable
* A reference such marked will refer to the boxed entity, no dereferencing
* with `.elem` is done on it.
* This tree node can be emitted by macros such as reify that call referenceCapturedVariable.
@@ -1012,7 +1012,7 @@ trait Internals { self: Universe =>
*/
def origin: String
- /** The valus this symbol refers to
+ /** The value this symbol refers to
*
* @group FreeTerm
*/
@@ -1078,72 +1078,72 @@ trait Internals { self: Universe =>
implicit val token = new CompatToken
/** @see [[InternalApi.typeTagToManifest]] */
- @deprecated("Use `internal.typeTagToManifest` instead", "2.11.0")
+ @deprecated("use `internal.typeTagToManifest` instead", "2.11.0")
def typeTagToManifest[T: ClassTag](mirror: Any, tag: Universe#TypeTag[T]): Manifest[T] =
internal.typeTagToManifest(mirror, tag)
/** @see [[InternalApi.manifestToTypeTag]] */
- @deprecated("Use `internal.manifestToTypeTag` instead", "2.11.0")
+ @deprecated("use `internal.manifestToTypeTag` instead", "2.11.0")
def manifestToTypeTag[T](mirror: Any, manifest: Manifest[T]): Universe#TypeTag[T] =
internal.manifestToTypeTag(mirror, manifest)
/** @see [[InternalApi.newScopeWith]] */
- @deprecated("Use `internal.newScopeWith` instead", "2.11.0")
+ @deprecated("use `internal.newScopeWith` instead", "2.11.0")
def newScopeWith(elems: Symbol*): Scope =
internal.newScopeWith(elems: _*)
/** Scala 2.10 compatibility enrichments for BuildApi. */
implicit class CompatibleBuildApi(api: BuildApi) {
/** @see [[BuildApi.setInfo]] */
- @deprecated("Use `internal.reificationSupport.setInfo` instead", "2.11.0")
+ @deprecated("use `internal.reificationSupport.setInfo` instead", "2.11.0")
def setTypeSignature[S <: Symbol](sym: S, tpe: Type): S = internal.reificationSupport.setInfo(sym, tpe)
/** @see [[BuildApi.FlagsRepr]] */
- @deprecated("Use `internal.reificationSupport.FlagsRepr` instead", "2.11.0")
+ @deprecated("use `internal.reificationSupport.FlagsRepr` instead", "2.11.0")
def flagsFromBits(bits: Long): FlagSet = internal.reificationSupport.FlagsRepr(bits)
/** @see [[BuildApi.noSelfType]] */
- @deprecated("Use `noSelfType` instead", "2.11.0")
+ @deprecated("use `noSelfType` instead", "2.11.0")
def emptyValDef: ValDef = noSelfType
/** @see [[BuildApi.mkThis]] */
- @deprecated("Use `internal.reificationSupport.mkThis` instead", "2.11.0")
+ @deprecated("use `internal.reificationSupport.mkThis` instead", "2.11.0")
def This(sym: Symbol): Tree = internal.reificationSupport.mkThis(sym)
/** @see [[BuildApi.mkSelect]] */
- @deprecated("Use `internal.reificationSupport.mkSelect` instead", "2.11.0")
+ @deprecated("use `internal.reificationSupport.mkSelect` instead", "2.11.0")
def Select(qualifier: Tree, sym: Symbol): Select = internal.reificationSupport.mkSelect(qualifier, sym)
/** @see [[BuildApi.mkIdent]] */
- @deprecated("Use `internal.reificationSupport.mkIdent` instead", "2.11.0")
+ @deprecated("use `internal.reificationSupport.mkIdent` instead", "2.11.0")
def Ident(sym: Symbol): Ident = internal.reificationSupport.mkIdent(sym)
/** @see [[BuildApi.mkTypeTree]] */
- @deprecated("Use `internal.reificationSupport.mkTypeTree` instead", "2.11.0")
+ @deprecated("use `internal.reificationSupport.mkTypeTree` instead", "2.11.0")
def TypeTree(tp: Type): TypeTree = internal.reificationSupport.mkTypeTree(tp)
}
/** Scala 2.10 compatibility enrichments for Tree. */
implicit class CompatibleTree(tree: Tree) {
/** @see [[InternalApi.freeTerms]] */
- @deprecated("Use `internal.freeTerms` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.freeTerms` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def freeTerms: List[FreeTermSymbol] = internal.freeTerms(tree)
/** @see [[InternalApi.freeTypes]] */
- @deprecated("Use `internal.freeTerms` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.freeTerms` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def freeTypes: List[FreeTypeSymbol] = internal.freeTypes(tree)
/** @see [[InternalApi.substituteSymbols]] */
- @deprecated("Use `internal.substituteSymbols` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.substituteSymbols` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def substituteSymbols(from: List[Symbol], to: List[Symbol]): Tree = internal.substituteSymbols(tree, from, to)
/** @see [[InternalApi.substituteTypes]] */
- @deprecated("Use `internal.substituteTypes` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.substituteTypes` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def substituteTypes(from: List[Symbol], to: List[Type]): Tree = internal.substituteTypes(tree, from, to)
/** @see [[InternalApi.substituteThis]] */
- @deprecated("Use `internal.substituteThis` instead or import `internal.decorators._` for infix syntax", "2.11.0")
- def substituteThis(clazz: Symbol, to: Tree): Tree = internal.substituteThis(tree, clazz, to)
+ @deprecated("use `internal.substituteThis` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ def substituteThis(clazz: Symbol, to: => Tree): Tree = internal.substituteThis(tree, clazz, to)
}
/** Scala 2.10 compatibility enrichments for Tree. */
@@ -1155,84 +1155,84 @@ trait Internals { self: Universe =>
def isOverride: Boolean = symbol.asInstanceOf[scala.reflect.internal.Symbols#Symbol].isOverride
/** @see [[InternalApi.isFreeTerm]] */
- @deprecated("Use `internal.isFreeTerm` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.isFreeTerm` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def isFreeTerm: Boolean = internal.isFreeTerm(symbol)
/** @see [[InternalApi.asFreeTerm]] */
- @deprecated("Use `internal.asFreeTerm` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.asFreeTerm` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def asFreeTerm: FreeTermSymbol = internal.asFreeTerm(symbol)
/** @see [[InternalApi.isFreeType]] */
- @deprecated("Use `internal.isFreeType` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.isFreeType` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def isFreeType: Boolean = internal.isFreeType(symbol)
/** @see [[InternalApi.asFreeType]] */
- @deprecated("Use `internal.asFreeType` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.asFreeType` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def asFreeType: FreeTypeSymbol = internal.asFreeType(symbol)
/** @see [[InternalApi.asFreeType]] */
- @deprecated("Use `internal.newTermSymbol` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.newTermSymbol` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def newTermSymbol(name: TermName, pos: Position = NoPosition, flags: FlagSet = NoFlags): TermSymbol = internal.newTermSymbol(symbol, name, pos, flags)
/** @see [[InternalApi.asFreeType]] */
- @deprecated("Use `internal.newModuleAndClassSymbol` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.newModuleAndClassSymbol` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def newModuleAndClassSymbol(name: Name, pos: Position = NoPosition, flags: FlagSet = NoFlags): (ModuleSymbol, ClassSymbol) = internal.newModuleAndClassSymbol(symbol, name, pos, flags)
/** @see [[InternalApi.asFreeType]] */
- @deprecated("Use `internal.newMethodSymbol` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.newMethodSymbol` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def newMethodSymbol(name: TermName, pos: Position = NoPosition, flags: FlagSet = NoFlags): MethodSymbol = internal.newMethodSymbol(symbol, name, pos, flags)
/** @see [[InternalApi.asFreeType]] */
- @deprecated("Use `internal.newTypeSymbol` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.newTypeSymbol` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def newTypeSymbol(name: TypeName, pos: Position = NoPosition, flags: FlagSet = NoFlags): TypeSymbol = internal.newTypeSymbol(symbol, name, pos, flags)
/** @see [[InternalApi.asFreeType]] */
- @deprecated("Use `internal.newClassSymbol` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.newClassSymbol` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def newClassSymbol(name: TypeName, pos: Position = NoPosition, flags: FlagSet = NoFlags): ClassSymbol = internal.newClassSymbol(symbol, name, pos, flags)
/** @see [[InternalApi.asFreeType]] */
- @deprecated("Use `internal.isErroneous` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.isErroneous` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def isErroneous: Boolean = internal.isErroneous(symbol)
/** @see [[InternalApi.asFreeType]] */
- @deprecated("Use `internal.isSkolem` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.isSkolem` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def isSkolem: Boolean = internal.isSkolem(symbol)
/** @see [[InternalApi.asFreeType]] */
- @deprecated("Use `internal.deSkolemize` instead or import `internal.decorators._` for infix syntax", "2.11.0")
+ @deprecated("use `internal.deSkolemize` instead or import `internal.decorators._` for infix syntax", "2.11.0")
def deSkolemize: Symbol = internal.deSkolemize(symbol)
}
/** @see [[InternalApi.singleType]] */
- @deprecated("Use `internal.singleType` instead", "2.11.0")
+ @deprecated("use `internal.singleType` instead", "2.11.0")
def singleType(pre: Type, sym: Symbol): Type = internal.singleType(pre, sym)
/** @see [[InternalApi.refinedType]] */
- @deprecated("Use `internal.refinedType` instead", "2.11.0")
+ @deprecated("use `internal.refinedType` instead", "2.11.0")
def refinedType(parents: List[Type], owner: Symbol, decls: Scope, pos: Position): Type = internal.refinedType(parents, owner, decls, pos)
/** @see [[InternalApi.refinedType]] */
- @deprecated("Use `internal.refinedType` instead", "2.11.0")
+ @deprecated("use `internal.refinedType` instead", "2.11.0")
def refinedType(parents: List[Type], owner: Symbol): Type = internal.refinedType(parents, owner)
/** @see [[InternalApi.typeRef]] */
- @deprecated("Use `internal.typeRef` instead", "2.11.0")
+ @deprecated("use `internal.typeRef` instead", "2.11.0")
def typeRef(pre: Type, sym: Symbol, args: List[Type]): Type = internal.typeRef(pre, sym, args)
/** @see [[InternalApi.intersectionType]] */
- @deprecated("Use `internal.intersectionType` instead", "2.11.0")
+ @deprecated("use `internal.intersectionType` instead", "2.11.0")
def intersectionType(tps: List[Type]): Type = internal.intersectionType(tps)
/** @see [[InternalApi.intersectionType]] */
- @deprecated("Use `internal.intersectionType` instead", "2.11.0")
+ @deprecated("use `internal.intersectionType` instead", "2.11.0")
def intersectionType(tps: List[Type], owner: Symbol): Type = internal.intersectionType(tps, owner)
/** @see [[InternalApi.polyType]] */
- @deprecated("Use `internal.polyType` instead", "2.11.0")
+ @deprecated("use `internal.polyType` instead", "2.11.0")
def polyType(tparams: List[Symbol], tpe: Type): Type = internal.polyType(tparams, tpe)
/** @see [[InternalApi.existentialAbstraction]] */
- @deprecated("Use `internal.existentialAbstraction` instead", "2.11.0")
+ @deprecated("use `internal.existentialAbstraction` instead", "2.11.0")
def existentialAbstraction(tparams: List[Symbol], tpe0: Type): Type = internal.existentialAbstraction(tparams, tpe0)
}
}
diff --git a/src/reflect/scala/reflect/api/Names.scala b/src/reflect/scala/reflect/api/Names.scala
index cc01225287..35009d7f59 100644
--- a/src/reflect/scala/reflect/api/Names.scala
+++ b/src/reflect/scala/reflect/api/Names.scala
@@ -33,14 +33,14 @@ trait Names {
* Enables an alternative notation `"map": TermName` as opposed to `TermName("map")`.
* @group Names
*/
- @deprecated("Use explicit `TermName(s)` instead", "2.11.0")
+ @deprecated("use explicit `TermName(s)` instead", "2.11.0")
implicit def stringToTermName(s: String): TermName = TermName(s)
/** An implicit conversion from String to TypeName.
* Enables an alternative notation `"List": TypeName` as opposed to `TypeName("List")`.
* @group Names
*/
- @deprecated("Use explicit `TypeName(s)` instead", "2.11.0")
+ @deprecated("use explicit `TypeName(s)` instead", "2.11.0")
implicit def stringToTypeName(s: String): TypeName = TypeName(s)
/** The abstract type of names.
@@ -87,13 +87,13 @@ trait Names {
/** Replaces all occurrences of \$op_names in this name by corresponding operator symbols.
* Example: `foo_\$plus\$eq` becomes `foo_+=`
*/
- @deprecated("Use `decodedName.toString` instead", "2.11.0")
+ @deprecated("use `decodedName.toString` instead", "2.11.0")
def decoded: String
/** Replaces all occurrences of operator symbols in this name by corresponding \$op_names.
* Example: `foo_+=` becomes `foo_\$plus\$eq`.
*/
- @deprecated("Use `encodedName.toString` instead", "2.11.0")
+ @deprecated("use `encodedName.toString` instead", "2.11.0")
def encoded: String
/** The decoded name, still represented as a name.
@@ -108,13 +108,13 @@ trait Names {
/** Create a new term name.
* @group Names
*/
- @deprecated("Use TermName instead", "2.11.0")
+ @deprecated("use TermName instead", "2.11.0")
def newTermName(s: String): TermName
/** Creates a new type name.
* @group Names
*/
- @deprecated("Use TypeName instead", "2.11.0")
+ @deprecated("use TypeName instead", "2.11.0")
def newTypeName(s: String): TypeName
/** The constructor/extractor for `TermName` instances.
diff --git a/src/reflect/scala/reflect/api/Position.scala b/src/reflect/scala/reflect/api/Position.scala
index 9d1b7c3812..2e02d4a26f 100644
--- a/src/reflect/scala/reflect/api/Position.scala
+++ b/src/reflect/scala/reflect/api/Position.scala
@@ -130,78 +130,78 @@ trait Position extends Attachments {
* If isDefined is true, offset and source are both defined.
* @group Common
*/
- @deprecated("Removed from the public API", "2.11.0") def isDefined: Boolean
+ @deprecated("removed from the public API", "2.11.0") def isDefined: Boolean
/** The point (where the ^ is) of the position, or else `default` if undefined.
* @group Common
*/
- @deprecated("Removed from the public API", "2.11.0") def pointOrElse(default: Int): Int
+ @deprecated("removed from the public API", "2.11.0") def pointOrElse(default: Int): Int
/** The start of the position's range, or point if not a range position. */
- @deprecated("Removed from the public API", "2.11.0") def startOrPoint: Int
+ @deprecated("removed from the public API", "2.11.0") def startOrPoint: Int
/** The end of the position's range, or point if not a range position.
*/
- @deprecated("Removed from the public API", "2.11.0") def endOrPoint: Int
+ @deprecated("removed from the public API", "2.11.0") def endOrPoint: Int
/** If this is a range, the union with the other range, with the point of this position.
* Otherwise, this position
*/
- @deprecated("Removed from the public API", "2.11.0") def union(pos: Pos): Pos
+ @deprecated("removed from the public API", "2.11.0") def union(pos: Pos): Pos
/** If this is a range position, the offset position of its start.
* Otherwise the position itself
*/
- @deprecated("Removed from the public API", "2.11.0") def focusStart: Pos
+ @deprecated("removed from the public API", "2.11.0") def focusStart: Pos
/** If this is a range position, the offset position of its end.
* Otherwise the position itself
*/
- @deprecated("Removed from the public API", "2.11.0") def focusEnd: Pos
+ @deprecated("removed from the public API", "2.11.0") def focusEnd: Pos
/** Does this position include the given position `pos`?
* This holds if `this` is a range position and its range [start..end]
* is the same or covers the range of the given position, which may or may not be a range position.
*/
- @deprecated("Removed from the public API", "2.11.0") def includes(pos: Pos): Boolean
+ @deprecated("removed from the public API", "2.11.0") def includes(pos: Pos): Boolean
/** Does this position properly include the given position `pos` ("properly" meaning their
* ranges are not the same)?
*/
- @deprecated("Removed from the public API", "2.11.0") def properlyIncludes(pos: Pos): Boolean
+ @deprecated("removed from the public API", "2.11.0") def properlyIncludes(pos: Pos): Boolean
/** Does this position precede that position?
* This holds if both positions are defined and the end point of this position
* is not larger than the start point of the given position.
*/
- @deprecated("Removed from the public API", "2.11.0") def precedes(pos: Pos): Boolean
+ @deprecated("removed from the public API", "2.11.0") def precedes(pos: Pos): Boolean
/** Does this position properly precede the given position `pos` ("properly" meaning their ranges
* do not share a common point).
*/
- @deprecated("Removed from the public API", "2.11.0") def properlyPrecedes(pos: Pos): Boolean
+ @deprecated("removed from the public API", "2.11.0") def properlyPrecedes(pos: Pos): Boolean
/** Does this position overlap with that position?
* This holds if both positions are ranges and there is an interval of
* non-zero length that is shared by both position ranges.
*/
- @deprecated("Removed from the public API", "2.11.0") def overlaps(pos: Pos): Boolean
+ @deprecated("removed from the public API", "2.11.0") def overlaps(pos: Pos): Boolean
/** Does this position cover the same range as that position?
* Holds only if both position are ranges
*/
- @deprecated("Removed from the public API", "2.11.0") def sameRange(pos: Pos): Boolean
+ @deprecated("removed from the public API", "2.11.0") def sameRange(pos: Pos): Boolean
/** Convert this to a position around `point` that spans a single source line
*/
- @deprecated("Removed from the public API", "2.11.0") def toSingleLine: Pos
+ @deprecated("removed from the public API", "2.11.0") def toSingleLine: Pos
/** The content of the line this Position refers to.
* @group Common
*/
- @deprecated("Removed from the public API", "2.11.0") def lineContent: String
+ @deprecated("removed from the public API", "2.11.0") def lineContent: String
/** Show a textual representation of the position.
*/
- @deprecated("Use `universe.show(position)` instead", "2.11.0") def show: String
+ @deprecated("use `universe.show(position)` instead", "2.11.0") def show: String
}
diff --git a/src/reflect/scala/reflect/api/Printers.scala b/src/reflect/scala/reflect/api/Printers.scala
index c0abc5120c..257dd6c43e 100644
--- a/src/reflect/scala/reflect/api/Printers.scala
+++ b/src/reflect/scala/reflect/api/Printers.scala
@@ -232,7 +232,7 @@ trait Printers { self: Universe =>
* @group Printers
*/
def showRaw(any: Any, printTypes: BooleanFlag = None, printIds: BooleanFlag = None, printOwners: BooleanFlag = None, printKinds: BooleanFlag = None, printMirrors: BooleanFlag = None, printPositions: BooleanFlag = None): String =
- render(any, newRawTreePrinter(_), printTypes, printIds, printOwners, printKinds, printMirrors, printPositions)
+ render(any, newRawTreePrinter, printTypes, printIds, printOwners, printKinds, printMirrors, printPositions)
/** Hook to define what `showRaw(...)` means.
* @group Printers
diff --git a/src/reflect/scala/reflect/api/StandardDefinitions.scala b/src/reflect/scala/reflect/api/StandardDefinitions.scala
index bf9cf5e334..50954f5eda 100644
--- a/src/reflect/scala/reflect/api/StandardDefinitions.scala
+++ b/src/reflect/scala/reflect/api/StandardDefinitions.scala
@@ -214,7 +214,7 @@ trait StandardDefinitions {
/** The module symbol of module `scala.Some`. */
def SomeModule: ModuleSymbol
- /** Function-like api that lets you acess symbol
+ /** Function-like api that lets you access symbol
* of the definition with given arity and also look
* through all known symbols via `seq`.
*/
diff --git a/src/reflect/scala/reflect/api/StandardNames.scala b/src/reflect/scala/reflect/api/StandardNames.scala
index 19bdfcae59..38667ae153 100644
--- a/src/reflect/scala/reflect/api/StandardNames.scala
+++ b/src/reflect/scala/reflect/api/StandardNames.scala
@@ -29,7 +29,7 @@ trait StandardNames {
self: Universe =>
/** @see [[termNames]] */
- @deprecated("Use `termNames` instead", "2.11.0")
+ @deprecated("use `termNames` instead", "2.11.0")
val nme: TermNamesApi
/** A value containing all [[TermNamesApi standard term names]].
@@ -38,7 +38,7 @@ trait StandardNames {
val termNames: TermNamesApi
/** @see [[typeNames]] */
- @deprecated("Use `typeNames` instead", "2.11.0")
+ @deprecated("use `typeNames` instead", "2.11.0")
val tpnme: TypeNamesApi
/** A value containing all [[TypeNamesApi standard type names]].
diff --git a/src/reflect/scala/reflect/api/Symbols.scala b/src/reflect/scala/reflect/api/Symbols.scala
index c01029d067..79bf9e969c 100644
--- a/src/reflect/scala/reflect/api/Symbols.scala
+++ b/src/reflect/scala/reflect/api/Symbols.scala
@@ -228,7 +228,7 @@ trait Symbols { self: Universe =>
throw new ScalaReflectionException(s"$this $msg")
}
- /** Used to provide a better error message for `asMethod`
+ /** Used to provide a better error message for `asMethod`.
*
* @group Tests
*/
@@ -257,12 +257,9 @@ trait Symbols { self: Universe =>
def isClass: Boolean = false
/** Does this symbol represent the definition of a class implicitly associated
- * with an object definition (module class in scala compiler parlance).
+ * with an object definition (module class in scala compiler parlance)?
* If yes, `isType` is also guaranteed to be true.
*
- * Note to compiler developers: During the "mixin" phase, trait implementation class symbols
- * receive the `lateMODULE` flag, hence `isImplClass && isModuleClass` becomes true.
- *
* @group Tests
*/
def isModuleClass: Boolean = false
@@ -283,7 +280,7 @@ trait Symbols { self: Universe =>
*
* @group Basics
*/
- @deprecated("Use `pos.source.file` instead", "2.11.0")
+ @deprecated("use `pos.source.file` instead", "2.11.0")
def associatedFile: scala.reflect.io.AbstractFile
/** A list of annotations attached to this Symbol.
@@ -294,14 +291,14 @@ trait Symbols { self: Universe =>
/** For a class: the module or case class factory with the same name in the same package.
* For a module: the class with the same name in the same package.
- * For all others: NoSymbol
+ * For all others: NoSymbol.
*
* This API may return unexpected results for module classes, packages and package classes.
* Use `companion` instead in order to get predictable results.
*
* @group Basics
*/
- @deprecated("Use `companion` instead, but beware of possible changes in behavior", "2.11.0")
+ @deprecated("use `companion` instead, but beware of possible changes in behavior", "2.11.0")
def companionSymbol: Symbol
/** For a class: its companion object if exists.
@@ -336,7 +333,7 @@ trait Symbols { self: Universe =>
def info: Type
/** @see [[overrides]] */
- @deprecated("Use `overrides` instead", "2.11.0")
+ @deprecated("use `overrides` instead", "2.11.0")
def allOverriddenSymbols: List[Symbol]
/** Returns all symbols overridden by this symbol.
@@ -345,7 +342,7 @@ trait Symbols { self: Universe =>
*/
def overrides: List[Symbol]
- /** The overloaded alternatives of this symbol
+ /** The overloaded alternatives of this symbol.
*
* @group Basics
*/
@@ -354,8 +351,7 @@ trait Symbols { self: Universe =>
/******************* tests *******************/
/** Does this symbol represent a synthetic (i.e. a compiler-generated) entity?
- * Examples of synthetic entities are accessors for vals and vars
- * or mixin constructors in trait implementation classes.
+ * Examples of synthetic entities are accessors for vals and vars.
*
* @group Tests
*/
@@ -370,7 +366,7 @@ trait Symbols { self: Universe =>
/** Does this symbol represent a declaration or definition written in a source file as `private[this]`
* or generated in tree/symbol form with the combination of flags LOCAL and PRIVATE?
- * If yes, `isPrivate` is guaranteed to be true,
+ * If yes, `isPrivate` is guaranteed to be true.
*
* @group Tests
*/
@@ -504,6 +500,18 @@ trait Symbols { self: Universe =>
*/
def isImplicit: Boolean
+ /** Does this symbol represent a java enum class or a java enum value?
+ *
+ * @group Tests
+ */
+ def isJavaEnum: Boolean
+
+ /** Does this symbol represent a java annotation interface?
+ *
+ * @group Tests
+ */
+ def isJavaAnnotation: Boolean
+
/******************* helpers *******************/
/** Provides an alternate if symbol is a NoSymbol.
@@ -678,7 +686,7 @@ trait Symbols { self: Universe =>
*/
def toTypeIn(site: Type): Type
- /** A type reference that refers to this type symbol
+ /** A type reference that refers to this type symbol.
* Note if symbol is a member of a class, one almost always is interested
* in `asTypeIn` with a site type instead.
*
@@ -718,7 +726,7 @@ trait Symbols { self: Universe =>
*
* @group Type
*/
- @deprecated("Use isAbstract instead", "2.11.0")
+ @deprecated("use isAbstract instead", "2.11.0")
def isAbstractType : Boolean
/** Does this symbol represent an existentially bound type?
@@ -727,7 +735,7 @@ trait Symbols { self: Universe =>
*/
def isExistential : Boolean
- /** For a polymorphic type, its type parameters, the empty list for all other types
+ /** For a polymorphic type, its type parameters, the empty list for all other types.
*
* @group Type
*/
@@ -756,12 +764,13 @@ trait Symbols { self: Universe =>
*/
def typeParams: List[Symbol]
- /** @see [[paramLists]] */
- @deprecated("Use `paramLists` instead", "2.11.0")
+ /** @see [[paramLists]]
+ *
+ * The name ending with "ss" indicates that the result type is a list of lists. */
+ @deprecated("use `paramLists` instead", "2.11.0")
def paramss: List[List[Symbol]]
/** All parameter lists of the method.
- * The name ending with "ss" indicates that the result type is a list of lists.
*
* Can be used to distinguish nullary methods and methods with empty parameter lists.
* For a nullary method, returns the empty list (i.e. `List()`).
@@ -777,7 +786,7 @@ trait Symbols { self: Universe =>
*/
def isVarargs: Boolean
- /** The return type of the method
+ /** The return type of the method.
*
* @group Method
*/
@@ -855,7 +864,7 @@ trait Symbols { self: Universe =>
*
* @group Class
*/
- @deprecated("Use isAbstract instead", "2.11.0")
+ @deprecated("use isAbstract instead", "2.11.0")
def isAbstractClass: Boolean
/** Does this symbol represent a case class?
@@ -911,7 +920,7 @@ trait Symbols { self: Universe =>
*/
def superPrefix(supertpe: Type): Type
- /** For a polymorphic class/trait, its type parameters, the empty list for all other classes/trait
+ /** For a polymorphic class/trait, its type parameters, the empty list for all other classes/trait.
*
* @group Class
*/
diff --git a/src/reflect/scala/reflect/api/Trees.scala b/src/reflect/scala/reflect/api/Trees.scala
index a43195d9b6..a2d11cc60e 100644
--- a/src/reflect/scala/reflect/api/Trees.scala
+++ b/src/reflect/scala/reflect/api/Trees.scala
@@ -388,7 +388,7 @@ trait Trees { self: Universe =>
def unapply(classDef: ClassDef): Option[(Modifiers, TypeName, List[TypeDef], Template)]
/** @see [[InternalApi.classDef]] */
- @deprecated("Use `internal.classDef` instead", "2.11.0")
+ @deprecated("use `internal.classDef` instead", "2.11.0")
def apply(sym: Symbol, impl: Template)(implicit token: CompatToken): ClassDef = internal.classDef(sym, impl)
}
@@ -437,7 +437,7 @@ trait Trees { self: Universe =>
def unapply(moduleDef: ModuleDef): Option[(Modifiers, TermName, Template)]
/** @see [[InternalApi.moduleDef]] */
- @deprecated("Use `internal.moduleDef` instead", "2.11.0")
+ @deprecated("use `internal.moduleDef` instead", "2.11.0")
def apply(sym: Symbol, impl: Template)(implicit token: CompatToken): ModuleDef = internal.moduleDef(sym, impl)
}
@@ -517,11 +517,11 @@ trait Trees { self: Universe =>
def unapply(valDef: ValDef): Option[(Modifiers, TermName, Tree, Tree)]
/** @see [[InternalApi.valDef]] */
- @deprecated("Use `internal.valDef` instead", "2.11.0")
+ @deprecated("use `internal.valDef` instead", "2.11.0")
def apply(sym: Symbol, rhs: Tree)(implicit token: CompatToken): ValDef = internal.valDef(sym, rhs)
/** @see [[InternalApi.valDef]] */
- @deprecated("Use `internal.valDef` instead", "2.11.0")
+ @deprecated("use `internal.valDef` instead", "2.11.0")
def apply(sym: Symbol)(implicit token: CompatToken): ValDef = internal.valDef(sym)
}
@@ -568,23 +568,23 @@ trait Trees { self: Universe =>
def unapply(defDef: DefDef): Option[(Modifiers, TermName, List[TypeDef], List[List[ValDef]], Tree, Tree)]
/** @see [[InternalApi.defDef]] */
- @deprecated("Use `internal.defDef` instead", "2.11.0")
+ @deprecated("use `internal.defDef` instead", "2.11.0")
def apply(sym: Symbol, mods: Modifiers, vparamss: List[List[ValDef]], rhs: Tree)(implicit token: CompatToken): DefDef = internal.defDef(sym, mods, vparamss, rhs)
/** @see [[InternalApi.defDef]] */
- @deprecated("Use `internal.defDef` instead", "2.11.0")
+ @deprecated("use `internal.defDef` instead", "2.11.0")
def apply(sym: Symbol, vparamss: List[List[ValDef]], rhs: Tree)(implicit token: CompatToken): DefDef = internal.defDef(sym, vparamss, rhs)
/** @see [[InternalApi.defDef]] */
- @deprecated("Use `internal.defDef` instead", "2.11.0")
+ @deprecated("use `internal.defDef` instead", "2.11.0")
def apply(sym: Symbol, mods: Modifiers, rhs: Tree)(implicit token: CompatToken): DefDef = internal.defDef(sym, mods, rhs)
/** @see [[InternalApi.defDef]] */
- @deprecated("Use `internal.defDef` instead", "2.11.0")
+ @deprecated("use `internal.defDef` instead", "2.11.0")
def apply(sym: Symbol, rhs: Tree)(implicit token: CompatToken): DefDef = internal.defDef(sym, rhs)
/** @see [[InternalApi.defDef]] */
- @deprecated("Use `internal.defDef` instead", "2.11.0")
+ @deprecated("use `internal.defDef` instead", "2.11.0")
def apply(sym: Symbol, rhs: List[List[Symbol]] => Tree)(implicit token: CompatToken): DefDef = internal.defDef(sym, rhs)
}
@@ -640,11 +640,11 @@ trait Trees { self: Universe =>
def unapply(typeDef: TypeDef): Option[(Modifiers, TypeName, List[TypeDef], Tree)]
/** @see [[InternalApi.typeDef]] */
- @deprecated("Use `internal.typeDef` instead", "2.11.0")
+ @deprecated("use `internal.typeDef` instead", "2.11.0")
def apply(sym: Symbol, rhs: Tree)(implicit token: CompatToken): TypeDef = internal.typeDef(sym, rhs)
/** @see [[InternalApi.typeDef]] */
- @deprecated("Use `internal.typeDef` instead", "2.11.0")
+ @deprecated("use `internal.typeDef` instead", "2.11.0")
def apply(sym: Symbol)(implicit token: CompatToken): TypeDef = internal.typeDef(sym)
}
@@ -708,7 +708,7 @@ trait Trees { self: Universe =>
def unapply(labelDef: LabelDef): Option[(TermName, List[Ident], Tree)]
/** @see [[InternalApi.labelDef]] */
- @deprecated("Use `internal.labelDef` instead", "2.11.0")
+ @deprecated("use `internal.labelDef` instead", "2.11.0")
def apply(sym: Symbol, params: List[Symbol], rhs: Tree)(implicit token: CompatToken): LabelDef = internal.labelDef(sym, params, rhs)
}
@@ -2104,7 +2104,7 @@ trait Trees { self: Universe =>
*/
val noSelfType: ValDef
- @deprecated("Use `noSelfType` instead", "2.11.0")
+ @deprecated("use `noSelfType` instead", "2.11.0")
val emptyValDef: ValDef
/** An empty superclass constructor call corresponding to:
@@ -2122,68 +2122,68 @@ trait Trees { self: Universe =>
* Flattens directly nested blocks.
* @group Factories
*/
- @deprecated("Use q\"{..$stats}\" instead. Flatten directly nested blocks manually if needed", "2.10.1")
+ @deprecated("use q\"{..$stats}\" instead. Flatten directly nested blocks manually if needed", "2.10.1")
def Block(stats: Tree*): Block
/** A factory method for `CaseDef` nodes.
* @group Factories
*/
- @deprecated("Use cq\"$pat => $body\" instead", "2.10.1")
+ @deprecated("use cq\"$pat => $body\" instead", "2.10.1")
def CaseDef(pat: Tree, body: Tree): CaseDef
/** A factory method for `Bind` nodes.
* @group Factories
*/
- @deprecated("Use the canonical Bind constructor to create a bind and then initialize its symbol manually", "2.10.1")
+ @deprecated("use the canonical Bind constructor to create a bind and then initialize its symbol manually", "2.10.1")
def Bind(sym: Symbol, body: Tree): Bind
/** A factory method for `Try` nodes.
* @group Factories
*/
- @deprecated("Convert cases into casedefs and use q\"try $body catch { case ..$newcases }\" instead", "2.10.1")
+ @deprecated("convert cases into casedefs and use q\"try $body catch { case ..$newcases }\" instead", "2.10.1")
def Try(body: Tree, cases: (Tree, Tree)*): Try
/** A factory method for `Throw` nodes.
* @group Factories
*/
- @deprecated("Use q\"throw new $tpe(..$args)\" instead", "2.10.1")
+ @deprecated("use q\"throw new $tpe(..$args)\" instead", "2.10.1")
def Throw(tpe: Type, args: Tree*): Throw
/** Factory method for object creation `new tpt(args_1)...(args_n)`
* A `New(t, as)` is expanded to: `(new t).<init>(as)`
* @group Factories
*/
- @deprecated("Use q\"new $tpt(...$argss)\" instead", "2.10.1")
+ @deprecated("use q\"new $tpt(...$argss)\" instead", "2.10.1")
def New(tpt: Tree, argss: List[List[Tree]]): Tree
/** 0-1 argument list new, based on a type.
* @group Factories
*/
- @deprecated("Use q\"new $tpe(..$args)\" instead", "2.10.1")
+ @deprecated("use q\"new $tpe(..$args)\" instead", "2.10.1")
def New(tpe: Type, args: Tree*): Tree
/** 0-1 argument list new, based on a symbol.
* @group Factories
*/
- @deprecated("Use q\"new ${sym.toType}(..$args)\" instead", "2.10.1")
+ @deprecated("use q\"new ${sym.toType}(..$args)\" instead", "2.10.1")
def New(sym: Symbol, args: Tree*): Tree
/** A factory method for `Apply` nodes.
* @group Factories
*/
- @deprecated("Use q\"$sym(..$args)\" instead", "2.10.1")
+ @deprecated("use q\"$sym(..$args)\" instead", "2.10.1")
def Apply(sym: Symbol, args: Tree*): Tree
/** 0-1 argument list new, based on a type tree.
* @group Factories
*/
- @deprecated("Use q\"new $tpt(..$args)\" instead", "2.10.1")
+ @deprecated("use q\"new $tpt(..$args)\" instead", "2.10.1")
def ApplyConstructor(tpt: Tree, args: List[Tree]): Tree
/** A factory method for `Super` nodes.
* @group Factories
*/
- @deprecated("Use q\"$sym.super[$mix].x\".qualifier instead", "2.10.1")
+ @deprecated("use q\"$sym.super[$mix].x\".qualifier instead", "2.10.1")
def Super(sym: Symbol, mix: TypeName): Tree
/** A factory method for `This` nodes.
@@ -2195,7 +2195,7 @@ trait Trees { self: Universe =>
* The string `name` argument is assumed to represent a [[scala.reflect.api.Names#TermName `TermName`]].
* @group Factories
*/
- @deprecated("Use Select(tree, TermName(name)) instead", "2.10.1")
+ @deprecated("use Select(tree, TermName(name)) instead", "2.10.1")
def Select(qualifier: Tree, name: String): Select
/** A factory method for `Select` nodes.
@@ -2206,7 +2206,7 @@ trait Trees { self: Universe =>
/** A factory method for `Ident` nodes.
* @group Factories
*/
- @deprecated("Use Ident(TermName(name)) instead", "2.10.1")
+ @deprecated("use Ident(TermName(name)) instead", "2.10.1")
def Ident(name: String): Ident
/** A factory method for `Ident` nodes.
@@ -2653,7 +2653,7 @@ trait Trees { self: Universe =>
*/
val Modifiers: ModifiersExtractor
- @deprecated("Use ModifiersExtractor instead", "2.11.0")
+ @deprecated("use ModifiersExtractor instead", "2.11.0")
type ModifiersCreator = ModifiersExtractor
/** An extractor class to create and pattern match with syntax `Modifiers(flags, privateWithin, annotations)`.
diff --git a/src/reflect/scala/reflect/api/TypeTags.scala b/src/reflect/scala/reflect/api/TypeTags.scala
index bc239ca870..cad318dbed 100644
--- a/src/reflect/scala/reflect/api/TypeTags.scala
+++ b/src/reflect/scala/reflect/api/TypeTags.scala
@@ -7,8 +7,6 @@ package scala
package reflect
package api
-import java.lang.{ Class => jClass }
-import scala.language.implicitConversions
import java.io.ObjectStreamException
/**
diff --git a/src/reflect/scala/reflect/api/Types.scala b/src/reflect/scala/reflect/api/Types.scala
index f9b49f1730..9e05a7f979 100644
--- a/src/reflect/scala/reflect/api/Types.scala
+++ b/src/reflect/scala/reflect/api/Types.scala
@@ -95,7 +95,7 @@ trait Types {
def typeSymbol: Symbol
/** @see [[decl]] */
- @deprecated("Use `decl` instead", "2.11.0")
+ @deprecated("use `decl` instead", "2.11.0")
def declaration(name: Name): Symbol
/** The defined or declared members with name `name` in this type;
@@ -105,7 +105,7 @@ trait Types {
def decl(name: Name): Symbol
/** @see [[decls]] */
- @deprecated("Use `decls` instead", "2.11.0")
+ @deprecated("use `decls` instead", "2.11.0")
def declarations: MemberScope
/** A `Scope` containing directly declared members of this type.
@@ -150,7 +150,7 @@ trait Types {
* TypeRef(pre, <List>, List()) is replaced by
* PolyType(X, TypeRef(pre, <List>, List(X)))
*/
- @deprecated("Use `dealias` or `etaExpand` instead", "2.11.0")
+ @deprecated("use `dealias` or `etaExpand` instead", "2.11.0")
def normalize: Type
/** Converts higher-kinded TypeRefs to PolyTypes.
@@ -263,7 +263,7 @@ trait Types {
def typeArgs: List[Type]
/** @see [[paramLists]] */
- @deprecated("Use `paramLists` instead", "2.11.0")
+ @deprecated("use `paramLists` instead", "2.11.0")
def paramss: List[List[Symbol]]
/** For a method or poly type, a list of its value parameter sections,
@@ -430,7 +430,7 @@ trait Types {
def unapply(tpe: ThisType): Option[Symbol]
/** @see [[InternalApi.thisType]] */
- @deprecated("Use `internal.thisType` instead", "2.11.0")
+ @deprecated("use `internal.thisType` instead", "2.11.0")
def apply(sym: Symbol)(implicit token: CompatToken): Type = internal.thisType(sym)
}
@@ -469,7 +469,7 @@ trait Types {
def unapply(tpe: SingleType): Option[(Type, Symbol)]
/** @see [[InternalApi.singleType]] */
- @deprecated("Use `ClassSymbol.thisPrefix` or `internal.singleType` instead", "2.11.0")
+ @deprecated("use `ClassSymbol.thisPrefix` or `internal.singleType` instead", "2.11.0")
def apply(pre: Type, sym: Symbol)(implicit token: CompatToken): Type = internal.singleType(pre, sym)
}
@@ -509,7 +509,7 @@ trait Types {
def unapply(tpe: SuperType): Option[(Type, Type)]
/** @see [[InternalApi.superType]] */
- @deprecated("Use `ClassSymbol.superPrefix` or `internal.superType` instead", "2.11.0")
+ @deprecated("use `ClassSymbol.superPrefix` or `internal.superType` instead", "2.11.0")
def apply(thistpe: Type, supertpe: Type)(implicit token: CompatToken): Type = internal.superType(thistpe, supertpe)
}
@@ -552,7 +552,7 @@ trait Types {
def unapply(tpe: ConstantType): Option[Constant]
/** @see [[InternalApi.constantType]] */
- @deprecated("Use `value.tpe` or `internal.constantType` instead", "2.11.0")
+ @deprecated("use `value.tpe` or `internal.constantType` instead", "2.11.0")
def apply(value: Constant)(implicit token: CompatToken): ConstantType = internal.constantType(value)
}
@@ -595,7 +595,7 @@ trait Types {
def unapply(tpe: TypeRef): Option[(Type, Symbol, List[Type])]
/** @see [[InternalApi.typeRef]] */
- @deprecated("Use `internal.typeRef` instead", "2.11.0")
+ @deprecated("use `internal.typeRef` instead", "2.11.0")
def apply(pre: Type, sym: Symbol, args: List[Type])(implicit token: CompatToken): Type = internal.typeRef(pre, sym, args)
}
@@ -655,11 +655,11 @@ trait Types {
def unapply(tpe: RefinedType): Option[(List[Type], Scope)]
/** @see [[InternalApi.refinedType]] */
- @deprecated("Use `internal.refinedType` instead", "2.11.0")
+ @deprecated("use `internal.refinedType` instead", "2.11.0")
def apply(parents: List[Type], decls: Scope)(implicit token: CompatToken): RefinedType = internal.refinedType(parents, decls)
/** @see [[InternalApi.refinedType]] */
- @deprecated("Use `internal.refinedType` instead", "2.11.0")
+ @deprecated("use `internal.refinedType` instead", "2.11.0")
def apply(parents: List[Type], decls: Scope, clazz: Symbol)(implicit token: CompatToken): RefinedType = internal.refinedType(parents, decls, clazz)
}
@@ -704,7 +704,7 @@ trait Types {
def unapply(tpe: ClassInfoType): Option[(List[Type], Scope, Symbol)]
/** @see [[InternalApi.classInfoType]] */
- @deprecated("Use `internal.classInfoType` instead", "2.11.0")
+ @deprecated("use `internal.classInfoType` instead", "2.11.0")
def apply(parents: List[Type], decls: Scope, typeSymbol: Symbol)(implicit token: CompatToken): ClassInfoType = internal.classInfoType(parents, decls, typeSymbol)
}
@@ -734,7 +734,7 @@ trait Types {
*/
val MethodType: MethodTypeExtractor
- /** An extractor class to create and pattern match with syntax `MethodType(params, respte)`
+ /** An extractor class to create and pattern match with syntax `MethodType(params, restpe)`
* Here, `params` is a potentially empty list of parameter symbols of the method,
* and `restpe` is the result type of the method. If the method is curried, `restpe` would
* be another `MethodType`.
@@ -753,7 +753,7 @@ trait Types {
def unapply(tpe: MethodType): Option[(List[Symbol], Type)]
/** @see [[InternalApi.methodType]] */
- @deprecated("Use `internal.methodType` instead", "2.11.0")
+ @deprecated("use `internal.methodType` instead", "2.11.0")
def apply(params: List[Symbol], resultType: Type)(implicit token: CompatToken): MethodType = internal.methodType(params, resultType)
}
@@ -789,7 +789,7 @@ trait Types {
def unapply(tpe: NullaryMethodType): Option[(Type)]
/** @see [[InternalApi.nullaryMethodType]] */
- @deprecated("Use `internal.nullaryMethodType` instead", "2.11.0")
+ @deprecated("use `internal.nullaryMethodType` instead", "2.11.0")
def apply(resultType: Type)(implicit token: CompatToken): NullaryMethodType = internal.nullaryMethodType(resultType)
}
@@ -823,7 +823,7 @@ trait Types {
def unapply(tpe: PolyType): Option[(List[Symbol], Type)]
/** @see [[InternalApi.polyType]] */
- @deprecated("Use `internal.polyType` instead", "2.11.0")
+ @deprecated("use `internal.polyType` instead", "2.11.0")
def apply(typeParams: List[Symbol], resultType: Type)(implicit token: CompatToken): PolyType = internal.polyType(typeParams, resultType)
}
@@ -861,7 +861,7 @@ trait Types {
def unapply(tpe: ExistentialType): Option[(List[Symbol], Type)]
/** @see [[InternalApi.existentialType]] */
- @deprecated("Use `internal.existentialType` instead", "2.11.0")
+ @deprecated("use `internal.existentialType` instead", "2.11.0")
def apply(quantified: List[Symbol], underlying: Type)(implicit token: CompatToken): ExistentialType = internal.existentialType(quantified, underlying)
}
@@ -899,7 +899,7 @@ trait Types {
def unapply(tpe: AnnotatedType): Option[(List[Annotation], Type)]
/** @see [[InternalApi.annotatedType]] */
- @deprecated("Use `internal.annotatedType` instead", "2.11.0")
+ @deprecated("use `internal.annotatedType` instead", "2.11.0")
def apply(annotations: List[Annotation], underlying: Type)(implicit token: CompatToken): AnnotatedType = internal.annotatedType(annotations, underlying)
}
@@ -943,7 +943,7 @@ trait Types {
def unapply(tpe: TypeBounds): Option[(Type, Type)]
/** @see [[InternalApi.typeBounds]] */
- @deprecated("Use `internal.typeBounds` instead", "2.11.0")
+ @deprecated("use `internal.typeBounds` instead", "2.11.0")
def apply(lo: Type, hi: Type)(implicit token: CompatToken): TypeBounds = internal.typeBounds(lo, hi)
}
@@ -996,7 +996,7 @@ trait Types {
def unapply(tpe: BoundedWildcardType): Option[TypeBounds]
/** @see [[InternalApi.boundedWildcardType]] */
- @deprecated("Use `internal.boundedWildcardType` instead", "2.11.0")
+ @deprecated("use `internal.boundedWildcardType` instead", "2.11.0")
def apply(bounds: TypeBounds)(implicit token: CompatToken): BoundedWildcardType = internal.boundedWildcardType(bounds)
}