ProtectedAccessors

dotty.tools.dotc.transform.ProtectedAccessors$
See theProtectedAccessors companion class

Add accessors for all protected accesses. An accessor is needed if according to the rules of the JVM a protected class member is not accessible from the point of access, but is accessible if the access is from an enclosing class. In this point a public access method is placed in that enclosing class.

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

def insideBoundaryOf(sym: Symbol)(using Context): Boolean

Is the current context's owner inside the access boundary established by sym?

Is the current context's owner inside the access boundary established by sym?

Attributes

def needsAccessor(sym: Symbol)(using Context): Boolean

Do we need a protected accessor for accessing sym from the current context's owner?

Do we need a protected accessor for accessing sym from the current context's owner?

Attributes

def needsAccessorIfNotInSubclass(sym: Symbol)(using Context): Boolean

Do we need a protected accessor if the current context's owner is not in a subclass or subtrait of sym?

Do we need a protected accessor if the current context's owner is not in a subclass or subtrait of sym?

Attributes

Concrete fields

val description: String
val name: String