abstract class Symbol extends Forest.AbsSymbol with HasFlags
- Alphabetic
- By Inheritance
- Symbol
- HasFlags
- AbsSymbol
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Symbol(initOwner: Forest.Symbol, initPos: Position, initName: Forest.Name)
Type Members
- type AccessBoundaryType = Forest.Symbol
- type AnnotationType = Forest.AnnotationInfo
- type FlagsType = Long
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
accessBoundary(base: Forest.Symbol): Forest.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.
- def accessString: String
- def addAnnotation(sym: Forest.Symbol, args: Forest.Tree*): Symbol.this.type
- def addAnnotation(annot: Forest.AnnotationInfo): Symbol.this.type
-
def
allModifiers: Set[api.Modifier.Value]
The modifiers of this symbol
-
def
annotations: List[Forest.AnnotationInfo]
After the typer phase (before, look at the definition's Modifiers), contains the annotations attached to member a definition (class, method, type, field).
- def annotationsString: String
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
decodedName: String
The decoded name of the symbol, e.g.
The decoded name of the symbol, e.g.
==
instead of$eq$eq
. -
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.
- def defaultFlagMask: Long
- def defaultFlagString: String
-
def
effectiveOwner: Forest.Symbol
The owner, skipping package objects.
-
def
enclClass: Forest.Symbol
The next enclosing class.
-
def
encodedName: String
The name of the symbol before decoding, e.g.
The name of the symbol before decoding, e.g.
$eq$eq
instead of==
. -
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
existentialToString: String
String representation of existentially bound variable
- def filterAnnotations(p: (Forest.AnnotationInfo) ⇒ Boolean): Symbol.this.type
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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.
- final def flags_=(fs: Long): Unit
-
final
def
fullName: String
The encoded full path name of this symbol, where outer names and inner names are separated by periods.
-
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. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- final def getFlag(mask: Long): Long
-
def
hasAbstractFlag: Boolean
- Definition Classes
- HasFlags
-
final
def
hasAccessBoundary: Boolean
Does symbol have a private or protected qualifier set?
-
def
hasAccessorFlag: Boolean
- Definition Classes
- HasFlags
-
final
def
hasAllFlags(mask: Long): Boolean
Does symbol have ALL the flags in
mask
set? -
def
hasContravariantFlag: Boolean
- Definition Classes
- HasFlags
-
def
hasDefault: Boolean
- Definition Classes
- HasFlags
-
def
hasDefaultFlag: Boolean
- Definition Classes
- HasFlags
-
final
def
hasFlag(mask: Long): Boolean
Does symbol have ANY flag in
mask
set? -
def
hasFlagsToString(mask: Long): String
The printable representation of this entity's flags and access boundary, restricted to flags in the given mask.
-
def
hasInConstructorFlag: Boolean
- Definition Classes
- HasFlags
-
def
hasLocalFlag: Boolean
- Definition Classes
- HasFlags
-
def
hasModifier(mod: api.Modifier.Value): Boolean
Does this symbol have given modifier?
-
def
hasModuleFlag: Boolean
- Definition Classes
- HasFlags
-
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
-
def
hasPackageFlag: Boolean
- Definition Classes
- HasFlags
-
def
hasPreSuperFlag: Boolean
- Definition Classes
- HasFlags
-
def
hasStableFlag: Boolean
- Definition Classes
- HasFlags
-
def
hasStaticFlag: Boolean
- Definition Classes
- HasFlags
-
def
hasTraitFlag: Boolean
- Definition Classes
- HasFlags
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- val id: Int
- final def isAbstractClass: Boolean
-
def
isAbstractOverride: Boolean
- Definition Classes
- HasFlags
- def isAbstractType: Boolean
- def isAliasType: Boolean
- final def isAnonOrRefinementClass: Boolean
- final def isAnonymousClass: Boolean
- final def isAnonymousFunction: Boolean
-
def
isAnyOverride: Boolean
- Definition Classes
- HasFlags
- def isBottomClass: Boolean
- final def isBridge: Boolean
-
def
isByNameParam: Boolean
- Definition Classes
- HasFlags
-
def
isCase: Boolean
- Definition Classes
- HasFlags
-
def
isCaseAccessor: Boolean
- Definition Classes
- HasFlags
- def isClass: Boolean
- final def isClassConstructor: Boolean
- final def isConcreteClass: Boolean
- final def isContravariant: Boolean
- final def isCovariant: Boolean
-
def
isDefaultInit: Boolean
- Definition Classes
- HasFlags
-
def
isDeferred: Boolean
- Definition Classes
- HasFlags
- final def isEarlyInitialized: Boolean
-
def
isEffectiveRoot: Boolean
Is this symbol an effective root for fullname string?
-
final
def
isEffectivelyFinal: Boolean
Is this symbol effectively final? I.e, it cannot be overridden
-
final
def
isEmptyPackage: Boolean
Package tests
- final def isEmptyPackageClass: Boolean
- def isEmptyPrefix: Boolean
- final def isError: Boolean
- final def isExistentiallyBound: Boolean
-
def
isFinal: Boolean
- Definition Classes
- HasFlags
-
def
isHeader: Boolean
- Definition Classes
- HasFlags
- final def isImplClass: Boolean
-
def
isImplicit: Boolean
- Definition Classes
- HasFlags
- final def isInitializedToDefault: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isInterface: Boolean
- Definition Classes
- HasFlags
-
def
isJavaDefined: Boolean
- Definition Classes
- HasFlags
- final def isJavaInterface: Boolean
-
def
isLabel: Boolean
- Definition Classes
- HasFlags
-
def
isLazy: Boolean
- Definition Classes
- HasFlags
- final def isLazyAccessor: Boolean
-
def
isLifted: Boolean
- Definition Classes
- HasFlags
-
final
def
isLocal: Boolean
Is this symbol locally defined? I.e.
Is this symbol locally defined? I.e. not accessed from outside
this
instance - final def isMethod: Boolean
- final def isMixinConstructor: Boolean
- final def isModule: Boolean
- final def isModuleClass: Boolean
-
def
isMutable: Boolean
- Definition Classes
- HasFlags
-
final
def
isNonBottomSubClass(that: Forest.Symbol): Boolean
Is this class symbol a subclass of that symbol?
-
def
isNonClassType: Boolean
Is this symbol a type but not a class?
- final def isNumericValueClass: Boolean
-
final
def
isOmittablePrefix: Boolean
Conditions where we omit the prefix when printing a symbol, to avoid unpleasantries like Predef.String.
- final def isOverloaded: Boolean
- final def isOverridableMember: Boolean
-
def
isOverride: Boolean
- Definition Classes
- HasFlags
- final def isPackage: Boolean
- final def isPackageClass: Boolean
- final def isPackageObject: Boolean
- final def isPackageObjectClass: Boolean
- final def isPackageObjectOrClass: Boolean
-
def
isParamAccessor: Boolean
- Definition Classes
- HasFlags
-
def
isParameter: Boolean
- Definition Classes
- HasFlags
- final def isPredefModuleClass: Boolean
-
def
isPrivate: Boolean
- Definition Classes
- HasFlags
-
def
isPrivateLocal: Boolean
- Definition Classes
- HasFlags
-
def
isProtected: Boolean
- Definition Classes
- HasFlags
-
def
isProtectedLocal: Boolean
- Definition Classes
- HasFlags
-
def
isPublic: Boolean
- Definition Classes
- HasFlags
- final def isRefinementClass: Boolean
- final def isRoot: Boolean
- final def isRootPackage: Boolean
-
def
isSealed: Boolean
- Definition Classes
- HasFlags
- def isSingletonExistential: Boolean
- final def isSourceMethod: Boolean
- final def isStructuralRefinement: Boolean
-
def
isSubClass(that: Forest.Symbol): Boolean
Overridden in NullClass and NothingClass for custom behavior.
-
def
isSuperAccessor: Boolean
- Definition Classes
- HasFlags
-
def
isSynthetic: Boolean
- Definition Classes
- HasFlags
- def isTerm: Boolean
- final def isTrait: Boolean
- def isType: Boolean
- final def isTypeParameter: Boolean
-
final
def
isValue: Boolean
Term symbols with the exception of static parts of Java classes and packages.
- final def isValueClass: Boolean
- final def isValueParameter: Boolean
- final def isVarargsMethod: Boolean
- final def isVariable: Boolean
-
final
def
keyString: String
String representation of symbol's definition key word
-
def
lazyAccessor: Forest.Symbol
For a lazy value, its lazy accessor.
For a lazy value, its lazy accessor. NoSymbol for all others.
- def module: Forest.Symbol
-
def
moduleClass: Forest.Symbol
The module class corresponding to this module.
-
def
name: Forest.Name
The name of the symbol as a member of the
Name
type. -
def
nameString: String
String representation of symbol's simple name.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def newAbstractType(name: Forest.Name, pos: Position = NoPosition): Forest.TypeSymbol
-
final
def
newAbstractType(pos: Position, name: Forest.Name): Forest.TypeSymbol
Symbol of an abstract type type T >: ...
Symbol of an abstract type type T >: ... <: ...
- final def newAliasType(name: Forest.Name, pos: Position = NoPosition): Forest.TypeSymbol
-
final
def
newAliasType(pos: Position, name: Forest.Name): Forest.TypeSymbol
Symbol of a type definition type T = ...
- final def newClass(name: Forest.Name, pos: Position = NoPosition): Forest.ClassSymbol
- final def newClass(pos: Position, name: Forest.Name): Forest.ClassSymbol
-
def
newClassConstructor(pos: Position): Forest.MethodSymbol
Instance constructor with info set.
-
final
def
newConstructor(pos: Position): Forest.MethodSymbol
Propagates ConstrFlags (JAVA, specifically) from owner to constructor.
- final def newExistential(pos: Position, name: Forest.Name): Forest.Symbol
- final def newLabel(pos: Position, name: Forest.TermName): Forest.MethodSymbol
-
final
def
newLocalDummy(pos: Position): Forest.TermSymbol
Create local dummy for template (owner of local blocks)
- final def newMethod(name: Forest.TermName, pos: Position = NoPosition): Forest.MethodSymbol
- final def newMethod(pos: Position, name: Forest.TermName): Forest.MethodSymbol
- final def newModule(name: Forest.TermName): Forest.ModuleSymbol
- final def newModule(pos: Position, name: Forest.TermName): Forest.ModuleSymbol
- final def newModule(name: Forest.TermName, clazz: Forest.Symbol, pos: Position = NoPosition): Forest.ModuleSymbol
- final def newModule(pos: Position, name: Forest.TermName, clazz: Forest.ClassSymbol): Forest.ModuleSymbol
- final def newModuleClass(name: Forest.Name, pos: Position = NoPosition): Forest.ModuleClassSymbol
- final def newModuleClass(pos: Position, name: Forest.Name): Forest.ModuleClassSymbol
- final def newPackage(name: Forest.TermName, pos: Position = NoPosition): Forest.ModuleSymbol
- final def newPackage(pos: Position, name: Forest.TermName): Forest.ModuleSymbol
-
final
def
newRefinementClass(pos: Position): Forest.ClassSymbol
Refinement types P { val x: String; type T <: Number } also have symbols, they are refinementClasses
-
def
newStaticConstructor(pos: Position): Forest.MethodSymbol
Static constructor with info set.
-
final
def
newSyntheticValueParam(argtype: Forest.Type): Forest.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.
-
final
def
newSyntheticValueParams(argtypes: List[Forest.Type]): List[Forest.Symbol]
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.
-
final
def
newSyntheticValueParamss(argtypess: List[List[Forest.Type]]): List[List[Forest.Symbol]]
Synthetic value parameters when parameter symbols are not available
- final def newTypeParameter(name: Forest.Name, pos: Position = NoPosition): Forest.TypeSymbol
-
final
def
newTypeParameter(pos: Position, name: Forest.Name): Forest.TypeSymbol
Symbol of a type parameter
- final def newValue(name: Forest.TermName, pos: Position = NoPosition): Forest.TermSymbol
- final def newValue(pos: Position, name: Forest.TermName): Forest.TermSymbol
- final def newValueParameter(pos: Position, name: Forest.TermName): Forest.TermSymbol
- final def newVariable(pos: Position, name: Forest.TermName): Forest.TermSymbol
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
owner: Forest.Symbol
The owner of this symbol.
- def ownerChain: List[Forest.Symbol]
- final def ownerNames(separator: Char): String
- final def ownerNames: String
- def paramss: List[List[Forest.Symbol]]
- def pos: Position
-
def
privateWithin: Forest.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
- def privateWithin_=(sym: Forest.Symbol): Unit
- var rawflags: Long
- var rawname: Forest.Name
- var rawowner: Forest.Symbol
- var rawpos: Position
- final def resetFlag(mask: Long): Symbol.this.type
- final def resetFlags(): Unit
- def setAnnotations(annots: List[Forest.AnnotationInfo]): Symbol.this.type
- final def setFlag(mask: Long): Symbol.this.type
-
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.
- def setPrivateWithin(sym: Forest.Symbol): Symbol.this.type
- def signatureString: String
-
final
def
simpleName: Forest.Name
The simple name of this Symbol
-
final
def
skipPackageObject: Forest.Symbol
If this is a package object or its implementing class, its owner: otherwise this.
-
def
sourceModule: Forest.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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
thisType: Forest.Type
If symbol is a class, the type
this.type
in this class, otherwiseNoPrefix
.If symbol is a class, the type
this.type
in this class, otherwiseNoPrefix
. We always have: thisType <:< typeOfThis -
def
toString(): String
- Definition Classes
- Symbol → AnyRef → Any
- final def toType: Forest.Type
- def tpe: Forest.Type
- def tpeHK: Forest.Type
-
def
typeConstructor: Forest.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.
- def typeParams: List[Forest.Symbol]
-
final
def
variance: Int
The variance of this symbol as an integer
-
def
varianceString: String
String representation of symbol's variance
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def withAnnotations(annots: List[Forest.AnnotationInfo]): Symbol.this.type
- def withoutAnnotations: Symbol.this.type