Symbol
extends ObjectSupertypes
ObjectMembers
classSymbol
( fullName: String ) ( implicit ctx: Context ) : SymbolThe class Symbol of a global class definition
The class Symbol of a global class definition
currentOwner
( implicit ctx: Context ) : SymbolReturns the symbol of the current enclosing definition
Returns the symbol of the current enclosing definition
extension_annots
( sym: Symbol ) ( implicit ctx: Context ) : List[Term]Annotations attached to this symbol
Annotations attached to this symbol
extension_caseFields
( sym: Symbol ) ( implicit ctx: Context ) : List[Symbol]Fields of a case class type -- only the ones declared in primary constructor
Fields of a case class type -- only the ones declared in primary constructor
extension_children
( sym: Symbol ) ( implicit ctx: Context ) : List[Symbol]Case class or case object children of a sealed trait
Case class or case object children of a sealed trait
extension_classMethod
( sym: Symbol ) ( name: String ) ( implicit ctx: Context ) : List[Symbol]Get non-private named methods defined directly inside the class
Get non-private named methods defined directly inside the class
extension_classMethods
( sym: Symbol ) ( implicit ctx: Context ) : List[Symbol]Get all non-private methods defined directly inside the class, exluding constructors
Get all non-private methods defined directly inside the class, exluding constructors
extension_comment
( sym: Symbol ) ( implicit ctx: Context ) : Option[Comment]The comment for this symbol, if any
extension_companionClass
( sym: Symbol ) ( implicit ctx: Context ) : SymbolThe symbol of the companion class
The symbol of the companion class
extension_companionModule
( sym: Symbol ) ( implicit ctx: Context ) : SymbolThe symbol of the companion module
The symbol of the companion module
extension_exists
( sym: Symbol ) ( implicit ctx: Context ) : BooleanDoes this symbol represent a definition?
Does this symbol represent a definition?
extension_field
( sym: Symbol ) ( name: String ) ( implicit ctx: Context ) : SymbolField with the given name directly declared in the class
Field with the given name directly declared in the class
extension_fields
( sym: Symbol ) ( implicit ctx: Context ) : List[Symbol]Fields directly declared in the class
Fields directly declared in the class
extension_flags
( sym: Symbol ) ( implicit ctx: Context ) : FlagsFlags of this symbol
Flags of this symbol
extension_fullName
( sym: Symbol ) ( implicit ctx: Context ) : StringThe full name of this symbol up to the root package
The full name of this symbol up to the root package
extension_isBind
( sym: Symbol ) ( implicit ctx: Context ) : BooleanIs this the definition of a Bind pattern?
Is this the definition of a Bind pattern?
extension_isClassDef
( sym: Symbol ) ( implicit ctx: Context ) : BooleanIs this the definition of a ClassDef tree?
Is this the definition of a ClassDef tree?
extension_isDefDef
( sym: Symbol ) ( implicit ctx: Context ) : BooleanIs this the definition of a DefDef tree?
Is this the definition of a DefDef tree?
extension_isNoSymbol
( sym: Symbol ) ( implicit ctx: Context ) : BooleanDoes this symbol represent a no definition?
Does this symbol represent a no definition?
extension_isPackageDef
( sym: Symbol ) ( implicit ctx: Context ) : BooleanIs this the definition of a PackageDef tree?
Is this the definition of a PackageDef tree?
extension_isTerm
( sym: Symbol ) ( implicit ctx: Context ) : BooleanIs this the definition of a term?
Is this the definition of a term?
extension_isType
( sym: Symbol ) ( implicit ctx: Context ) : BooleanIs this the definition of a type?
Is this the definition of a type?
extension_isTypeDef
( sym: Symbol ) ( implicit ctx: Context ) : BooleanIs this the definition of a TypeDef tree
Is this the definition of a TypeDef tree
extension_isValDef
( sym: Symbol ) ( implicit ctx: Context ) : BooleanIs this the definition of a ValDef tree?
Is this the definition of a ValDef tree?
extension_maybeOwner
( sym: Symbol ) ( implicit ctx: Context ) : SymbolOwner of this symbol. The owner is the symbol in which this symbol is defined. Returns NoSymbol
if this symbol does not have an owner.
Owner of this symbol. The owner is the symbol in which this symbol is defined. Returns NoSymbol
if this symbol does not have an owner.
extension_method
( sym: Symbol ) ( name: String ) ( implicit ctx: Context ) : List[Symbol]Get named non-private methods declared or inherited
Get named non-private methods declared or inherited
extension_methods
( sym: Symbol ) ( implicit ctx: Context ) : List[Symbol]Get all non-private methods declared or inherited
Get all non-private methods declared or inherited
extension_moduleClass
( sym: Symbol ) ( implicit ctx: Context ) : SymbolThe class symbol of the companion module class
The class symbol of the companion module class
extension_name
( sym: Symbol ) ( implicit ctx: Context ) : StringThe name of this symbol
The name of this symbol
extension_owner
( sym: Symbol ) ( implicit ctx: Context ) : SymbolOwner of this symbol. The owner is the symbol in which this symbol is defined. Throws if this symbol does not have an owner.
Owner of this symbol. The owner is the symbol in which this symbol is defined. Throws if this symbol does not have an owner.
extension_paramSymss
( sym: Symbol ) ( implicit ctx: Context ) : List[List[Symbol]]The symbols of each type parameter list and value parameter list of this method, or Nil if this isn't a method.
The symbols of each type parameter list and value parameter list of this method, or Nil if this isn't a method.
extension_pos
( sym: Symbol ) ( implicit ctx: Context ) : PositionThe position of this symbol
The position of this symbol
extension_primaryConstructor
( sym: Symbol ) ( implicit x$1: Context ) : SymbolThe primary constructor of a class or trait, noSymbol
if not applicable.
The primary constructor of a class or trait, noSymbol
if not applicable.
extension_privateWithin
( sym: Symbol ) ( implicit ctx: Context ) : Option[Type]This symbol is private within the resulting type
This symbol is private within the resulting type
extension_protectedWithin
( sym: Symbol ) ( implicit ctx: Context ) : Option[Type]This symbol is protected within the resulting type
This symbol is protected within the resulting type
extension_show
( sym: Symbol ) ( implicit ctx: Context ) : StringShows the tree as fully typed source code
Shows the tree as fully typed source code
extension_showExtractors
( sym: Symbol ) ( implicit ctx: Context ) : StringShows the tree as extractors
Shows the tree as extractors
extension_showWith
( sym: Symbol ) ( syntaxHighlight: SyntaxHighlight ) ( implicit ctx: Context ) : StringShows the tree as fully typed source code
Shows the tree as fully typed source code
extension_signature
( sym: Symbol ) ( implicit ctx: Context ) : SignatureSignature of this definition
Signature of this definition
extension_tree
( sym: Symbol ) ( implicit ctx: Context ) : TreeTree of this definition
if this symbol isPackageDef
it will return a PackageDef
,
if this symbol isClassDef
it will return a ClassDef
,
if this symbol isTy...
Tree of this definition
if this symbol isPackageDef
it will return a PackageDef
,
if this symbol isClassDef
it will return a ClassDef
,
if this symbol isTypeDef
it will return a TypeDef
,
if this symbol isValDef
it will return a ValDef
,
if this symbol isDefDef
it will return a DefDef
if this symbol isBind
it will return a Bind
extension_typeMember
( sym: Symbol ) ( name: String ) ( implicit ctx: Context ) : SymbolType member with the given name directly declared in the class
Type member with the given name directly declared in the class
extension_typeMembers
( sym: Symbol ) ( implicit ctx: Context ) : List[Symbol]Type member directly declared in the class
Type member directly declared in the class
newBind
( parent: Symbol , name: String , flags: Flags , tpe: Type ) ( implicit ctx: Context ) : SymbolGenerates a pattern bind symbol with the given parent, name and type.
This symbol starts without an accompanying definition. It is the meta-programmer's...
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.
newMethod
( parent: Symbol , name: String , tpe: Type ) ( implicit ctx: Context ) : SymbolGenerates a new method symbol with the given parent, name and type.
This symbol starts without an accompanying definition. It is the meta-programmer's r...
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.
newMethod
( parent: Symbol , name: String , tpe: Type , flags: Flags , privateWithin: Symbol ) ( implicit ctx: Context ) : SymbolWorks as the other newMethod, but with additional parameters.
Works as the other newMethod, but with additional parameters.
newVal
( parent: Symbol , name: String , tpe: Type , flags: Flags , privateWithin: Symbol ) ( implicit ctx: Context ) : SymbolGenerates 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-prog...
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 Reflection.let
requiredClass
( path: String ) ( implicit ctx: Context ) : SymbolGet 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.
requiredMethod
( path: String ) ( implicit ctx: Context ) : SymbolGet method symbol if method is either defined in current compilation run or present on classpath. Throws if the method has an overload.
Get method symbol if method is either defined in current compilation run or present on classpath. Throws if the method has an overload.
The comment for this symbol, if any