Modifiers

dotty.tools.dotc.ast.untpd$.Modifiers
case class Modifiers(flags: FlagSet, privateWithin: TypeName, annotations: List[Tree], mods: List[Mod])

Modifiers and annotations for definitions

Attributes

annotations

The annotations preceding the modifiers

flags

The set flags

privateWithin

If a private or protected has is followed by a qualifier [q], the name q, "" as a typename otherwise.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def &(fs: FlagSet): Modifiers
def &~(fs: FlagSet): Modifiers
def hasAnnotations: Boolean
def hasFlags: Boolean
def hasMod(cls: Class[_]): Boolean
def hasPrivateWithin: Boolean
def is(flag: Flag): Boolean
def is(flag: Flag, butNot: FlagSet): Boolean
def isAllOf(fc: FlagSet): Boolean
def isEnumCase: Boolean
def isEnumClass: Boolean
def isOneOf(fs: FlagSet): Boolean
def isOneOf(fs: FlagSet, butNot: FlagSet): Boolean
def withAddedFlags(flags: FlagSet, span: Span)(using Context): Modifiers

Add flags to thos modifier set, checking that there are no type/term conflicts. If there are conflicts, issue an error and return the modifiers consisting of the added flags only. The reason to do it this way is that the added flags usually describe the core of a construct whereas the existing set are the modifiers given in the source.

Add flags to thos modifier set, checking that there are no type/term conflicts. If there are conflicts, issue an error and return the modifiers consisting of the added flags only. The reason to do it this way is that the added flags usually describe the core of a construct whereas the existing set are the modifiers given in the source.

Attributes

def withAnnotations(annots: List[Tree]): Modifiers
def withMods(ms: List[Mod]): Modifiers

Modifiers with given list of Mods. It is checked that all modifiers are already accounted for in flags and privateWithin.

Modifiers with given list of Mods. It is checked that all modifiers are already accounted for in flags and privateWithin.

Attributes

def |(fs: FlagSet): Modifiers

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product