ClassSymbol

class ClassSymbol extends Symbol
class Symbol
trait Showable
trait SrcPos
trait ParamInfo
class Object
trait Matchable
class Any

Type members

Inherited types

Inherited from:
Symbol

Value members

Concrete methods

override def associatedFile(using Context): AbstractFile | Null

The source or class file from which this class was generated, null if not applicable.

The source or class file from which this class was generated, null if not applicable.

Definition Classes
def rootTree(using Context): Tree

If this is a top-level class and -Yretain-trees (or -from-tasty) is set. Returns the TypeDef tree (possibly wrapped inside PackageDefs) for this class, otherwise EmptyTree. This will force the info of the class.

If this is a top-level class and -Yretain-trees (or -from-tasty) is set. Returns the TypeDef tree (possibly wrapped inside PackageDefs) for this class, otherwise EmptyTree. This will force the info of the class.

Same as tree but load tree only if id == "" or the tree might contain id. For Tasty trees this means consulting whether the name table defines id. For already loaded trees, we maintain the referenced ids in an attachment.

Same as tree but load tree only if id == "" or the tree might contain id. For Tasty trees this means consulting whether the name table defines id. For already loaded trees, we maintain the referenced ids in an attachment.

final def sourceOfClass(using Context): SourceFile

Inherited methods

final def asClass: ClassSymbol
Inherited from:
Symbol
final def asTerm(using Context): TermSymbol
Inherited from:
Symbol
final def asType(using Context): TypeSymbol
Inherited from:
Symbol
final def binaryFile(using Context): AbstractFile | Null

The class file from which this class was generated, null if not applicable.

The class file from which this class was generated, null if not applicable.

Inherited from:
Symbol

The tree defining the symbol at pickler time, EmptyTree if none was retained

The tree defining the symbol at pickler time, EmptyTree if none was retained

Inherited from:
Symbol
def defTree_=(tree: Tree)(using Context): Unit

Set defining tree if this symbol retains its definition tree

Set defining tree if this symbol retains its definition tree

Inherited from:
Symbol
final def denot(using Context): SymDenotation

The current denotation of this symbol

The current denotation of this symbol

Inherited from:
Symbol
final def drop()(using Context): Unit

Remove symbol from scope of owning class

Remove symbol from scope of owning class

Inherited from:
Symbol

Remove symbol from scope of owning class after given phase. Create a fresh denotation for its owner class if the class does not already have one that starts being valid after phase.

Remove symbol from scope of owning class after given phase. Create a fresh denotation for its owner class if the class does not already have one that starts being valid after phase.

Inherited from:
Symbol
def endPos(using ctx: Context): SourcePosition
Inherited from:
SrcPos
final def entered(using Context): ClassSymbol

This symbol entered into owner's scope (owner must be a class).

This symbol entered into owner's scope (owner must be a class).

Inherited from:
Symbol

Enter this symbol in its class owner after given phase. Create a fresh denotation for its owner class if the class does not already have one that starts being valid after phase.

Enter this symbol in its class owner after given phase. Create a fresh denotation for its owner class if the class does not already have one that starts being valid after phase.

Inherited from:
Symbol
def fallbackToText(printer: Printer): Text

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

Inherited from:
Showable

If this symbol satisfies predicate p this symbol, otherwise NoSymbol

If this symbol satisfies predicate p this symbol, otherwise NoSymbol

Inherited from:
Symbol
def focus(using ctx: Context): SourcePosition
Inherited from:
SrcPos
override def hashCode(): Int

Calculate a hash code value for the object.

Calculate a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Returns:

the hash code value for this object.

Definition Classes
Symbol -> Any
Inherited from:
Symbol
final def isClass: Boolean
Inherited from:
Symbol

Does this symbol come from a currently compiled source file?

Does this symbol come from a currently compiled source file?

Inherited from:
Symbol

Is this symbol valid in the current run and has an associated file that is not a binary file. e.g. This will return true for symbols defined by the user in a prior run of the REPL, that are still valid.

Is this symbol valid in the current run and has an associated file that is not a binary file. e.g. This will return true for symbols defined by the user in a prior run of the REPL, that are still valid.

Inherited from:
Symbol
final def isPatternBound(using Context): Boolean

Is the symbol a pattern bound symbol?

Is the symbol a pattern bound symbol?

Inherited from:
Symbol
final def isPrivate(using Context): Boolean

Test whether symbol is private. This conservatively returns false if symbol does not yet have a denotation, or denotation is a class that is not yet read.

Test whether symbol is private. This conservatively returns false if symbol does not yet have a denotation, or denotation is a class that is not yet read.

Inherited from:
Symbol
final def isStatic(using Context): Boolean

Special cased here, because it may be used on naked symbols in substituters

Special cased here, because it may be used on naked symbols in substituters

Inherited from:
Symbol
final def isTerm(using Context): Boolean
Inherited from:
Symbol
final def isType(using Context): Boolean
Inherited from:
Symbol

Is this the info of a type parameter? Will return false for symbols that are not type parameters.

Is this the info of a type parameter? Will return false for symbols that are not type parameters.

Inherited from:
Symbol

Is symbol valid in current run?

Is symbol valid in current run?

Inherited from:
Symbol

The last known denotation of this symbol, without going through current

The last known denotation of this symbol, without going through current

Inherited from:
Symbol
def line(using ctx: Context): Int
Inherited from:
SrcPos
final def name(using Context): ThisName

The current name of this symbol

The current name of this symbol

Inherited from:
Symbol
inline def orElse(inline that: Symbol)(using Context): Symbol

This symbol, if it exists, otherwise the result of evaluating that

This symbol, if it exists, otherwise the result of evaluating that

Inherited from:
Symbol

The original denotation of this symbol, without forcing anything

The original denotation of this symbol, without forcing anything

Inherited from:
Symbol
def paramInfo(using Context): Type

The info of the type parameter

The info of the type parameter

Inherited from:
Symbol

The info of the type parameter as seen from a prefix type. For type parameter symbols, this is the memberInfo as seen from prefix. For type lambda parameters, it's the same as paramInfos as asSeenFrom has already been applied to the whole type lambda.

The info of the type parameter as seen from a prefix type. For type parameter symbols, this is the memberInfo as seen from prefix. For type lambda parameters, it's the same as paramInfos as asSeenFrom has already been applied to the whole type lambda.

Inherited from:
Symbol

The parameter bounds, or the completer if the type parameter is an as-yet uncompleted symbol.

The parameter bounds, or the completer if the type parameter is an as-yet uncompleted symbol.

Inherited from:
Symbol

The name of the type parameter

The name of the type parameter

Inherited from:
Symbol

A type that refers to the parameter

A type that refers to the parameter

Inherited from:
Symbol

The variance of the type parameter

The variance of the type parameter

Inherited from:
Symbol
final def paramVarianceSign(using Context): Int

The variance of the type parameter, as a number -1, 0, +1. Bivariant is mapped to 1, i.e. it is treated like Covariant.

The variance of the type parameter, as a number -1, 0, +1. Bivariant is mapped to 1, i.e. it is treated like Covariant.

Inherited from:
ParamInfo

Does this symbol retain its definition tree? A good policy for this needs to balance costs and benefits, where costs are mainly memoty leaks, in particular across runs.

Does this symbol retain its definition tree? A good policy for this needs to balance costs and benefits, where costs are mainly memoty leaks, in particular across runs.

Inherited from:
Symbol
def show(using Context): String

The string representation of this showable element.

The string representation of this showable element.

Inherited from:
Showable
def showDcl(using Context): String
Inherited from:
Symbol
Inherited from:
Symbol
Inherited from:
Symbol
def showIndented(margin: Int)(using Context): String

The string representation with each line after the first one indented by the given given margin (in spaces).

The string representation with each line after the first one indented by the given given margin (in spaces).

Inherited from:
Showable
def showKind(using Context): String
Inherited from:
Symbol
Inherited from:
Symbol
def showName(using Context): String
Inherited from:
Symbol
def showSummary(depth: Int)(using Context): String

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

Inherited from:
Showable
final def signature(using Context): Signature

The symbol's signature if it is completed or a method, NotAMethod otherwise.

The symbol's signature if it is completed or a method, NotAMethod otherwise.

Inherited from:
Symbol
final def source(using Context): SourceFile
Inherited from:
Symbol
final def sourcePos(using Context): SourcePosition
Inherited from:
Symbol
final def sourceSymbol(using Context): Symbol

A symbol related to sym that is defined in source code.

A symbol related to sym that is defined in source code.

See also:

enclosingSourceSymbols

Inherited from:
Symbol
final def span: Span

The position of this symbol, or NoSpan if the symbol was not loaded from source or from TASTY. This is always a zero-extent position.

The position of this symbol, or NoSpan if the symbol was not loaded from source or from TASTY. This is always a zero-extent position.

Inherited from:
Symbol
final def srcPos: SrcPos

This positioned item, widened to SrcPos. Used to make clear we only need the position, typically for error reporting.

This positioned item, widened to SrcPos. Used to make clear we only need the position, typically for error reporting.

Inherited from:
Symbol
Inherited from:
SrcPos
final def symbol(implicit ev: DontUseSymbolOnSymbol): Nothing

A trap to avoid calling x.symbol on something that is already a symbol. This would be expanded to toDenot(x).symbol which is guaraneteed to be the same as x. With the given setup, all such calls will give implicit-not found errors

A trap to avoid calling x.symbol on something that is already a symbol. This would be expanded to toDenot(x).symbol which is guaraneteed to be the same as x. With the given setup, all such calls will give implicit-not found errors

Inherited from:
Symbol
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Returns:

a string representation of the object.

Definition Classes
Symbol -> Any
Inherited from:
Symbol
def toText(printer: Printer): Text

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

Inherited from:
Symbol

Concrete fields