scala.reflect.internal.Symbols

Symbol

abstract class Symbol extends AbsSymbolImpl with HasFlags with SymbolFlagLogic with SymbolCreator with Annotatable[Symbol]

The class for all symbols

Definition Classes
Symbols → Symbols
Source
Symbols.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Symbol
  2. Annotatable
  3. SymbolCreator
  4. SymbolCreatorInterface
  5. SymbolFlagLogic
  6. HasFlags
  7. AbsSymbolImpl
  8. AbsSymbol
  9. AbsSymbolInternal
  10. AnyRef
  11. Any
Implicitly
  1. by any2stringfmt
  2. by any2stringadd
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Symbol(initOwner: Symbol, initPos: Position, initName: Name)

    Attributes
    protected[Symbols]

Type Members

  1. type AccessBoundaryType = Symbol

    Definition Classes
    SymbolHasFlags
  2. type AnnotationType = AnnotationInfo

    Definition Classes
    SymbolHasFlags
  3. abstract type NameType >: Null <: Name

  4. abstract type TypeOfClonedSymbol >: Null <: Symbol { type NameType = Symbol.this.NameType }

Abstract Value Members

  1. abstract def asNameType(n: Name): NameType

  2. abstract def cloneSymbolImpl(owner: Symbol, newFlags: Long): TypeOfClonedSymbol

    Internal method to clone a symbol's implementation with the given flags and no info.

  3. abstract def doCookJavaRawInfo(): Unit

    Attributes
    protected
  4. abstract def existentialBound: Type

    If we quantify existentially over this symbol, the bound of the type variable that stands for it pre: symbol is a term, a class, or an abstract type (no alias type allowed)

  5. abstract def name: NameType

    Definition Classes
    Symbol → AbsSymbol
  6. abstract def name_=(n: Name): Unit

  7. abstract def rawname: NameType

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Symbol to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (Symbol, B)

    Implicit information
    This member is added by an implicit conversion from Symbol to ArrowAssoc[Symbol] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. def abbreviatedKindString: String

    String representation of symbol's kind, suitable for the masses.

    String representation of symbol's kind, suitable for the masses.

    Attributes
    protected[scala]
  9. def accessBoundary(base: Symbol): Symbol

    The class or term up to which this symbol is accessible, or RootClass if it is public.

    The class or term up to which this symbol is accessible, or RootClass if it is public. As java protected statics are otherwise completely inaccessible in scala, they are treated as public.

  10. def accessString: String

    Definition Classes
    HasFlags
  11. final def accessed(ownerTp: Type): Symbol

    The symbol accessed by this accessor function, but with given owner type.

  12. final def accessed: Symbol

    The symbol accessed by this accessor (getter or setter) function.

  13. def accessedOrSelf: Symbol

    If this is an accessor, the accessed symbol.

    If this is an accessor, the accessed symbol. Otherwise, this symbol.

  14. final def accurateKindString: String

    Accurate string representation of symbols' kind, suitable for developers.

  15. def addAnnotation(sym: Symbol, args: Tree*): Symbol.this.type

  16. def addAnnotation(annot: AnnotationInfo): Symbol.this.type

  17. def addChild(sym: Symbol): Unit

  18. def alias: Symbol

    For a paramaccessor: a superclass paramaccessor for which this symbol is an alias, NoSymbol for all others.

  19. final def allOverriddenSymbols: List[Symbol]

    Returns all symbols overriden by this symbol.

  20. def alternatives: List[Symbol]

    Definition Classes
    Symbol → AbsSymbol
  21. def alwaysHasFlags: Long

    Attributes
    protected
    Definition Classes
    SymbolFlagLogic
  22. def ancestors: List[Symbol]

    All directly or indirectly inherited classes.

  23. def annotations: List[AnnotationInfo]

    After the typer phase (before, look at the definition's Modifiers), contains the annotations attached to member a definition (class, method, type, field).

    After the typer phase (before, look at the definition's Modifiers), contains the annotations attached to member a definition (class, method, type, field).

    Definition Classes
    SymbolAnnotatableHasFlags → AbsSymbol
  24. def annotationsString: String

  25. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  26. def asTermSymbol: TermSymbol

  27. def asType: Type

    Definition Classes
    AbsSymbolImpl → AbsSymbolInternal
  28. def asTypeConstructor: Type

    Definition Classes
    AbsSymbolImpl → AbsSymbol
  29. def asTypeIn(site: Type): Type

    Definition Classes
    AbsSymbolImpl → AbsSymbol
  30. def asTypeSymbol: TypeSymbol

    To overcome the crazy challenge of more specific types appearing in incoming positions.

    To overcome the crazy challenge of more specific types appearing in incoming positions. Don't need this much.

  31. def calculateFlagString(basis: Long): String

    Attributes
    protected
    Definition Classes
    HasFlags
  32. final def caseFieldAccessors: List[Symbol]

    For a case class, the symbols of the accessor methods, one for each argument in the first parameter list of the primary constructor.

    For a case class, the symbols of the accessor methods, one for each argument in the first parameter list of the primary constructor. The empty list for all other classes.

  33. final def caseModule: Symbol

    The case module corresponding to this case class

  34. def changeNameInOwners(name: Name): Unit

    Attributes
    protected[this]
  35. def children: Set[Symbol]

    If this is a sealed class, its known direct subclasses.

    If this is a sealed class, its known direct subclasses. Otherwise, the empty set.

  36. def classBound: Type

    The least proper supertype of a class; includes all parent types and refinement where needed.

    The least proper supertype of a class; includes all parent types and refinement where needed. You need to compute that in a situation like this: { class C extends P { ... } new C }

  37. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  38. final def cloneSymbol(newOwner: Symbol, newFlags: Long, newName: Name): TypeOfClonedSymbol

  39. final def cloneSymbol(newOwner: Symbol, newFlags: Long): TypeOfClonedSymbol

  40. final def cloneSymbol(newOwner: Symbol): TypeOfClonedSymbol

    A clone of this symbol, but with given owner.

  41. final def cloneSymbol: TypeOfClonedSymbol

    A clone of this symbol.

  42. def companionClass: Symbol

    For a module: the class with the same name in the same package.

    For a module: the class with the same name in the same package. For all others: NoSymbol Note: does not work for classes owned by methods, see Namers.companionClassOf

    object Foo . companionClass --> class Foo

    !!! linkedClassOfClass depends on companionClass on the module class getting to the class. As presently implemented this potentially returns class for any symbol except NoSymbol.

  43. def companionModule: Symbol

    For a class: the module or case class factory with the same name in the same package.

    For a class: the module or case class factory with the same name in the same package. For all others: NoSymbol Note: does not work for modules owned by methods, see Namers.companionModuleOf

    class Foo . companionModule --> object Foo

  44. def companionSymbol: Symbol

    For a module: its linked class For a plain class: its linked module or case factory.

    For a module: its linked class For a plain class: its linked module or case factory. Note: does not work for modules owned by methods, see Namers.companionSymbolOf

    class Foo <-- companionSymbol --> object Foo

    Definition Classes
    Symbol → AbsSymbol
  45. final def constrParamAccessors: List[Symbol]

  46. final def cookJavaRawInfo(): Unit

    Modify term symbol's type so that a raw type C is converted to an existential C[_]

    Modify term symbol's type so that a raw type C is converted to an existential C[_]

    This is done in checkAccessible and overriding checks in refchecks We can't do this on class loading because it would result in infinite cycles.

  47. def createAbstractTypeSymbol(name: TypeName, pos: Position, newFlags: Long): AbstractTypeSymbol

    Symbol creation implementations.

    Symbol creation implementations.

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  48. def createAliasTypeSymbol(name: TypeName, pos: Position, newFlags: Long): AliasTypeSymbol

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  49. def createClassSymbol(name: TypeName, pos: Position, newFlags: Long): ClassSymbol

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  50. def createImplClassSymbol(name: TypeName, pos: Position, newFlags: Long): ClassSymbol

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  51. def createMethodSymbol(name: TermName, pos: Position, newFlags: Long): MethodSymbol

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  52. def createModuleClassSymbol(name: TypeName, pos: Position, newFlags: Long): ModuleClassSymbol

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  53. def createModuleSymbol(name: TermName, pos: Position, newFlags: Long): ModuleSymbol

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  54. def createPackageClassSymbol(name: TypeName, pos: Position, newFlags: Long): PackageClassSymbol

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  55. def createPackageObjectClassSymbol(pos: Position, newFlags: Long): PackageObjectClassSymbol

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  56. def createPackageSymbol(name: TermName, pos: Position, newFlags: Long): PackageSymbol

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  57. def createRefinementClassSymbol(pos: Position, newFlags: Long): RefinementClassSymbol

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  58. def createTermSymbol(name: TermName, pos: Position, newFlags: Long): TermSymbol

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  59. def createTypeSkolemSymbol(name: TypeName, origin: AnyRef, pos: Position, newFlags: Long): TypeSkolem

    Attributes
    protected
    Definition Classes
    SymbolSymbolCreatorInterface
  60. def createValueMemberSymbol(name: TermName, pos: Position, newFlags: Long): TermSymbol

    Attributes
    protected
  61. def createValueParameterSymbol(name: TermName, pos: Position, newFlags: Long): TermSymbol

    Attributes
    protected
  62. def deSkolemize: Symbol

    If this symbol is a type parameter skolem (not an existential skolem!) its corresponding type parameter, otherwise this

  63. def dealias: Symbol

    Expands type aliases

  64. def debugFlagString: String

    Definition Classes
    SymbolFlagLogic
  65. def debugLocationString: String

  66. def decodedName: String

    The decoded name of the symbol, e.

    The decoded name of the symbol, e.g. == instead of $eq$eq.

  67. def defString: String

    String representation of symbol's definition.

    String representation of symbol's definition. It uses the symbol's raw info to avoid forcing types.

  68. def defStringSeenAs(info: Type): String

    String representation of symbol's definition, using the supplied info rather than the symbol's.

  69. def deprecatedParamName: Option[TermName]

  70. def deprecationMessage: Option[String]

  71. def deprecationVersion: Option[String]

  72. def effectiveOwner: Symbol

    The owner, skipping package objects.

  73. def elisionLevel: Option[Int]

  74. def enclClass: Symbol

    The next enclosing class.

  75. def enclClassChain: List[Symbol]

  76. def enclMethod: Symbol

    The next enclosing method.

  77. def enclosingClass: Symbol

    Definition Classes
    AbsSymbolImpl → AbsSymbol
  78. def enclosingMethod: Symbol

    Definition Classes
    AbsSymbolImpl → AbsSymbol
  79. def enclosingPackage: Symbol

    The package containing this symbol, or NoSymbol if there is not one.

  80. def enclosingPackageClass: Symbol

    The package class containing this symbol, or NoSymbol if there is not one.

    The package class containing this symbol, or NoSymbol if there is not one.

    Definition Classes
    Symbol → AbsSymbol
  81. def enclosingTopLevelClass: Symbol

    The top-level class containing this symbol.

    The top-level class containing this symbol.

    Definition Classes
    Symbol → AbsSymbol
  82. def encodedName: String

    The name of the symbol before decoding, e.

    The name of the symbol before decoding, e.g. $eq$eq instead of ==.

  83. def ensuring(cond: (Symbol) ⇒ Boolean, msg: ⇒ Any): Symbol

    Implicit information
    This member is added by an implicit conversion from Symbol to Ensuring[Symbol] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  84. def ensuring(cond: (Symbol) ⇒ Boolean): Symbol

    Implicit information
    This member is added by an implicit conversion from Symbol to Ensuring[Symbol] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  85. def ensuring(cond: Boolean, msg: ⇒ Any): Symbol

    Implicit information
    This member is added by an implicit conversion from Symbol to Ensuring[Symbol] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  86. def ensuring(cond: Boolean): Symbol

    Implicit information
    This member is added by an implicit conversion from Symbol to Ensuring[Symbol] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  87. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  88. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  89. def existentialToString: String

    String representation of existentially bound variable

  90. def exists: Boolean

  91. def expandName(base: Symbol): Unit

    change name by appending $$<fully-qualified-name-of-class base> Do the same for any accessed symbols or setters/getters.

    change name by appending $$<fully-qualified-name-of-class base> Do the same for any accessed symbols or setters/getters. Implementation in TermSymbol.

  92. final def extendedOverriddenSymbols: List[Symbol]

    Returns all symbols overridden by this symbol, plus all matching symbols defined in parents of the selftype.

  93. def filter(cond: (Symbol) ⇒ Boolean): Symbol

    Definition Classes
    Symbol → AbsSymbol
  94. def filterAnnotations(p: (AnnotationInfo) ⇒ Boolean): Symbol.this.type

    Definition Classes
    SymbolAnnotatable
  95. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  96. def firstParam: Symbol

    The first parameter to the first argument list of this method, or NoSymbol if inapplicable.

  97. def firstParamAccessor: Symbol

    Return the accessor method of the first parameter of this class.

    Return the accessor method of the first parameter of this class. or NoSymbol if it does not exist.

  98. def flagBitsToString(bits: Long): String

    Definition Classes
    HasFlags
  99. def flagMask: Long

    Definition Classes
    SymbolFlagLogic
  100. def flagString(mask: Long): String

    Definition Classes
    HasFlags
  101. def flagString: String

    The printable representation of this entity's flags and access boundary, restricted to flags in the given mask.

    The printable representation of this entity's flags and access boundary, restricted to flags in the given mask.

    Definition Classes
    HasFlags
  102. final def flags: Long

    Though both Symbol and Modifiers widen this method to public, it's defined protected here to give us the option in the future to route flag methods through accessors and disallow raw flag manipulation.

    Though both Symbol and Modifiers widen this method to public, it's defined protected here to give us the option in the future to route flag methods through accessors and disallow raw flag manipulation. And after that, perhaps, on some magical day: a typesafe enumeration.

    Definition Classes
    SymbolHasFlags
  103. def flagsExplanationString: String

    Definition Classes
    SymbolFlagLogic
  104. def flags_=(fs: Long): Unit

  105. final def flatOwnerInfo: Type

    Returns the rawInfo of the owner.

    Returns the rawInfo of the owner. If the current phase has flat classes, it first applies all pending type maps to this symbol.

    assume this is the ModuleSymbol for B in the following definition: package p { class A { object B { val x = 1 } } }

    The owner after flatten is "package p" (see "def owner"). The flatten type map enters symbol B in the decls of p. So to find a linked symbol ("object B" or "class B") we need to apply flatten to B first. Fixes #2470.

    Attributes
    protected
  106. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Symbol to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  107. final def freshExistential(suffix: String): TypeSymbol

  108. def fullLocationString: String

  109. final def fullName: String

    The encoded full path name of this symbol, where outer names and inner names are separated by periods.

    The encoded full path name of this symbol, where outer names and inner names are separated by periods.

    Definition Classes
    Symbol → AbsSymbol
  110. final def fullName(separator: Char): String

    The encoded full path name of this symbol, where outer names and inner names are separated by separator characters.

    The encoded full path name of this symbol, where outer names and inner names are separated by separator characters. Never translates expansions of operators back to operator symbol. Never adds id. Drops package objects.

  111. def fullNameAsName(separator: Char): Name

  112. def fullNameString: String

  113. def getAnnotation(cls: Symbol): Option[AnnotationInfo]

    Definition Classes
    Annotatable
  114. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  115. final def getFlag(mask: Long): Long

    Definition Classes
    SymbolSymbolFlagLogic
    Annotations
    @inline()
  116. final def getter(base: Symbol): Symbol

    The getter of this value or setter definition in class base, or NoSymbol if none exists.

  117. def getterName: TermName

  118. def hasAbstractFlag: Boolean

    Definition Classes
    HasFlags
  119. final def hasAccessBoundary: Boolean

    Does symbol have a private or protected qualifier set?

    Does symbol have a private or protected qualifier set?

    Definition Classes
    SymbolHasFlags
  120. def hasAccessorFlag: Boolean

    Definition Classes
    HasFlags
  121. final def hasAllFlags(mask: Long): Boolean

    Does symbol have ALL the flags in mask set?

    Does symbol have ALL the flags in mask set?

    Definition Classes
    SymbolSymbolFlagLogicHasFlags
    Annotations
    @inline()
  122. def hasAnnotation(cls: Symbol): Boolean

    Test for, get, or remove an annotation

    Test for, get, or remove an annotation

    Definition Classes
    Annotatable
  123. def hasBridgeAnnotation: Boolean

  124. def hasCompleteInfo: Boolean

  125. def hasContravariantFlag: Boolean

    Definition Classes
    HasFlags
  126. def hasDefault: Boolean

    Definition Classes
    SymbolHasFlags
  127. final def hasFlag(mask: Long): Boolean

    Does symbol have ANY flag in mask set?

    Does symbol have ANY flag in mask set?

    Definition Classes
    SymbolSymbolFlagLogicHasFlags
    Annotations
    @inline()
  128. final def hasGetter: Boolean

  129. def hasInConstructorFlag: Boolean

    Definition Classes
    HasFlags
  130. def hasLocalFlag: Boolean

    Definition Classes
    HasFlags
  131. def hasMeaninglessName: Boolean

    If the name of the symbol's owner should be used when you care about seeing an interesting name: in such cases this symbol is e.

    If the name of the symbol's owner should be used when you care about seeing an interesting name: in such cases this symbol is e.g. a method parameter with a synthetic name, a constructor named "this", an object "package", etc. The kind string, if non-empty, will be phrased relative to the name of the owner.

  132. def hasMigrationAnnotation: Boolean

  133. def hasModifier(mod: Modifier): Boolean

    !!! The logic after "hasFlag" is far too opaque to be unexplained.

    !!! The logic after "hasFlag" is far too opaque to be unexplained. I'm guessing it's attempting to compensate for flag overloading, and embedding such logic in an undocumented island like this is a notarized guarantee of future breakage.

    Definition Classes
    Symbol → AbsSymbol
  134. def hasModuleFlag: Boolean

    Definition Classes
    HasFlags
  135. def hasNoFlags(mask: Long): Boolean

    Whether this entity has NONE of the flags in the given mask.

    Whether this entity has NONE of the flags in the given mask.

    Definition Classes
    HasFlags
  136. def hasPackageFlag: Boolean

    Definition Classes
    HasFlags
  137. def hasParamWhich(cond: (Symbol) ⇒ Boolean): Boolean

  138. def hasRawInfo: Boolean

  139. def hasStableFlag: Boolean

    Definition Classes
    HasFlags
  140. def hasStaticFlag: Boolean

    Definition Classes
    HasFlags
  141. def hasTransOwner(sym: Symbol): Boolean

    Same as ownerChain contains sym but more efficient, and with a twist for refinement classes (see RefinementClassSymbol.

    Same as ownerChain contains sym but more efficient, and with a twist for refinement classes (see RefinementClassSymbol.)

  142. final def hasTypeAt(pid: Int): Boolean

    Was symbol's type updated during given phase?

  143. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  144. val id: Int

    Definition Classes
    Symbol → AbsSymbol
  145. final def idString: String

    If settings.

    If settings.uniqid is set, the symbol's id, else ""

  146. final def implClass: Symbol

    The implementation class of a trait.

    The implementation class of a trait. If available it will be the symbol with the same owner, and the name of this symbol with $class appended to it.

  147. def implicitNotFoundMsg: Option[String]

  148. def info: Type

    Get type info associated with symbol at current phase, after ensuring that symbol is initialized (i.

    Get type info associated with symbol at current phase, after ensuring that symbol is initialized (i.e. type is completed).

  149. final def infoString(tp: Type): String

    String representation of symbol's definition following its name

  150. def info_=(info: Type): Unit

  151. def infosString: String

  152. def initFlags(mask: Long): Symbol.this.type

    Set the symbol's flags to the given value, asserting that the previous value was 0.

    Set the symbol's flags to the given value, asserting that the previous value was 0.

    Definition Classes
    SymbolSymbolFlagLogic
  153. final def initialize: Symbol.this.type

    Initialize the symbol

  154. def isAbstractClass: Boolean

    These are all tests for varieties of ClassSymbol, which has these subclasses:

    These are all tests for varieties of ClassSymbol, which has these subclasses:

    • ModuleClassSymbol
    • RefinementClassSymbol
    • PackageClassSymbol (extends ModuleClassSymbol)
  155. def isAbstractOverride: Boolean

    Definition Classes
    HasFlags
  156. def isAbstractType: Boolean

    Definition Classes
    Symbol → AbsSymbol
  157. def isAccessor: Boolean

    Qualities of Terms, always false for TypeSymbols.

  158. def isAliasType: Boolean

    Definition Classes
    Symbol → AbsSymbol
  159. def isAnonOrRefinementClass: Boolean

  160. def isAnonymousClass: Boolean

  161. final def isAnonymousFunction: Boolean

  162. def isAnyOverride: Boolean

    Definition Classes
    HasFlags
  163. final def isAuxiliaryConstructor: Boolean

    Does this symbol denote an auxiliary constructor of its enclosing class?

  164. def isBottomClass: Boolean

    The bottom classes are Nothing and Null, found in Definitions.

  165. def isBridge: Boolean

  166. def isCapturedVariable: Boolean

  167. def isCase: Boolean

    Definition Classes
    HasFlags
  168. def isCaseAccessor: Boolean

    Definition Classes
    HasFlags
  169. def isCaseAccessorMethod: Boolean

    Qualities of MethodSymbols, always false for TypeSymbols and other TermSymbols.

  170. final def isCaseApplyOrUnapply: Boolean

    Is this symbol a synthetic apply or unapply method in a companion object of a case class?

  171. def isCaseClass: Boolean

  172. def isClass: Boolean

    TypeSymbols fall into four named direct subclasses:

    TypeSymbols fall into four named direct subclasses:

    • ClassSymbol
    • AliasTypeSymbol
    • AbstractTypeSymbol
    • TypeSkolem
    Definition Classes
    Symbol → AbsSymbol
  173. def isClassConstructor: Boolean

  174. def isClassLocalToConstructor: Boolean

  175. def isClearing(f: Long, mask: Long): Boolean

    Attributes
    protected
    Definition Classes
    HasFlags
  176. def isCoDefinedWith(that: Symbol): Boolean

    Is this symbol defined in the same scope and compilation unit as that symbol?

  177. def isConcreteClass: Boolean

  178. final def isConstant: Boolean

    Is this symbol a constant?

  179. def isConstructor: Boolean

  180. def isContravariant: Boolean

    Qualities of Types, always false for TermSymbols.

    Qualities of Types, always false for TermSymbols.

    Definition Classes
    Symbol → AbsSymbol
  181. def isCovariant: Boolean

    Definition Classes
    Symbol → AbsSymbol
  182. def isDeferred: Boolean

    Definition Classes
    HasFlags
  183. final def isDefinedInPackage: Boolean

  184. def isDeprecated: Boolean

  185. final def isDerivedValueClass: Boolean

    Definition Classes
    Symbol → AbsSymbol
  186. def isEarlyInitialized: Boolean

  187. def isEffectiveRoot: Boolean

    Is this symbol an effective root for fullname string?

  188. final def isEffectivelyFinal: Boolean

    Is this symbol effectively final? I.

    Is this symbol effectively final? I.e, it cannot be overridden

  189. def isEmptyPackage: Boolean

  190. def isEmptyPackageClass: Boolean

  191. def isEmptyPrefix: Boolean

  192. final def isErroneous: Boolean

    Definition Classes
    Symbol → AbsSymbol
  193. final def isError: Boolean

  194. def isExistential: Boolean

    Definition Classes
    AbsSymbolImpl → AbsSymbol
  195. def isExistentialQuantified: Boolean

  196. def isExistentialSkolem: Boolean

  197. def isExistentiallyBound: Boolean

  198. def isFBounded: Boolean

  199. def isFinal: Boolean

    Definition Classes
    HasFlags
  200. def isFreeTerm: Boolean

    Definition Classes
    Symbol → AbsSymbol
  201. def isFreeType: Boolean

    Definition Classes
    Symbol → AbsSymbolInternal
  202. def isGADTSkolem: Boolean

  203. def isGetter: Boolean

  204. def isHigherOrderTypeParameter: Boolean

  205. def isImplClass: Boolean

  206. final def isImplOnly: Boolean

    Is this a symbol which exists only in the implementation class, not in its trait?

  207. def isImplicit: Boolean

    Definition Classes
    HasFlags
  208. def isInDefaultNamespace: Boolean

  209. final def isIncompleteIn(base: Symbol): Boolean

    A a member of class base is incomplete if (1) it is declared deferred or (2) it is abstract override and its super symbol in base is nonexistent or incomplete.

    A a member of class base is incomplete if (1) it is declared deferred or (2) it is abstract override and its super symbol in base is nonexistent or incomplete.

    base

    ...

    returns

    ...

  210. final def isInitialized: Boolean

  211. final def isInitializedToDefault: Boolean

  212. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  213. def isInterface: Boolean

    Definition Classes
    HasFlags
  214. final def isInterpreterWrapper: Boolean

    Does this symbol denote a wrapper created by the repl?

  215. def isJavaDefined: Boolean

    Definition Classes
    HasFlags
  216. def isJavaInterface: Boolean

  217. def isLabel: Boolean

    Definition Classes
    SymbolHasFlags
  218. def isLazy: Boolean

    Definition Classes
    HasFlags
  219. final def isLazyAccessor: Boolean

  220. final def isLess(that: Symbol): Boolean

    A total ordering between symbols that refines the class inheritance graph (i.

    A total ordering between symbols that refines the class inheritance graph (i.e. subclass.isLess(superclass) always holds). the ordering is given by: (_.isType, -_.baseTypeSeq.length) for type symbols, followed by id.

  221. def isLessAccessibleThan(other: Symbol): Boolean

  222. def isLifted: Boolean

    Definition Classes
    HasFlags
  223. def isLiftedMethod: Boolean

  224. final def isLocal: Boolean

    Is this symbol locally defined? I.

    Is this symbol locally defined? I.e. not accessed from outside this instance

  225. def isLocalClass: Boolean

    Is this class locally defined? A class is local, if

    Is this class locally defined? A class is local, if

    • it is anonymous, or
    • its owner is a value
    • it is defined within a local class
  226. def isLocalDummy: Boolean

  227. final def isLocatable: Boolean

    Determines whether this symbol can be loaded by subsequent reflective compilation

  228. def isMemberOf(clazz: Symbol): Boolean

    Is this symbol a member of class clazz?

  229. def isMethod: Boolean

    Definition Classes
    Symbol → AbsSymbol
  230. final def isMethodWithExtension: Boolean

  231. def isMixinConstructor: Boolean

  232. def isModule: Boolean

  233. def isModuleClass: Boolean

  234. def isModuleOrModuleClass: Boolean

  235. final def isModuleVar: Boolean

  236. final def isMonomorphicType: Boolean

    Is symbol a monomorphic type? assumption: if a type starts out as monomorphic, it will not acquire type parameters in later phases.

  237. def isMutable: Boolean

    Definition Classes
    HasFlags
  238. def isNestedClass: Boolean

    Is this class nested in another class or module (not a package)?

  239. final def isNestedIn(that: Symbol): Boolean

    A partial ordering between symbols.

    A partial ordering between symbols. (this isNestedIn that) holds iff this symbol is defined within a class or method defining that symbol

  240. def isNonBottomSubClass(that: Symbol): Boolean

    Is this class symbol a subclass of that symbol, and is this class symbol also different from Null or Nothing?

  241. def isNonClassType: Boolean

    A Type, but not a Class.

  242. final def isNumericSubClass(that: Symbol): Boolean

  243. def isNumericValueClass: Boolean

  244. final def isOmittablePrefix: Boolean

    Conditions where we omit the prefix when printing a symbol, to avoid unpleasantries like Predef.

    Conditions where we omit the prefix when printing a symbol, to avoid unpleasantries like Predef.String, $iw.$iw.Foo and <empty>.Bippy.

  245. def isOnlyRefinementMember: Boolean

    Is this a term symbol only defined in a refinement (so that it needs to be accessed by reflection)?

  246. final def isOuterAccessor: Boolean

    Is this symbol an accessor method for outer?

  247. final def isOuterField: Boolean

    Is this symbol an accessor method for outer?

  248. def isOverloaded: Boolean

    Definition Classes
    Symbol → AbsSymbol
  249. final def isOverridableMember: Boolean

  250. def isOverride: Boolean

    Definition Classes
    HasFlags
  251. def isOverridingSymbol: Boolean

    Equivalent to allOverriddenSymbols.

    Equivalent to allOverriddenSymbols.nonEmpty, but more efficient.

  252. def isPackage: Boolean

    Package/package object tests

    Package/package object tests

    Definition Classes
    Symbol → AbsSymbol
  253. def isPackageClass: Boolean

    Definition Classes
    Symbol → AbsSymbol
  254. def isPackageObject: Boolean

  255. def isPackageObjectClass: Boolean

  256. def isPackageObjectOrClass: Boolean

  257. def isParamAccessor: Boolean

    Definition Classes
    HasFlags
  258. final def isPossibleInRefinement: Boolean

  259. final def isPrimaryConstructor: Boolean

    Does this symbol denote the primary constructor of its enclosing class?

  260. def isPrimitiveValueClass: Boolean

    Definition Classes
    Symbol → AbsSymbol
  261. def isPrivate: Boolean

    Definition Classes
    HasFlags
  262. def isPrivateLocal: Boolean

    Definition Classes
    HasFlags
  263. def isProtected: Boolean

    Definition Classes
    HasFlags
  264. def isProtectedLocal: Boolean

    Definition Classes
    HasFlags
  265. def isPublic: Boolean

    Definition Classes
    HasFlags
  266. def isRefinementClass: Boolean

  267. def isRoot: Boolean

    Overridden in custom objects in Definitions

  268. def isRootPackage: Boolean

  269. def isRootSymbol: Boolean

  270. def isSealed: Boolean

    Definition Classes
    HasFlags
  271. def isSerializable: Boolean

  272. def isSetter: Boolean

  273. def isSetterParameter: Boolean

  274. def isSetting(f: Long, mask: Long): Boolean

    Attributes
    protected
    Definition Classes
    HasFlags
  275. def isSingletonExistential: Boolean

  276. def isSkolem: Boolean

    Definition Classes
    Symbol → AbsSymbolInternal
  277. def isSourceMethod: Boolean

  278. def isSpecialized: Boolean

  279. def isStable: Boolean

    Does this symbol denote a stable value?

  280. def isStableClass: Boolean

  281. def isStatic: Boolean

    Is this symbol static (i.

    Is this symbol static (i.e. with no outer instance)? Q: When exactly is a sym marked as STATIC? A: If it's a member of a toplevel object, or of an object contained in a toplevel object, or any number of levels deep. http://groups.google.com/group/scala-internals/browse_thread/thread/d385bcd60b08faf6

  282. final def isStaticConstructor: Boolean

    Is this symbol a static constructor?

  283. final def isStaticMember: Boolean

    Is this symbol a static member of its class? (i.

    Is this symbol a static member of its class? (i.e. needs to be implemented as a Java static?)

  284. final def isStaticModule: Boolean

  285. final def isStaticOwner: Boolean

    Does this symbol denote a class that defines static symbols?

  286. def isStrictFP: Boolean

  287. final def isStructuralRefinement: Boolean

    Is this class or type defined as a structural refinement type?

  288. final def isStructuralRefinementMember: Boolean

  289. def isSubClass(that: Symbol): Boolean

    Overridden in NullClass and NothingClass for custom behavior.

  290. def isSuperAccessor: Boolean

    Definition Classes
    HasFlags
  291. def isSynthetic: Boolean

    Definition Classes
    HasFlags
  292. def isTerm: Boolean

    All symbols are one of three categories: TermSymbol, TypeSymbol, or NoSymbol.

    All symbols are one of three categories: TermSymbol, TypeSymbol, or NoSymbol. There is only one NoSymbol.

    Definition Classes
    Symbol → AbsSymbol
  293. def isTermMacro: Boolean

  294. final def isThisSym: Boolean

  295. def isTopLevelModule: Boolean

  296. def isTrait: Boolean

    Definition Classes
    SymbolHasFlags
  297. def isType: Boolean

    Definition Classes
    Symbol → AbsSymbol
  298. def isTypeMacro: Boolean

  299. def isTypeParameter: Boolean

  300. def isTypeParameterOrSkolem: Boolean

  301. def isTypeSkolem: Boolean

  302. final def isUpdatedAt(pid: Int): Boolean

    Was symbol's type updated during given phase?

  303. def isValue: Boolean

  304. def isValueParameter: Boolean

  305. def isVarargsMethod: Boolean

  306. def isVariable: Boolean

  307. final def isWeakSubClass(that: Symbol): Boolean

  308. def javaBinaryName: Name

  309. def javaClassName: String

  310. def javaSimpleName: Name

    These should be moved somewhere like JavaPlatform.

  311. final def keyString: String

    String representation of symbol's definition key word

  312. def kind: String

    Definition Classes
    AbsSymbolImpl → AbsSymbolInternal
  313. final def kindString: String

  314. def lazyAccessor: Symbol

    For a lazy value, its lazy accessor.

    For a lazy value, its lazy accessor. NoSymbol for all others.

  315. def lazyAccessorOrSelf: Symbol

    If this is a lazy value, the lazy accessor; otherwise this symbol.

  316. def linkedClassOfClass: Symbol

    For a module class: its linked class For a plain class: the module class of its linked module.

    For a module class: its linked class For a plain class: the module class of its linked module.

    class Foo <-- linkedClassOfClass --> class Foo$

  317. def locationString: String

    String representation of location, plus a preposition.

    String representation of location, plus a preposition. Doesn't do much, for backward compatibility reasons.

  318. def logicallyEnclosingMember: Symbol

    The method or class which logically encloses the current symbol.

    The method or class which logically encloses the current symbol. If the symbol is defined in the initialization part of a template this is the template's primary constructor, otherwise it is the physically enclosing method or class.

    Example 1:

    def f() { val x = { def g() = ...; g() } }

    In this case the owner chain of g is x, followed by f and g.logicallyEnclosingMember == f.

    Example 2:

    class C { def <init> = { ... } val x = { def g() = ...; g() } } }

    In this case the owner chain of g is x, followed by C but g.logicallyEnclosingMember is the primary constructor symbol <init> (or, for traits: $init) of C.

  319. final def makeNotPrivate(base: Symbol): Unit

    Remove private modifier from symbol syms definition.

    Remove private modifier from symbol syms definition. If sym is a is not a constructor nor a static module rename it by expanding its name to avoid name clashes

    base

    the fully qualified name of this class will be appended if name expansion is needed

  320. def makePublic: Symbol

    Remove any access boundary and clear flags PROTECTED | PRIVATE.

  321. def makeSerializable(): Unit

    Adds the interface scala.

    Adds the interface scala.Serializable to the parents of a ClassInfoType. Note that the tree also has to be updated accordingly.

  322. final def matchingSymbol(site: Type, admit: Long = 0L): Symbol

    The non-private member of site whose type and name match the type of this symbol.

  323. final def matchingSymbol(ofclazz: Symbol, site: Type): Symbol

    The non-private symbol whose type matches the type of this symbol in in given class.

    The non-private symbol whose type matches the type of this symbol in in given class.

    ofclazz

    The class containing the symbol's definition

    site

    The base type from which member types are computed

  324. def migrationMessage: Option[String]

  325. def migrationVersion: Option[String]

  326. def mixinClasses: List[Symbol]

    The directly or indirectly inherited mixins of this class except for mixin classes inherited by the superclass.

    The directly or indirectly inherited mixins of this class except for mixin classes inherited by the superclass. Mixin classes appear in linearization order.

  327. def modifiers: Set[Modifier]

    Definition Classes
    Symbol → AbsSymbol
  328. def modifyInfo(f: (Type) ⇒ Type): Symbol.this.type

    Modifies this symbol's info in place.

  329. def moduleClass: Symbol

    The module class corresponding to this module.

    The module class corresponding to this module.

    Definition Classes
    Symbol → AbsSymbol
  330. def moduleSuffix: String

  331. def nameString: String

    String representation of symbol's simple name.

    String representation of symbol's simple name. If !settings.debug translates expansions of operators back to operator symbol. E.g. $eq => =. If settings.uniqid, adds id. If settings.Yshowsymkinds, adds abbreviated symbol kind.

  332. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  333. final def needsFlatClasses: Boolean

  334. final def needsImplClass: Boolean

    Is this symbol a trait which needs an implementation class?

  335. def needsModuleSuffix: Boolean

    Whether this symbol needs nme.

    Whether this symbol needs nme.MODULE_SUFFIX_STRING (aka $) appended on the java platform.

  336. def neverHasFlags: Long

    Attributes
    protected
    Definition Classes
    SymbolFlagLogic
  337. final def newAbstractType(name: TypeName, pos: Position = NoPosition, newFlags: Long = 0L): AbstractTypeSymbol

    Symbol of an abstract type type T >: .

    Symbol of an abstract type type T >: ... <: ...

  338. final def newAliasType(name: TypeName, pos: Position = NoPosition, newFlags: Long = 0L): AliasTypeSymbol

    Symbol of a type definition type T = .

    Symbol of a type definition type T = ...

  339. final def newAnonymousFunctionClass(pos: Position = NoPosition, newFlags: Long = 0L): ClassSymbol

  340. final def newAnonymousFunctionValue(pos: Position, newFlags: Long = 0L): TermSymbol

  341. final def newClass(name: TypeName, pos: Position = NoPosition, newFlags: Long = 0L): ClassSymbol

  342. def newClassConstructor(pos: Position): MethodSymbol

    Instance constructor with info set.

  343. final def newClassSymbol(name: TypeName, pos: Position = NoPosition, newFlags: Long = 0L): ClassSymbol

    Definition Classes
    SymbolCreator
  344. def newClassWithInfo(name: TypeName, parents: List[Type], scope: Scope, pos: Position = NoPosition, newFlags: Long = 0L): ClassSymbol

    A new class with its info set to a ClassInfoType with given scope and parents.

  345. final def newConstructor(pos: Position, newFlags: Long = 0L): MethodSymbol

    Propagates ConstrFlags (JAVA, specifically) from owner to constructor.

  346. final def newErrorClass(name: TypeName): ClassSymbol

  347. final def newErrorSymbol(name: Name): Symbol

  348. final def newErrorValue(name: TermName): TermSymbol

  349. final def newExistential(name: TypeName, pos: Position = NoPosition, newFlags: Long = 0L): TypeSymbol

    Symbol of an existential type T forSome { .

    Symbol of an existential type T forSome { ... }

  350. def newExistentialSkolem(basis: Symbol, origin: AnyRef): TypeSkolem

    Create a new existential type skolem with this symbol its owner, based on the given symbol and origin.

  351. def newGADTSkolem(name: TypeName, origin: Symbol, info: Type): TypeSkolem

  352. final def newGetter: MethodSymbol

    Create a new getter for current symbol (which must be a field)

  353. def newImplClass(name: TypeName, pos: Position = NoPosition, newFlags: Long = 0L): ClassSymbol

  354. final def newImport(pos: Position): TermSymbol

  355. final def newLabel(name: TermName, pos: Position = NoPosition): MethodSymbol

  356. def newLinkedModule(clazz: Symbol, newFlags: Long = 0L): ModuleSymbol

  357. final def newLocalDummy(pos: Position): TermSymbol

    Create local dummy for template (owner of local blocks)

  358. final def newMethod(name: TermName, pos: Position = NoPosition, newFlags: Long = 0L): MethodSymbol

  359. final def newModule(name: TermName, pos: Position = NoPosition, newFlags: Long = 0L): ModuleSymbol

  360. final def newModuleClass(name: TypeName, pos: Position = NoPosition, newFlags: Long = 0L): ModuleClassSymbol

  361. final def newModuleClassSymbol(name: TypeName, pos: Position = NoPosition, newFlags: Long = 0L): ModuleClassSymbol

  362. final def newModuleSymbol(name: TermName, pos: Position = NoPosition, newFlags: Long = 0L): ModuleSymbol

  363. def newNestedSymbol(name: Name, pos: Position, newFlags: Long, isClass: Boolean): Symbol

    Definition Classes
    AbsSymbolImpl → AbsSymbolInternal
  364. final def newNonClassSymbol(name: TypeName, pos: Position = NoPosition, newFlags: Long = 0L): TypeSymbol

    Definition Classes
    SymbolCreator
  365. final def newOverloaded(pre: Type, alternatives: List[Symbol]): TermSymbol

    pre

    type relative to which alternatives are seen. for instance: class C[T] { def m(x: T): T def m'(): T } val v: C[Int]

    Then v.m has symbol TermSymbol(flags = {OVERLOADED}, tpe = OverloadedType(C[Int], List(m, m'))) You recover the type of m doing a

    m.tpe.asSeenFrom(pre, C) (generally, owner of m, which is C here).

    or:

    pre.memberType(m)

  366. final def newPackage(name: TermName, pos: Position = NoPosition, newFlags: Long = 0L): ModuleSymbol

  367. final def newRefinementClass(pos: Position): RefinementClassSymbol

    Refinement types P { val x: String; type T <: Number } also have symbols, they are refinementClasses

  368. def newStaticConstructor(pos: Position): MethodSymbol

    Static constructor with info set.

  369. def newSyntheticTypeParam(name: String, newFlags: Long): TypeSymbol

  370. def newSyntheticTypeParam(): TypeSymbol

  371. def newSyntheticTypeParams(num: Int): List[TypeSymbol]

  372. final def newSyntheticValueParam(argtype: Type): Symbol

    Synthetic value parameter when parameter symbol is not available.

    Synthetic value parameter when parameter symbol is not available. Calling this method multiple times will re-use the same parameter name.

  373. final def newSyntheticValueParams(argtypes: List[Type]): List[TermSymbol]

    Synthetic value parameters when parameter symbols are not available.

    Synthetic value parameters when parameter symbols are not available. Calling this method multiple times will re-use the same parameter names.

  374. final def newSyntheticValueParamss(argtypess: List[List[Type]]): List[List[TermSymbol]]

    Synthetic value parameters when parameter symbols are not available

  375. final def newTermSymbol(name: TermName, pos: Position = NoPosition, newFlags: Long = 0L): TermSymbol

    * Predictable symbol creation.

    * Predictable symbol creation.

    newTermSymbol, newClassSymbol, and newNonClassSymbol all create symbols based only on the flags (for reconstruction after reification.) It would be nice to combine the last two into newTypeSymbol, but this requires some flag which allows us to distinguish classes and type aliases, which as yet does not exist.

    The fundamental flags used to determine which Symbol subclass to instantiate are: METHOD, PACKAGE, MODULE, PARAM, DEFERRED.

    Definition Classes
    SymbolCreator
  376. final def newThisSym(name: TermName = nme.this_, pos: Position = NoPosition): TermSymbol

  377. final def newTypeParameter(name: TypeName, pos: Position = NoPosition, newFlags: Long = 0L): TypeSymbol

    Symbol of a type parameter

  378. final def newTypeSkolem: TypeSkolem

    Type skolems are type parameters seen from the inside Assuming a polymorphic method m[T], its type is a PolyType which has a TypeParameter with name T in its typeParams list.

    Type skolems are type parameters seen from the inside Assuming a polymorphic method m[T], its type is a PolyType which has a TypeParameter with name T in its typeParams list. While type checking the parameters, result type and body of the method, there's a local copy of T which is a TypeSkolem.

  379. final def newTypeSkolemSymbol(name: TypeName, origin: AnyRef, pos: Position = NoPosition, newFlags: Long = 0L): TypeSkolem

  380. def newTypeSymbol(name: TypeName, pos: Position = NoPosition, newFlags: Long = 0L): TypeSymbol

    Definition Classes
    SymbolCreator
  381. final def newValue(name: TermName, pos: Position = NoPosition, newFlags: Long = 0L): TermSymbol

  382. final def newValueParameter(name: TermName, pos: Position = NoPosition, newFlags: Long = 0L): TermSymbol

  383. final def newVariable(name: TermName, pos: Position = NoPosition, newFlags: Long = 0L): TermSymbol

  384. def nextOverriddenSymbol: Symbol

    Equivalent to allOverriddenSymbols.

    Equivalent to allOverriddenSymbols.head (or NoSymbol if no overrides) but more efficient.

  385. final def notify(): Unit

    Definition Classes
    AnyRef
  386. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  387. final def orElse[T](alt: ⇒ Symbol): Symbol

    Definition Classes
    Symbol → AbsSymbol
    Annotations
    @inline()
  388. def originalEnclosingMethod: Symbol

    Return the original enclosing method of this symbol.

    Return the original enclosing method of this symbol. It should return the same thing as enclMethod when called before lambda lift, but it preserves the original nesting when called afterwards.

    Note

    This method is NOT available in the presentation compiler run. The originalOwner map is not populated for memory considerations (the symbol may hang on to lazy types and in turn to whole (outdated) compilation units.

  389. def originalInfo: Type

  390. def originalName: Name

    If this symbol has an expanded name, its original name, otherwise its name itself.

    If this symbol has an expanded name, its original name, otherwise its name itself.

    See also

    expandName

  391. def originalOwnerChain: List[Symbol]

  392. final def outerClass: Symbol

    The class that is logically an outer class of given clazz.

    The class that is logically an outer class of given clazz. This is the enclosing class, except for classes defined locally to constructors, where it is the outer class of the enclosing class.

  393. def outerSource: Symbol

    For an outer accessor: The class from which the outer originates.

    For an outer accessor: The class from which the outer originates. For all other symbols: NoSymbol

  394. final def overriddenSymbol(ofclazz: Symbol): Symbol

    The symbol, in class ofclazz, that is overridden by this symbol.

    The symbol, in class ofclazz, that is overridden by this symbol.

    ofclazz

    is a base class of this symbol's owner.

  395. final def overridingSymbol(ofclazz: Symbol): Symbol

    The symbol overriding this symbol in given subclass ofclazz.

    The symbol overriding this symbol in given subclass ofclazz.

    ofclazz

    is a subclass of this symbol's owner

  396. def owner: Symbol

    Definition Classes
    Symbol → AbsSymbol
  397. def ownerChain: List[Symbol]

  398. def ownerOfNewSymbols: Symbol

    For RootClass, this is EmptyPackageClass.

    For RootClass, this is EmptyPackageClass. For all other symbols, the symbol itself.

  399. def owner_=(owner: Symbol): Unit

  400. def ownersIterator: Iterator[Symbol]

  401. def ownsString: String

    String representation of location.

  402. def paramPos: Int

    The sequence number of this parameter symbol among all type and value parameters of symbol's owner.

    The sequence number of this parameter symbol among all type and value parameters of symbol's owner. -1 if symbol does not appear among the parameters of its owner.

  403. def paramss: List[List[Symbol]]

    The value parameter sections of this symbol.

  404. def parentSymbols: List[Symbol]

  405. def pos: Position

    Definition Classes
    Symbol → AbsSymbol
  406. def primaryConstructor: Symbol

    The primary constructor of a class.

  407. def privateWithin: Symbol

    Access level encoding: there are three scala flags (PRIVATE, PROTECTED, and LOCAL) which combine with value privateWithin (the "foo" in private[foo]) to define from where an entity can be accessed.

    Access level encoding: there are three scala flags (PRIVATE, PROTECTED, and LOCAL) which combine with value privateWithin (the "foo" in private[foo]) to define from where an entity can be accessed. The meanings are as follows:

    PRIVATE access restricted to class only. PROTECTED access restricted to class and subclasses only. LOCAL can only be set in conjunction with PRIVATE or PROTECTED. Further restricts access to the same object instance.

    In addition, privateWithin can be used to set a visibility barrier. When set, everything contained in the named enclosing package or class has access. It is incompatible with PRIVATE or LOCAL, but is additive with PROTECTED (i.e. if either the flags or privateWithin allow access, then it is allowed.)

    The java access levels translate as follows:

    java private: hasFlag(PRIVATE) && !hasAccessBoundary java package: !hasFlag(PRIVATE | PROTECTED) && (privateWithin == enclosing package) java protected: hasFlag(PROTECTED) && (privateWithin == enclosing package) java public: !hasFlag(PRIVATE | PROTECTED) && !hasAccessBoundary

    Definition Classes
    SymbolHasFlags → AbsSymbol
  408. def privateWithinString: String

    Definition Classes
    HasFlags
  409. def privateWithin_=(sym: Symbol): Unit

  410. def rawFlagString: String

    Definition Classes
    SymbolFlagLogic
  411. def rawFlagString(mask: Long): String

    Definition Classes
    SymbolFlagLogic
  412. def rawInfo: Type

    Return info without checking for initialization or completing

  413. def rawflags: Long

  414. def rawflags_=(x: Long): Unit

  415. def rawowner: Symbol

  416. def removeAnnotation(cls: Symbol): Symbol

    Definition Classes
    Annotatable
  417. def reset(completer: Type): Unit

    Reset symbol to initial state

  418. def resetFlag(mask: Long): Symbol.this.type

    Definition Classes
    SymbolSymbolFlagLogic
  419. def resetFlags(): Unit

    Definition Classes
    SymbolSymbolFlagLogic
  420. def resolveOverloaded(pre: Type, targs: Seq[Type], actuals: Seq[Type]): Symbol

    Definition Classes
    AbsSymbolImpl → AbsSymbol
  421. def resolveOverloadedFlag(flag: Long): String

    Default implementation calls the generic string function, which will print overloaded flags as <flag1/flag2/flag3>.

    Default implementation calls the generic string function, which will print overloaded flags as <flag1/flag2/flag3>. Subclasses of Symbol refine.

    Definition Classes
    SymbolSymbolFlagLogicHasFlags
  422. def sealedDescendants: Set[Symbol]

    Recursively assemble all children of this symbol.

  423. final def sealedSortName: String

    The String used to order otherwise identical sealed symbols.

    The String used to order otherwise identical sealed symbols. This uses data which is stable across runs and variable classpaths (the initial Name) before falling back on id, which varies depending on exactly when a symbol is loaded.

  424. val self: Any

    Implicit information
    This member is added by an implicit conversion from Symbol to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
  425. val self: Any

    Implicit information
    This member is added by an implicit conversion from Symbol to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  426. def selfType: Type

    Definition Classes
    AbsSymbolImpl → AbsSymbol
  427. def setAnnotations(annots: List[AnnotationInfo]): Symbol.this.type

    Definition Classes
    SymbolAnnotatable
  428. def setAnnotations(annots: AnnotationInfo*): Symbol.this.type

    Definition Classes
    AbsSymbolImpl → AbsSymbolInternal
  429. def setFlag(mask: Long): Symbol.this.type

    Definition Classes
    SymbolSymbolFlagLogic
  430. def setInfo(info: Type): Symbol.this.type

    Set initial info.

  431. def setInfoAndEnter(info: Type): Symbol.this.type

    Set the info and enter this symbol into the owner's scope.

  432. def setInfoOwnerAdjusted(info: Type): Symbol.this.type

  433. def setInternalFlags(flag: Long): Symbol.this.type

    Definition Classes
    AbsSymbolImpl → AbsSymbolInternal
  434. def setName(name: Name): Symbol.this.type

  435. final def setNotFlag(flag: Int): Any

    If the given flag is set on this symbol, also set the corresponding notFLAG.

    If the given flag is set on this symbol, also set the corresponding notFLAG. For instance if flag is PRIVATE, the notPRIVATE flag will be set if PRIVATE is currently set.

    Definition Classes
    SymbolFlagLogic
  436. def setPos(pos: Position): Symbol.this.type

  437. def setPrivateWithin(sym: Symbol): Symbol.this.type

  438. def setTypeSignature(tpe: Type): Symbol.this.type

    Definition Classes
    AbsSymbolImpl → AbsSymbolInternal
  439. final def setter(base: Symbol, hasExpandedName: Boolean): Symbol

  440. final def setter(base: Symbol): Symbol

    The setter of this value or getter definition, or NoSymbol if none exists

  441. def shortSymbolClass: String

    Attributes
    protected
    Definition Classes
    SymbolFlagLogic
  442. def signatureString: String

  443. final def simpleName: Name

    The simple name of this Symbol

  444. final def skipConstructor: Symbol

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

  445. def skipPackageObject: Symbol

    If this is a package object or its implementing class, its owner: otherwise this.

  446. def sourceFile: AbstractFileType

  447. def sourceFile_=(f: AbstractFileType): Unit

  448. def sourceModule: Symbol

    The module corresponding to this module class (note that this is not updated when a module is cloned), or NoSymbol if this is not a ModuleClass.

  449. def sourceModule_=(sym: Symbol): Unit

  450. def substInfo(syms0: List[Symbol], syms1: List[Symbol]): Symbol.this.type

    Substitute second list of symbols for first in current info.

  451. def suchThat(cond: (Symbol) ⇒ Boolean): Symbol

    Definition Classes
    Symbol → AbsSymbol
  452. def superClass: Symbol

    The superclass of this class.

  453. final def superSymbol(base: Symbol): Symbol

    The symbol accessed by a super in the definition of this symbol when seen from class base.

    The symbol accessed by a super in the definition of this symbol when seen from class base. This symbol is always concrete. pre: this.owner is in the base class sequence of base.

  454. def symbolCreationString: String

    Definition Classes
    SymbolFlagLogic
  455. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  456. final def tag: Int

    A tag which (in the ideal case) uniquely identifies class symbols

  457. def thisPrefix: Type

    Definition Classes
    AbsSymbolImpl → AbsSymbol
  458. def thisSym: Symbol

    The self symbol (a TermSymbol) of a class with explicit self type, or else the symbol itself (a TypeSymbol).

    The self symbol (a TermSymbol) of a class with explicit self type, or else the symbol itself (a TypeSymbol).

    WARNING: you're probably better off using typeOfThis, as it's more uniform across classes with and without self variables.

    Example by Paul: scala> trait Foo1 { } scala> trait Foo2 { self => } scala> intp("Foo1").thisSym res0: $r.intp.global.Symbol = trait Foo1

    scala> intp("Foo2").thisSym res1: $r.intp.global.Symbol = value self

    Martin says: The reason thisSym' is this' is so that thisType can be this.thisSym.tpe. It's a trick to shave some cycles off.

    Morale: DO: if (clazz.typeOfThis.typeConstructor ne clazz.typeConstructor) ... DON'T: if (clazz.thisSym ne clazz) ...

  459. def thisType: Type

    If symbol is a class, the type this.type in this class, otherwise NoPrefix.

    If symbol is a class, the type this.type in this class, otherwise NoPrefix. We always have: thisType <:< typeOfThis

  460. def throwsAnnotations(): List[Symbol]

    Symbols of any @throws annotations on this symbol.

    Symbols of any @throws annotations on this symbol.

    Definition Classes
    Annotatable
  461. def toInterface: Symbol

    If this symbol is an implementation class, its interface, otherwise the symbol itself The method follows two strategies to determine the interface.

    If this symbol is an implementation class, its interface, otherwise the symbol itself The method follows two strategies to determine the interface.

    • during or after erasure, it takes the last parent of the implementation class (which is always the interface, by convention)
    • before erasure, it looks up the interface name in the scope of the owner of the class. This only works for implementation classes owned by other classes or traits. !!! Why?
  462. def toString(): String

    String representation, including symbol's kind e.

    String representation, including symbol's kind e.g., "class Foo", "method Bar". If hasMeaninglessName is true, uses the owner's name to disambiguate identity.

    Definition Classes
    Symbol → AnyRef → Any
  463. def tpe: Type

    Get type.

    Get type. The type of a symbol is: for a type symbol, the type corresponding to the symbol itself,

  464. def tpeHK: Type

  465. def typeConstructor: Type

    The type constructor of a symbol is: For a type symbol, the type corresponding to the symbol itself, excluding parameters.

    The type constructor of a symbol is: For a type symbol, the type corresponding to the symbol itself, excluding parameters. Not applicable for term symbols.

  466. def typeOfThis: Type

    The type of this in a class, or else the type of the symbol itself.

  467. def typeOfThis_=(tp: Type): Unit

  468. def typeParams: List[Symbol]

    The type parameters of this symbol.

    The type parameters of this symbol. assumption: if a type starts out as monomorphic, it will not acquire type parameters later.

  469. def typeSignature: Type

    Definition Classes
    AbsSymbolImpl → AbsSymbolInternal
  470. def typeSignatureIn(site: Type): Type

    Definition Classes
    AbsSymbolImpl → AbsSymbol
  471. def unpackLocation: AnyRef

    If this symbol is an existential skolem the location (a Tree or null) where it was unpacked.

    If this symbol is an existential skolem the location (a Tree or null) where it was unpacked. Resulttype is AnyRef because trees are not visible here.

  472. def unsafeTypeParams: List[Symbol]

    The type parameters of this symbol, without ensuring type completion.

    The type parameters of this symbol, without ensuring type completion. assumption: if a type starts out as monomorphic, it will not acquire type parameters later.

  473. def updateInfo(info: Type): Symbol

    Set new info valid from start of this phase.

  474. def validTo: Period

  475. def validTo_=(x: Period): Unit

  476. final def variance: Int

    The variance of this symbol as an integer

  477. def varianceString: String

    String representation of symbol's variance

    String representation of symbol's variance

    Definition Classes
    SymbolFlagLogic
  478. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  479. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  480. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  481. final def withAnnotation(annot: AnnotationInfo): Symbol

    Definition Classes
    Annotatable
  482. def withAnnotations(annots: List[AnnotationInfo]): Symbol.this.type

    Definition Classes
    SymbolAnnotatable
  483. def withoutAnnotations: Symbol.this.type

    Definition Classes
    SymbolAnnotatable
  484. def [B](y: B): (Symbol, B)

    Implicit information
    This member is added by an implicit conversion from Symbol to ArrowAssoc[Symbol] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def defaultFlagString: String

    Definition Classes
    HasFlags
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use flagString

  2. def hasDefaultFlag: Boolean

    Definition Classes
    HasFlags
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use hasDefault

  3. def hasFlagsToString(mask: Long): String

    Definition Classes
    HasFlags
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use flagString(mask)

  4. def hasTraitFlag: Boolean

    Definition Classes
    HasFlags
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use isTrait

  5. def isAbstract: Boolean

    Definition Classes
    HasFlags
    Annotations
    @deprecated
    Deprecated

    (Since version 2.9.0)

  6. def isParameter: Boolean

    Definition Classes
    HasFlags
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use isValueParameter or isTypeParameter

  7. def newAbstractType(pos: Position, name: TypeName): Symbol

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use the other signature

  8. def newAliasType(pos: Position, name: TypeName): Symbol

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use the other signature

  9. def newClass(pos: Position, name: TypeName): Symbol

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use the other signature

  10. def newExistential(pos: Position, name: TypeName): Symbol

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use the other signature

  11. def newLabel(pos: Position, name: TermName): MethodSymbol

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use the other signature

  12. def newMethod(pos: Position, name: TermName): MethodSymbol

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use the other signature

  13. def newModuleClass(pos: Position, name: TypeName): Symbol

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use the other signature

  14. def newValue(pos: Position, name: TermName): TermSymbol

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use the other signature

  15. def toplevelClass: Symbol

    Kept for source compatibility with 2.

    Kept for source compatibility with 2.9. Scala IDE for Eclipse relies on this.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use enclosingTopLevelClass

  16. def x: Symbol

    Implicit information
    This member is added by an implicit conversion from Symbol to ArrowAssoc[Symbol] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  17. def x: Symbol

    Implicit information
    This member is added by an implicit conversion from Symbol to Ensuring[Symbol] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from Annotatable[Symbol]

Inherited from SymbolCreator

Inherited from SymbolCreatorInterface

Inherited from SymbolFlagLogic

Inherited from HasFlags

Inherited from AbsSymbolImpl

Inherited from AbsSymbol

Inherited from AbsSymbolInternal

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringfmt from Symbol to StringFormat

Inherited by implicit conversion any2stringadd from Symbol to StringAdd

Inherited by implicit conversion any2ArrowAssoc from Symbol to ArrowAssoc[Symbol]

Inherited by implicit conversion any2Ensuring from Symbol to Ensuring[Symbol]