SymbolModule
Methods of the module object val Symbol
Methods of the module object val Symbol
Value members
Abstract methods
Generates a pattern bind symbol with the given parent, name and type.
Generates a pattern bind symbol with the given parent, name and type.
This symbol starts without an accompanying definition. It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing this symbol to the BindDef constructor.
- Value Params
- flags
extra flags to with which the symbol should be constructed
- Note
As a macro can only splice code into the point at which it is expanded, all generated symbols must be direct or indirect children of the reflection context's owner.
Generates a new method symbol with the given parent, name and type.
Generates a new method symbol with the given parent, name and type.
This symbol starts without an accompanying definition. It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing this symbol to the DefDef constructor.
- Note
As a macro can only splice code into the point at which it is expanded, all generated symbols must be direct or indirect children of the reflection context's owner.
Works as the other newMethod, but with additional parameters.
Works as the other newMethod, but with additional parameters.
- Value Params
- flags
extra flags to with which the symbol should be constructed
- privateWithin
the symbol within which this new method symbol should be private. May be noSymbol.
Generates a new val/var/lazy val symbol with the given parent, name and type.
Generates a new val/var/lazy val symbol with the given parent, name and type.
This symbol starts without an accompanying definition. It is the meta-programmer's responsibility to provide exactly one corresponding definition by passing this symbol to the ValDef constructor.
Note: Also see reflect.let
- Value Params
- flags
extra flags to with which the symbol should be constructed
- privateWithin
the symbol within which this new method symbol should be private. May be noSymbol.
- Note
As a macro can only splice code into the point at which it is expanded, all generated symbols must be direct or indirect children of the reflection context's owner.
Get class symbol if class is either defined in current compilation run or present on classpath.
Get class symbol if class is either defined in current compilation run or present on classpath.
Get method symbol if method is either defined in current compilation run or present on classpath.
Get method symbol if method is either defined in current compilation run or present on classpath. Throws if the method has an overload.
Get module symbol if module is either defined in current compilation run or present on classpath.
Get module symbol if module is either defined in current compilation run or present on classpath.
Get package symbol if package is either defined in current compilation run or present on classpath.
Get package symbol if package is either defined in current compilation run or present on classpath.
Symbol of the definition that encloses the current splicing context.
Symbol of the definition that encloses the current splicing context.
For example, the following call to spliceOwner
would return the symbol x
.
val x = ${ ... Symbol.spliceOwner ... }
For a macro splice, it is the symbol of the definition where the macro expansion happens.