SymUtils

dotty.tools.dotc.transform.SymUtils$
object SymUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Extensions

Extensions

extension (self: Symbol)
def caseAccessors(using Context): List[Symbol]

The declared self type of this class, as seen from site, stripping all refinements for opaque types.

The declared self type of this class, as seen from site, stripping all refinements for opaque types.

Attributes

def deriveTargetNameAnnotation(original: Symbol, nameFn: Name => Name)(using Context): Unit

If original has a target name annotation, add one to this symbol as well such that the new target name is original's target name transformed by nameFn.

If original has a target name annotation, add one to this symbol as well such that the new target name is original's target name transformed by nameFn.

Attributes

def derivesFromJavaEnum(using Context): Boolean

All traits implemented by a class or trait except for those inherited through the superclass. Traits are given in the order they appear in the parents clause (which is the reverse of their order in baseClasses)

All traits implemented by a class or trait except for those inherited through the superclass. Traits are given in the order they appear in the parents clause (which is the reverse of their order in baseClasses)

Attributes

The closest enclosing method or class of this symbol

The closest enclosing method or class of this symbol

Attributes

final def enclosure(using Context): Symbol

The closest properly enclosing method or class of this symbol.

The closest properly enclosing method or class of this symbol.

Attributes

def field(using Context): Symbol
def getter(using Context): Symbol
def hasAnonymousChild(using Context): Boolean
def isAnyOverride(using Context): Boolean
def isConstExprFinalVal(using Context): Boolean
def isDeclaredInfix(using Context): Boolean

Is symbol assumed or declared as an infix symbol?

Is symbol assumed or declared as an infix symbol?

Attributes

def isDeprecated(using Context): Boolean
def isEnum(using Context): Boolean
def isEnumAnonymClass(using Context): Boolean

Does this symbol refer to anonymous classes synthesized by enum desugaring?

Does this symbol refer to anonymous classes synthesized by enum desugaring?

Attributes

def isEnumCase(using Context): Boolean
def isEnumClass(using Context): Boolean
def isExperimental(using Context): Boolean

Is symbol declared or inherits @experimental?

Is symbol declared or inherits @experimental?

Attributes

def isExprSplice(using Context): Boolean

Is symbol a term splice operation?

Is symbol a term splice operation?

Attributes

def isField(using Context): Boolean
def isGenericProduct(using Context): Boolean
def isGenericSum(pre: Type)(using Context): Boolean
def isGivenInstanceSummoner(using Context): Boolean

Is this the method that summons a structural given instance?

Is this the method that summons a structural given instance?

Attributes

def isInExperimentalScope(using Context): Boolean
def isInaccessibleChildOf(cls: Symbol)(using Context): Boolean

Is this symbol defined locally (i.e. at some level owned by a term) so that it cannot be seen from parent class cls?

Is this symbol defined locally (i.e. at some level owned by a term) so that it cannot be seen from parent class cls?

Attributes

def isInlineVal(using Context): Boolean
final def isLocal(using Context): Boolean

Is symbol directly or indirectly owned by a term symbol?

Is symbol directly or indirectly owned by a term symbol?

Attributes

def isLocalToBlock(using Context): Boolean

Is this symbol directly owner by a term symbol, i.e., is it local to a block?

Is this symbol directly owner by a term symbol, i.e., is it local to a block?

Attributes

def isNoValue(using Context): Boolean
def isOldStyleImplicitConversion(directOnly: Boolean, forImplicitClassOnly: Boolean)(using Context): Boolean

Is this an old style implicit conversion?

Is this an old style implicit conversion?

Attributes

directOnly

only consider explicitly written methods

forImplicitClassOnly

only consider methods generated from implicit classes

def isParamOrAccessor(using Context): Boolean

Is this a type or term parameter or a term parameter accessor?

Is this a type or term parameter or a term parameter accessor?

Attributes

def isQuote(using Context): Boolean

Is symbol a quote operation?

Is symbol a quote operation?

Attributes

def isScalaStatic(using Context): Boolean
def isSuperAccessor(using Context): Boolean
def isThreadUnsafe(using Context): Boolean
def isTypeCast(using Context): Boolean
def isTypeSplice(using Context): Boolean

Is symbol a type splice operation?

Is symbol a type splice operation?

Attributes

def isTypeTest(using Context): Boolean
def isTypeTestOrCast(using Context): Boolean
def isUniversalTrait(using Context): Boolean
def isVolatile(using Context): Boolean

The return type as seen from the body of this definition. It is computed from the symbol's type by replacing param refs by param symbols.

The return type as seen from the body of this definition. It is computed from the symbol's type by replacing param refs by param symbols.

Attributes

def mixins(using Context): List[ClassSymbol]

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

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

Attributes

The reachable typeRef with wildcard arguments for each type parameter

The reachable typeRef with wildcard arguments for each type parameter

Attributes

The expected type of a return to self at the place indicated by the context. This is the local return type instantiated by the symbols of any context function closures that enclose the site of the return

The expected type of a return to self at the place indicated by the context. This is the local return type instantiated by the symbols of any context function closures that enclose the site of the return

Attributes

def setter(using Context): Symbol
final def skipConstructor(using Context): Symbol

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

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

Attributes

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

Apply symbol/symbol substitution to this symbol

Apply symbol/symbol substitution to this symbol

Attributes

def useCompanionAsSumMirror(using Context): Boolean
def whyNotGenericProduct(using Context): String

Is this a case class for which a product mirror is generated? Excluded are value classes, abstract classes and case classes with more than one parameter section.

Is this a case class for which a product mirror is generated? Excluded are value classes, abstract classes and case classes with more than one parameter section.

Attributes

def whyNotGenericSum(pre: Type)(using Context): String

Is this a sealed class or trait for which a sum mirror is generated? It must satisfy the following conditions:

Is this a sealed class or trait for which a sum mirror is generated? It must satisfy the following conditions:

  • it has at least one child class or object
  • none of its children are anonymous classes
  • all of its children are addressable through a path from the parent class and also the location of the generated mirror.
  • all of its children are generic products, singletons, or generic sums themselves.

Attributes