The abstract type of names.
The API of Name instances.
The abstract type of names representing types.
An extractor class to create and pattern match with syntax TermName(s)
.
The abstract type of names representing terms.
An extractor class to create and pattern match with syntax TypeName(s)
.
The constructor/extractor for TermName
instances.
The constructor/extractor for TypeName
instances.
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
Returns string formatted according to given format
string.
Returns string formatted according to given format
string.
Format strings are as for String.format
(@see java.lang.String.format).
An implicit conversion from String to TermName.
An implicit conversion from String to TermName.
Enables an alternative notation "map": TermName
as opposed to newTermName("map")
.
An implicit conversion from String to TypeName.
An implicit conversion from String to TypeName.
Enables an alternative notation "List": TypeName
as opposed to newTypeName("List")
.
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.
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.
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
newTypeName
instead.For more information about creating and using
Name
s, see the Reflection Guide: Annotations, Names, Scopes, and More