case class Modifiers(flags: Long, privateWithin: SymbolTable.Name, annotations: List[SymbolTable.Tree]) extends SymbolTable.ModifiersApi with HasFlags with Product with Serializable
- privateWithin
the qualifier for a private (a type name) or tpnme.EMPTY, if none is given.
- annotations
the annotations for the definition. Note: the typechecker drops these annotations, use the AnnotationInfo's (Symbol.annotations) in later phases.
- Alphabetic
- By Inheritance
- Modifiers
- Serializable
- Serializable
- Product
- Equals
- HasFlags
- ModifiersApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Modifiers(flags: Long, privateWithin: SymbolTable.Name, annotations: List[SymbolTable.Tree])
- privateWithin
the qualifier for a private (a type name) or tpnme.EMPTY, if none is given.
- annotations
the annotations for the definition. Note: the typechecker drops these annotations, use the AnnotationInfo's (Symbol.annotations) in later phases.
Type Members
- type AccessBoundaryType = SymbolTable.Name
- type AnnotationType = SymbolTable.Tree
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def &(flag: Long): SymbolTable.Modifiers
- def &~(flag: Long): SymbolTable.Modifiers
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
accessString: String
- Definition Classes
- HasFlags
-
val
annotations: List[SymbolTable.Tree]
A list of annotations attached to this entity.
A list of annotations attached to this entity.
- Definition Classes
- Modifiers → HasFlags → ModifiersApi
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
calculateFlagString(basis: Long): String
- Attributes
- protected
- Definition Classes
- HasFlags
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flagBitsToString(bits: Long): String
- Definition Classes
- HasFlags
-
def
flagMask: Long
The default mask determining which flags to display.
The default mask determining which flags to display.
- Definition Classes
- HasFlags
-
def
flagString(mask: Long): String
- Definition Classes
- HasFlags
-
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
-
val
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
- Modifiers → HasFlags → ModifiersApi
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hasAbstractFlag: Boolean
- Definition Classes
- HasFlags
-
def
hasAccessBoundary: Boolean
Whether this entity has a "privateWithin" visibility barrier attached.
-
def
hasAccessorFlag: Boolean
- Definition Classes
- HasFlags
-
def
hasAllFlags(mask: Long): Boolean
Whether this entity has ALL of the flags in the given mask.
- def hasAnnotationNamed(name: SymbolTable.TypeName): Boolean
-
def
hasDefault: Boolean
- Definition Classes
- HasFlags
-
def
hasFlag(flag: Long): Boolean
Whether this entity has ANY of the flags in the given mask.
Whether this entity has ANY of the flags in the given mask.
- Definition Classes
- Modifiers → HasFlags → ModifiersApi
-
def
hasJavaAnnotationFlag: Boolean
- Definition Classes
- HasFlags
-
def
hasJavaEnumFlag: Boolean
- Definition Classes
- HasFlags
-
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
hasStableFlag: Boolean
- Definition Classes
- HasFlags
-
def
hasStaticFlag: Boolean
- Definition Classes
- HasFlags
-
def
isAbstractOverride: Boolean
- Definition Classes
- HasFlags
-
def
isAnyOverride: Boolean
- Definition Classes
- HasFlags
-
def
isArtifact: Boolean
- Definition Classes
- HasFlags
-
def
isCase: Boolean
- Definition Classes
- HasFlags
-
def
isCaseAccessor: Boolean
- Definition Classes
- HasFlags
-
def
isDeferred: Boolean
- Definition Classes
- HasFlags
-
def
isFinal: Boolean
- Definition Classes
- HasFlags
-
def
isImplicit: Boolean
- Definition Classes
- HasFlags
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isInterface: Boolean
- Definition Classes
- HasFlags
-
def
isJavaDefined: Boolean
- Definition Classes
- HasFlags
-
def
isLabel: Boolean
- Definition Classes
- HasFlags
-
def
isLazy: Boolean
- Definition Classes
- HasFlags
-
def
isLifted: Boolean
- Definition Classes
- HasFlags
-
def
isLocalToThis: Boolean
- Definition Classes
- HasFlags
-
def
isMacro: Boolean
- Definition Classes
- HasFlags
-
def
isMutable: Boolean
- Definition Classes
- HasFlags
-
def
isOverride: Boolean
- Definition Classes
- HasFlags
-
def
isParamAccessor: Boolean
- Definition Classes
- HasFlags
-
def
isParameter: Boolean
- Definition Classes
- HasFlags
-
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
-
def
isSealed: Boolean
- Definition Classes
- HasFlags
-
def
isSpecialized: Boolean
- Definition Classes
- HasFlags
-
def
isSuperAccessor: Boolean
- Definition Classes
- HasFlags
-
def
isSynthetic: Boolean
- Definition Classes
- HasFlags
-
def
isTrait: Boolean
- Definition Classes
- HasFlags
-
def
isTraitOrInterface: Boolean
- Definition Classes
- HasFlags
-
def
mapAnnotations(f: (List[SymbolTable.Tree]) ⇒ List[SymbolTable.Tree]): SymbolTable.Modifiers
Creates a new instance of
Modifiers
with the annotations transformed according to the given function.Creates a new instance of
Modifiers
with the annotations transformed according to the given function.- Definition Classes
- Modifiers → ModifiersApi
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- var positions: Map[Long, SymbolTable.Position]
-
val
privateWithin: SymbolTable.Name
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
- Modifiers → HasFlags → ModifiersApi
-
def
resolveOverloadedFlag(flag: Long): String
The string representation of a single bit, seen from this flag carrying entity.
The string representation of a single bit, seen from this flag carrying entity.
- Definition Classes
- HasFlags
- def setPositions(poss: Map[Long, SymbolTable.Position]): Modifiers.this.type
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Modifiers → AnyRef → Any
-
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( ... ) @native()
- def withAnnotations(annots: List[SymbolTable.Tree]): SymbolTable.Modifiers
- def withPosition(flag: Long, position: SymbolTable.Position): SymbolTable.Modifiers
- def |(flag: Long): SymbolTable.Modifiers
- def |(flag: Int): SymbolTable.Modifiers