scala.tools.nsc.transform.ExplicitOuter

ExplicitOuterTransformer

class ExplicitOuterTransformer extends OuterPathTransformer

The phase performs the following transformations on terms:

-

An class which is not an interface and is not static gets an outer accessor (@see outerDefs).

1a. A class which is not a trait gets an outer field.

- A constructor of a non-trait inner class gets an outer parameter.

- A reference C.this where C refers to an outer class is replaced by a selection this.$outer$$C1 ... .$outer$$Cn (@see outerPath)

-

- A call to a constructor Q.<init>(args) or Q.$init$(args) where Q != this and the constructor belongs to a non-static class is augmented by an outer argument. E.g. Q.<init>(OUTER, args) where OUTER is the qualifier corresponding to the singleton type Q.

- A call to a constructor this.<init>(args) in a secondary constructor is augmented to this.<init>(OUTER, args) where OUTER is the last parameter of the secondary constructor.

- Remove private modifier from class members M that are accessed from an inner class.

- Remove protected modifier from class members M that are accessed without a super qualifier accessed from an inner class or trait.

- Remove private and protected modifiers from type symbols

- Remove private modifiers from members of traits

Note: The whole transform is run in phase explicitOuter.next.

Self Type
ExplicitOuterTransformer
Source
ExplicitOuter.scala
Linear Supertypes
OuterPathTransformer, ExplicitOuter.TypingTransformer, Global.Transformer, Global.Transformer, AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ExplicitOuterTransformer
  2. OuterPathTransformer
  3. TypingTransformer
  4. Transformer
  5. Transformer
  6. AnyRef
  7. 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

Instance Constructors

  1. new ExplicitOuterTransformer(unit: Global.CompilationUnit)

Value Members

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

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

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

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

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

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

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def atOwner[A](tree: Global.Tree, owner: Global.Symbol)(trans: ⇒ A): A

    Definition Classes
    TypingTransformer
  10. final def atOwner[A](owner: Global.Symbol)(trans: ⇒ A): A

    Definition Classes
    TypingTransformer → Transformer
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. var curTree: Global.Tree

    Attributes
    protected
    Definition Classes
    TypingTransformer
  13. def currentClass: Global.Symbol

    Attributes
    protected
    Definition Classes
    Transformer
  14. def currentMethod: Global.Symbol

    Attributes
    protected
    Definition Classes
    Transformer
  15. var currentOwner: Global.Symbol

    Attributes
    protected[scala]
    Definition Classes
    Transformer
  16. def ensuring(cond: (ExplicitOuterTransformer) ⇒ Boolean, msg: ⇒ Any): ExplicitOuterTransformer

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

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

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

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. def formatted(fmtstr: String): String

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

    Definition Classes
    AnyRef → Any
  25. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  26. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  27. var localTyper: (analyzer)#Typer

    Definition Classes
    TypingTransformer
  28. def matchTranslation(tree: Global.Match): Global.Tree

  29. def mixinOuterAccessorDef(mixinClass: Global.Symbol): Global.Tree

    The definition tree of the outer accessor for class mixinClass.

    The definition tree of the outer accessor for class mixinClass.

    mixinClass

    The mixin class which defines the abstract outer accessor which is implemented by the generated one.

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

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

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def outerAccessorDef: Global.Tree

    The definition tree of the outer accessor of current class

  34. def outerFieldDef: Global.Tree

    The definition tree of the outer accessor of current class

  35. var outerParam: Global.Symbol

    The directly enclosing outer parameter, if we are in a constructor

    The directly enclosing outer parameter, if we are in a constructor

    Attributes
    protected
    Definition Classes
    OuterPathTransformer
  36. def outerPath(base: Global.Tree, from: Global.Symbol, to: Global.Symbol): Global.Tree

    The path

    `base'.$outer$$C1 ... .$outer$$Cn
    
    which refers to the outer instance of class to of value base.

    The path

    `base'.$outer$$C1 ... .$outer$$Cn
    
    which refers to the outer instance of class to of value base. The result is typed but not positioned.

    base'.$outer$$C1 ... .$outer$$Cn which refers to the outer instance of class to of value base. The result is typed but not positioned.

    base

    ...

    from

    ...

    to

    ...

    returns

    ...

    Attributes
    protected
    Definition Classes
    OuterPathTransformer
  37. def outerValue: Global.Tree

    The first outer selection from currently transformed tree.

    The first outer selection from currently transformed tree. The result is typed but not positioned.

    Attributes
    protected
    Definition Classes
    OuterPathTransformer
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def toString(): String

    Definition Classes
    AnyRef → Any
  40. def transform(tree: Global.Tree): Global.Tree

    The main transformation method

    The main transformation method

    Definition Classes
    ExplicitOuterTransformerOuterPathTransformerTypingTransformer → Transformer
  41. def transformCaseDefs(trees: List[Global.CaseDef]): List[Global.CaseDef]

    Definition Classes
    Transformer
  42. def transformIdents(trees: List[Global.Ident]): List[Global.Ident]

    Definition Classes
    Transformer
  43. def transformModifiers(mods: Global.Modifiers): Global.Modifiers

    Definition Classes
    Transformer
  44. def transformStats(stats: List[Global.Tree], exprOwner: Global.Symbol): List[Global.Tree]

    Definition Classes
    Transformer
  45. def transformTemplate(tree: Global.Template): Global.Template

    Definition Classes
    Transformer
  46. def transformTrees(trees: List[Global.Tree]): List[Global.Tree]

    Definition Classes
    Transformer
  47. def transformTypeDefs(trees: List[Global.TypeDef]): List[Global.TypeDef]

    Definition Classes
    Transformer
  48. def transformUnit(unit: Global.CompilationUnit): Unit

    The transformation method for whole compilation units

    The transformation method for whole compilation units

    Definition Classes
    ExplicitOuterTransformerTransformer
  49. def transformValDef(tree: Global.ValDef): Global.ValDef

    Definition Classes
    Transformer
  50. def transformValDefs(trees: List[Global.ValDef]): List[Global.ValDef]

    Definition Classes
    Transformer
  51. def transformValDefss(treess: List[List[Global.ValDef]]): List[List[Global.ValDef]]

    Definition Classes
    Transformer
  52. val treeCopy: Global.TreeCopier

    Definition Classes
    Transformer
  53. def typedPos(pos: Global.Position)(tree: Global.Tree): Global.Tree

    Attributes
    protected
    Definition Classes
    TypingTransformer
  54. final def wait(): Unit

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

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

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

    Implicit information
    This member is added by an implicit conversion from ExplicitOuterTransformer to ArrowAssoc[ExplicitOuterTransformer] 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 ExplicitOuterTransformer 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:
    (explicitOuterTransformer: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from ExplicitOuterTransformer 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:
    (explicitOuterTransformer: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: ExplicitOuterTransformer

    Implicit information
    This member is added by an implicit conversion from ExplicitOuterTransformer to ArrowAssoc[ExplicitOuterTransformer] 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:
    (explicitOuterTransformer: ArrowAssoc[ExplicitOuterTransformer]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: ExplicitOuterTransformer

    Implicit information
    This member is added by an implicit conversion from ExplicitOuterTransformer to Ensuring[ExplicitOuterTransformer] 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:
    (explicitOuterTransformer: Ensuring[ExplicitOuterTransformer]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from OuterPathTransformer

Inherited from ExplicitOuter.TypingTransformer

Inherited from Global.Transformer

Inherited from Global.Transformer

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from ExplicitOuterTransformer to StringAdd

Inherited by implicit conversion any2stringfmt from ExplicitOuterTransformer to StringFormat

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

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

Ungrouped