scala.reflect.generic.Trees

# Modifiers

#### case class Modifiers (flags: Long, privateWithin: Name, annotations: List[Tree], positions: Map[Long, Position]) extends 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.

Source
  Trees.scala

Linear Supertypes
Serializable, Serializable, Product, Equals, HasFlags, AnyRef, Any
Ordering

1. Alphabetic
2. By inheritance

Inherited

1. Hide All
2. Show all

1. Modifiers
2. Serializable
3. Serializable
4. Product
5. Equals
6. HasFlags
7. AnyRef
8. Any

Visibility

1. Public
2. All

### Instance Constructors

1. #### new Modifiers (flags: Long, privateWithin: Name, annotations: List[Tree], positions: Map[Long, Position])

   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

1. #### type AccessBoundaryType = Name

   Definition Classes
     Modifiers → HasFlags

2. #### type AnnotationType = Tree

   Definition Classes
     Modifiers → HasFlags

3. #### type FlagsType = Long

   Definition Classes
     Modifiers → HasFlags

### Value Members

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

   Attributes
     final
   Definition Classes
     AnyRef

2. #### def != (arg0: Any): Boolean

   Test two objects for inequality.

   Test two objects for inequality.

   returns

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

   Attributes
     final
   Definition Classes
     Any

3. #### def ## (): Int

   Equivalent to `x.hashCode` except for boxed numeric types.

   Equivalent to `x.hashCode` except for boxed numeric types. 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.

   returns

     a hash value consistent with ==

   Attributes
     final
   Definition Classes
     AnyRef → Any

4. #### def & (flag: Long): Modifiers

5. #### def &~ (flag: Long): Modifiers

6. #### def == (arg0: AnyRef): Boolean

   Attributes
     final
   Definition Classes
     AnyRef

7. #### def == (arg0: Any): Boolean

   Test two objects for equality.

   Test two objects for equality.

   returns

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

   Attributes
     final
   Definition Classes
     Any

8. #### val annotations : List[Tree]

   the annotations for the definition.

   the annotations for the definition. Note: the typechecker drops these annotations, use the AnnotationInfo's (Symbol.annotations) in later phases.

   Definition Classes
     Modifiers → HasFlags

9. #### 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.

   Attributes
     final
   Definition Classes
     Any

10. #### def canEqual (arg0: Any): Boolean

    A method that should be called from every well-designed equals method that is open to be overridden in a subclass.

    A method that should be called from every well-designed equals method that is open to be overridden in a subclass. See Programming in Scala, Chapter 28 for discussion and design.

    returns

      true if this instance can possibly equal `that`, otherwise false

    Definition Classes
      Modifiers → Equals

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[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws()

12. #### 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.

    Attributes
      final
    Definition Classes
      AnyRef

13. #### def equals (arg0: Any): Boolean

    The universal equality method defined in `AnyRef`.

    The universal equality method defined in `AnyRef`.

    returns

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

    Definition Classes
      Modifiers → Equals → AnyRef → Any

14. #### 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[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws()

15. #### 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

16. #### def getClass (): java.lang.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.

    Attributes
      final
    Definition Classes
      AnyRef → Any

17. #### def hasAbstractFlag : Boolean

    Definition Classes
      HasFlags

18. #### def hasAccessBoundary : Boolean

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

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

    Definition Classes
      Modifiers → HasFlags

19. #### def hasAccessorFlag : Boolean

    Definition Classes
      HasFlags

20. #### def hasAllFlags (mask: Long): Boolean

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

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

    Definition Classes
      Modifiers → HasFlags

21. #### def hasContravariantFlag : Boolean

    Definition Classes
      HasFlags

22. #### def hasDefault : Boolean

    Definition Classes
      HasFlags

23. #### def hasDefaultFlag : Boolean

    Definition Classes
      HasFlags

24. #### 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

25. #### def hasFlagsToString (mask: Long): 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
      Modifiers → HasFlags

26. #### def hasInConstructorFlag : Boolean

    Definition Classes
      HasFlags

27. #### def hasLocalFlag : Boolean

    Definition Classes
      HasFlags

28. #### def hasModuleFlag : Boolean

    Definition Classes
      HasFlags

29. #### 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

30. #### def hasPackageFlag : Boolean

    Definition Classes
      HasFlags

31. #### def hasPreSuperFlag : Boolean

    Definition Classes
      HasFlags

32. #### def hasStableFlag : Boolean

    Definition Classes
      HasFlags

33. #### def hasStaticFlag : Boolean

    Definition Classes
      HasFlags

34. #### def hasTraitFlag : Boolean

    Definition Classes
      HasFlags

35. #### def hashCode (): Int

    The hashCode method for reference types.

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

    returns

      the hash code value for this object.

    Definition Classes
      Modifiers → AnyRef → Any

36. #### def isAbstractOverride : Boolean

    Definition Classes
      HasFlags

37. #### def isByNameParam : Boolean

    Definition Classes
      HasFlags

38. #### def isCase : Boolean

    Definition Classes
      HasFlags

39. #### def isCaseAccessor : Boolean

    Definition Classes
      HasFlags

40. #### def isDefaultInit : Boolean

    Definition Classes
      HasFlags

41. #### def isDeferred : Boolean

    Definition Classes
      HasFlags

42. #### def isFinal : Boolean

    Definition Classes
      HasFlags

43. #### def isImplicit : Boolean

    Definition Classes
      HasFlags

44. #### 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.

    Attributes
      final
    Definition Classes
      Any

45. #### def isInterface : Boolean

    Definition Classes
      HasFlags

46. #### def isJavaDefined : Boolean

    Definition Classes
      HasFlags

47. #### def isLabel : Boolean

    Definition Classes
      HasFlags

48. #### def isLazy : Boolean

    Definition Classes
      HasFlags

49. #### def isLifted : Boolean

    Definition Classes
      HasFlags

50. #### def isMutable : Boolean

    Definition Classes
      HasFlags

51. #### def isOverride : Boolean

    Definition Classes
      HasFlags

52. #### def isParamAccessor : Boolean

    Definition Classes
      HasFlags

53. #### def isParameter : Boolean

    Definition Classes
      HasFlags

54. #### def isPrivate : Boolean

    Definition Classes
      HasFlags

55. #### def isPrivateLocal : Boolean

    Definition Classes
      HasFlags

56. #### def isProtected : Boolean

    Definition Classes
      HasFlags

57. #### def isProtectedLocal : Boolean

    Definition Classes
      HasFlags

58. #### def isPublic : Boolean

    Definition Classes
      HasFlags

59. #### def isSealed : Boolean

    Definition Classes
      HasFlags

60. #### def isSuperAccessor : Boolean

    Definition Classes
      HasFlags

61. #### def isSynthetic : Boolean

    Definition Classes
      HasFlags

62. #### def isTrait : Boolean

    Definition Classes
      HasFlags

63. #### 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.

    Attributes
      final
    Definition Classes
      AnyRef

64. #### 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.

    Attributes
      final
    Definition Classes
      AnyRef

65. #### 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.

    Attributes
      final
    Definition Classes
      AnyRef

66. #### val positions : Map[Long, Position]

67. #### val privateWithin : Name

    the qualifier for a private (a type name) or tpnme.

    the qualifier for a private (a type name) or tpnme.EMPTY, if none is given.

    Definition Classes
      Modifiers → HasFlags

68. #### def productArity : Int

    The size of this product.

    The size of this product.

    returns

      for a product `A(x_1, ..., x_k)`, returns `k`

    Definition Classes
      Modifiers → Product

69. #### def productElement (arg0: Int): Any

    The nth element of this product, 0-based.

    The nth element of this product, 0-based. In other words, for a product `A(x_1, ..., x_k)`, returns x_(n+1) where 0 < n < k.

    returns

      the element `n` elements after the first element

    Definition Classes
      Modifiers → Product

70. #### def productIterator : Iterator[Any]

    An iterator over all the elements of this product.

    An iterator over all the elements of this product.

    returns

      in the default implementation, an Iterator[Any]

    Definition Classes
      Product

71. #### def productPrefix : String

    A string used in the `toString` methods of derived classes.

    A string used in the `toString` methods of derived classes. Implementations may override this method to prepend a string prefix to the result of toString methods.

    returns

      in the default implementation, the empty string

    Definition Classes
      Modifiers → Product

72. #### def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
      final
    Definition Classes
      AnyRef

73. #### 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
      Modifiers → AnyRef → Any

74. #### def wait (): Unit

    Attributes
      final
    Definition Classes
      AnyRef
    Annotations
      @throws()

75. #### def wait (arg0: Long, arg1: Int): Unit

    Attributes
      final
    Definition Classes
      AnyRef
    Annotations
      @throws()

76. #### def wait (arg0: Long): Unit

    Attributes
      final
    Definition Classes
      AnyRef
    Annotations
      @throws()

77. #### def withAnnotations (annots: List[Tree]): Modifiers

78. #### def withPosition (flag: Long, position: Position): Modifiers

79. #### def | (flag: Long): Modifiers

### Deprecated Value Members

1. #### def isAbstract : Boolean

   Definition Classes
     HasFlags
   Annotations
     @deprecated
   Deprecated

2. #### def productElements : Iterator[Any]

   Definition Classes
     Product
   Annotations
     @deprecated
   Deprecated

     use productIterator instead

### Inherited from Serializable

### Inherited from Product

### Inherited from Equals

### Inherited from HasFlags

### Inherited from AnyRef

### Inherited from Any