Modifiers

case class Modifiers(flags: FlagSet, privateWithin: TypeName, annotations: List[Tree], mods: List[Mod])

Modifiers and annotations for definitions

Value Params
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.

trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def &(fs: FlagSet): Modifiers
def &~(fs: FlagSet): Modifiers
def hasMod(cls: Class[_]): Boolean
def is(flag: Flag): Boolean
def is(flag: Flag, butNot: 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.

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.

def |(fs: FlagSet): Modifiers

Inherited methods

Inherited from
Product