trait HasFlags extends AnyRef
Common code utilized by Modifiers (which carry the flags associated with Trees) and Symbol.
- Alphabetic
- By Inheritance
- HasFlags
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
Abstract Value Members
-
abstract
def
annotations: List[AnnotationType]
A list of annotations attached to this entity.
-
abstract
def
flags: FlagsType
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.
- Attributes
- protected
-
abstract
def
hasAccessBoundary: Boolean
Whether this entity has a "privateWithin" visibility barrier attached.
-
abstract
def
hasAllFlags(mask: Long): Boolean
Whether this entity has ALL of the flags in the given mask.
-
abstract
def
hasFlag(flag: Long): Boolean
Whether this entity has ANY of the flags in the given mask.
-
abstract
def
hasFlagsToString(mask: FlagsType): String
The printable representation of this entity's flags and access boundary, restricted to flags in the given mask.
-
abstract
def
privateWithin: AccessBoundaryType
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
Concrete 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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- def hasAbstractFlag: Boolean
- def hasAccessorFlag: Boolean
- def hasContravariantFlag: Boolean
- def hasDefault: Boolean
- def hasDefaultFlag: Boolean
- def hasInConstructorFlag: Boolean
- def hasLocalFlag: Boolean
- def hasModuleFlag: Boolean
-
def
hasNoFlags(mask: Long): Boolean
Whether this entity has NONE of the flags in the given mask.
- def hasPackageFlag: Boolean
- def hasPreSuperFlag: Boolean
- def hasStableFlag: Boolean
- def hasStaticFlag: Boolean
- def hasTraitFlag: Boolean
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- def isAbstractOverride: Boolean
- def isAnyOverride: Boolean
- def isByNameParam: Boolean
- def isCase: Boolean
- def isCaseAccessor: Boolean
- def isDefaultInit: Boolean
- def isDeferred: Boolean
- def isFinal: Boolean
- def isHeader: Boolean
- def isImplicit: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isInterface: Boolean
- def isJavaDefined: Boolean
- def isLabel: Boolean
- def isLazy: Boolean
- def isLifted: Boolean
- def isMutable: Boolean
- def isOverride: Boolean
- def isParamAccessor: Boolean
- def isParameter: Boolean
- def isPrivate: Boolean
- def isPrivateLocal: Boolean
- def isProtected: Boolean
- def isProtectedLocal: Boolean
- def isPublic: Boolean
- def isSealed: Boolean
- def isSuperAccessor: Boolean
- def isSynthetic: Boolean
- def isTrait: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- 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( ... )