The abstract type of names.
The abstract type of names representing types.
The abstract type of names representing terms.
Create a new term name.
Create a new term name.
(Since version 2.11.0) Use TermName instead
Creates a new type name.
Creates a new type name.
(Since version 2.11.0) Use TypeName instead
An implicit conversion from String to TermName.
An implicit conversion from String to TermName.
Enables an alternative notation "map": TermName
as opposed to TermName("map")
.
(Since version 2.11.0) Use explicit TermName(s)
instead
An implicit conversion from String to TypeName.
An implicit conversion from String to TypeName.
Enables an alternative notation "List": TypeName
as opposed to TypeName("List")
.
(Since version 2.11.0) Use explicit TypeName(s)
instead
The methods available for each reflection entity, without the implementation. Since the reflection entities are later overridden by runtime reflection and macros, their API counterparts guarantee a minimum set of methods that are implemented.
The API of Name instances.
Has no special methods.
Has no special methods. Is here to provides erased identity for TermName
.
Has no special methods.
Has no special methods. Is here to provides erased identity for TypeName
.
Extractors provide the machinery necessary to allow pattern matching and construction of reflection entities that is similar to case classes, although the entities are only abstract types that are later overridden.
An extractor class to create and pattern match with syntax TermName(s)
.
An extractor class to create and pattern match with syntax TypeName(s)
.
The constructor/extractor for TermName
instances.
The constructor/extractor for TypeName
instances.
EXPERIMENTAL
This trait defines
Name
s in Scala Reflection, and operations on them.Names are simple wrappers for strings. Name has two subtypes TermName and TypeName which distinguish names of terms (like objects or members) and types. A term and a type of the same name can co-exist in an object.
To search for the
map
method (which is a term) declared in theList
class, one can do:To search for a type member, one can follow the same procedure, using
TypeName
instead.For more information about creating and using
Name
s, see the Reflection Guide: Annotations, Names, Scopes, and More