scala.reflect.internal

HasFlags

trait HasFlags extends AnyRef

Common code utilized by Modifiers (which carry the flags associated with Trees) and Symbol.

Source
HasFlags.scala
Linear Supertypes
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HasFlags
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract type AccessBoundaryType

  2. abstract type AnnotationType

Abstract Value Members

  1. abstract def annotations: List[AnnotationType]

    A list of annotations attached to this entity.

  2. abstract 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.

    Attributes
    protected
  3. abstract def hasAccessBoundary: Boolean

    Whether this entity has a "privateWithin" visibility barrier attached.

  4. abstract def hasAllFlags(mask: Long): Boolean

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

  5. abstract def hasFlag(flag: Long): Boolean

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

  6. 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

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

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

    Test two objects for inequality.

    Test two objects for inequality.

    returns

    true if !(this == that), false otherwise.

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

    Equivalent to x.hashCode except for boxed numeric types and null.

    Equivalent to x.hashCode except for boxed numeric types and null. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. For null returns a hashcode where null.hashCode throws a NullPointerException.

    returns

    a hash value consistent with ==

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

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

    Implicit information
    This member is added by an implicit conversion from HasFlags to ArrowAssoc[HasFlags] 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

    Test two objects for equality.

    Test two objects for equality. The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    Any
  8. def accessString: String

  9. final def asInstanceOf[T0]: T0

    Cast the receiver object to be of type T0.

    Cast the receiver object to be of type T0.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression 1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expression List(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.

    returns

    the receiver object.

    Definition Classes
    Any
    Exceptions thrown
    ClassCastException

    if the receiver object is not an instance of the erasure of type T0.

  10. def calculateFlagString(basis: Long): String

    Attributes
    protected
  11. def clone(): AnyRef

    Create a copy of the receiver object.

    Create a copy of the receiver object.

    The default implementation of the clone method is platform dependent.

    returns

    a copy of the receiver object.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

  12. def ensuring(cond: (HasFlags) ⇒ Boolean, msg: ⇒ Any): HasFlags

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

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

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

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

    Tests whether the argument (arg0) is a reference to the receiver object (this).

    Tests whether the argument (arg0) is a reference to the receiver object (this).

    The eq method implements an equivalence relation on non-null instances of AnyRef, and has three additional properties:

    • It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false.
    • For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false.
    • null.eq(null) returns true.

    When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).

    returns

    true if the argument is a reference to the receiver object; false otherwise.

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

    The equality method for reference types.

    The equality method for reference types. Default implementation delegates to eq.

    See also equals in scala.Any.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Called by the garbage collector on the receiver object when there are no more references to the object.

    Called by the garbage collector on the receiver object when there are no more references to the object.

    The details of when and if the finalize method is invoked, as well as the interaction between finalize and non-local returns and exceptions, are all platform dependent.

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

  19. def flagBitsToString(bits: Long): String

  20. def flagMask: Long

    The default mask determining which flags to display.

  21. def flagString(mask: Long): String

  22. def flagString: String

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

  23. def formatted(fmtstr: String): String

    Returns string formatted according to given format string.

    Returns string formatted according to given format string. Format strings are as for String.format (@see java.lang.String.format).

    Implicit information
    This member is added by an implicit conversion from HasFlags to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  24. final def getClass(): Class[_]

    A representation that corresponds to the dynamic class of the receiver object.

    A representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

    a representation that corresponds to the dynamic class of the receiver object.

    Definition Classes
    AnyRef → Any
    Note

    not specified by SLS as a member of AnyRef

  25. def hasAbstractFlag: Boolean

  26. def hasAccessorFlag: Boolean

  27. def hasDefault: Boolean

  28. def hasLocalFlag: Boolean

  29. def hasModuleFlag: Boolean

  30. def hasNoFlags(mask: Long): Boolean

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

  31. def hasPackageFlag: Boolean

  32. def hasStableFlag: Boolean

  33. def hasStaticFlag: Boolean

  34. def hashCode(): Int

    The hashCode method for reference types.

    The hashCode method for reference types. See hashCode in scala.Any.

    returns

    the hash code value for this object.

    Definition Classes
    AnyRef → Any
  35. def isAbstractOverride: Boolean

  36. def isAnyOverride: Boolean

  37. def isArtifact: Boolean

  38. def isCase: Boolean

  39. def isCaseAccessor: Boolean

  40. def isDeferred: Boolean

  41. def isFinal: Boolean

  42. def isImplicit: Boolean

  43. final def isInstanceOf[T0]: Boolean

    Test whether the dynamic type of the receiver object is T0.

    Test whether the dynamic type of the receiver object is T0.

    Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression 1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.

    returns

    true if the receiver object is an instance of erasure of type T0; false otherwise.

    Definition Classes
    Any
  44. def isInterface: Boolean

  45. def isJavaDefined: Boolean

  46. def isLabel: Boolean

  47. def isLazy: Boolean

  48. def isLifted: Boolean

  49. def isMutable: Boolean

  50. def isOverride: Boolean

  51. def isPackage: Boolean

  52. def isParamAccessor: Boolean

  53. def isPrivate: Boolean

  54. def isPrivateLocal: Boolean

  55. def isProtected: Boolean

  56. def isProtectedLocal: Boolean

  57. def isPublic: Boolean

  58. def isSealed: Boolean

  59. def isSuperAccessor: Boolean

  60. def isSynthetic: Boolean

  61. def isTrait: Boolean

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

    Equivalent to !(this eq that).

    Equivalent to !(this eq that).

    returns

    true if the argument is not a reference to the receiver object; false otherwise.

    Definition Classes
    AnyRef
  63. final def notify(): Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  64. final def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  65. def resolveOverloadedFlag(flag: Long): String

    The string representation of a single bit, seen from this flag carrying entity.

  66. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  67. def toString(): String

    Creates a String representation of this object.

    Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.

    returns

    a String representation of the object.

    Definition Classes
    AnyRef → Any
  68. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  71. def [B](y: B): (HasFlags, B)

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

Shadowed Implict Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from HasFlags to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (hasFlags: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from HasFlags to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (hasFlags: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def defaultFlagString: String

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use flagString

  2. def hasDefaultFlag: Boolean

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use hasDefault

  3. def hasFlagsToString(mask: Long): String

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use flagString(mask)

  4. def hasTraitFlag: Boolean

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use isTrait

  5. def isParameter: Boolean

    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use isValueParameter or isTypeParameter

  6. def x: HasFlags

    Implicit information
    This member is added by an implicit conversion from HasFlags to ArrowAssoc[HasFlags] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (hasFlags: ArrowAssoc[HasFlags]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  7. def x: HasFlags

    Implicit information
    This member is added by an implicit conversion from HasFlags to Ensuring[HasFlags] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (hasFlags: Ensuring[HasFlags]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from HasFlags to StringAdd

Inherited by implicit conversion any2stringfmt from HasFlags to StringFormat

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

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

No Group