Dotty Documentation

0.6.0-bin-SNAPSHOT

final class SymUtils
extends AnyVal

A decorator that provides methods on symbols that are needed in the transformer pipeline.

[-] Constructors

SymUtils ( self: Symbol )

[-] Members

[+] val self : Symbol
[+] def accessorNamed ( name: TermName ) ( implicit ctx: Context ) : Symbol
[+] def annotationsCarrying ( meta: ClassSymbol ) ( implicit ctx: Context ) : List [ Annotation ]
[+] def caseAccessors ( implicit ctx: Context ) : List [ Symbol ]
[+] def children ( implicit ctx: Context ) : List [ Symbol ]

If this is a sealed class, its known children

[+] def directlyInheritedTraits ( implicit ctx: Context ) : List [ ClassSymbol ]

All traits implemented by a class or trait except for those inherited through the superclass.

[+] @tailrec final def enclosingMethodOrClass ( implicit ctx: Context ) : Symbol

The closest enclosing method or class of this symbol

[+] final def enclosure ( implicit ctx: Context ) : Symbol

The closest properly enclosing method or class of this symbol.

[+] def field ( implicit ctx: Context ) : Symbol
[+] def getter ( implicit ctx: Context ) : Symbol
[+] def implClass ( implicit ctx: Context ) : Symbol
[+] def isAnyOverride ( implicit ctx: Context ) : Boolean
[+] def isField ( implicit ctx: Context ) : Boolean
[+] def isInaccessibleChildOf ( cls: Symbol ) ( implicit ctx: Context ) : Boolean

Is this symbol defined locally (i.e. at some level owned by a term) and defined in a different toplevel class than its supposed parent class cls? Such children are not pickled, and have to be reconstituted manually.

[+] @tailrec def isLocal ( implicit ctx: Context ) : Boolean

Is symbol directly or indirectly owned by a term symbol?

[+] def isParamOrAccessor ( implicit ctx: Context ) : Boolean

A type or term parameter or a term parameter accessor

[+] def isSuperAccessor ( implicit ctx: Context ) : Boolean
[+] def isTypeTest ( implicit ctx: Context ) : Boolean
[+] def isTypeTestOrCast ( implicit ctx: Context ) : Boolean
[+] def isVolatile ( implicit ctx: Context ) : Boolean
[+] def mixins ( implicit ctx: Context ) : List [ ClassSymbol ]

All traits implemented by a class, except for those inherited through the superclass. The empty list if self is a trait.

[+] def paramAccessors ( implicit ctx: Context ) : List [ Symbol ]
[+] def registerCompanionMethod ( name: Name , target: Symbol ) ( implicit ctx: Context ) : Any
[+] def registerIfChild ( late: Boolean ) ( implicit ctx: Context ) : Unit

If this symbol is an enum value or a named class, register it as a child in all direct parent classes which are sealed.

[+] def setter ( implicit ctx: Context ) : Symbol
[+] final def skipConstructor ( implicit ctx: Context ) : Symbol

If this is a constructor, its owner: otherwise this.

[+] def subst ( from: List [ Symbol ] , to: List [ Symbol ] ) : Symbol

Apply symbol/symbol substitution to this symbol

[+] def traitOfImplClass ( implicit ctx: Context ) : Symbol
[+] def withAnnotationsCarrying ( from: Symbol , meta: ClassSymbol ) ( implicit ctx: Context ) : self.type