final class TreeTypeMap
extends TreeMap

A map that applies three functions and a substitution together to a tree and makes sure they are coordinated so that the result is well-typed. The functions are

Constructors

TreeTypeMap ( typeMap: Type => Type , treeMap: Tree => Tree , oldOwners: List [ Symbol ] , newOwners: List [ Symbol ] , substFrom: List [ Symbol ] , substTo: List [ Symbol ] )
TreeTypeMap ( implicit ctx: Context )

Members

[+] private implicit val ctx : Context
[+] private val mapOwnerThis : TypeMap

Replace occurrences of This(oldOwner) in some prefix of a type by the corresponding This(newOwner).

Replace occurrences of This(oldOwner) in some prefix of a type by the corresponding This(newOwner).

[+] val newOwners : List [ Symbol ]
[+] val oldOwners : List [ Symbol ]
[+] val substFrom : List [ Symbol ]
[+] val substTo : List [ Symbol ]
[+] val treeMap : Tree => Tree
[+] val typeMap : Type => Type
[+] def apply ( tree: ThisTree ) : ThisTree
[+] def apply ( annot: Annotation ) : Annotation
[+] def mapOwner ( sym: Symbol ) : Symbol

If sym is one of oldOwners, replace by corresponding symbol in newOwners

If sym is one of oldOwners, replace by corresponding symbol in newOwners

[+] def mapType ( tp: Type ) : Type
[+] override def transform ( tree: Tree ) ( implicit ctx: Context ) : Tree
[+] private def transformDefs ( trees: List [ TT ] ) ( implicit ctx: Context ) : ( TreeTypeMap, List [ TT ] )
[+] override def transformStats ( trees: List [ Tree ] ) ( implicit ctx: Context ) : List [ Tree ]
[+] private def transformVParamss ( vparamss: List [ List [ ValDef ] ] ) : ( TreeTypeMap, List [ List [ ValDef ] ] )
[+] private def updateDecls ( prevStats: List [ Tree ] , newStats: List [ Tree ] ) : Unit
[+] def withMappedSyms ( syms: List [ Symbol ] , mapAlways: Boolean ) : TreeTypeMap

Apply typeMap and ownerMap to given symbols syms and return a treemap that contains the substitution between original and mapped symbols.

Apply typeMap and ownerMap to given symbols syms and return a treemap that contains the substitution between original and mapped symbols.

[+] def withMappedSyms ( syms: List [ Symbol ] , mapped: List [ Symbol ] ) : TreeTypeMap

The tree map with the substitution between originals syms and mapped symbols mapped. Also goes into mapped classes and substitutes their declarations.

The tree map with the substitution between originals syms and mapped symbols mapped. Also goes into mapped classes and substitutes their declarations.

[+] def withMappedSyms$default$2 : Boolean

Apply typeMap and ownerMap to given symbols syms and return a treemap that contains the substitution between original and mapped symbols.

Apply typeMap and ownerMap to given symbols syms and return a treemap that contains the substitution between original and mapped symbols.

[+] def withSubstitution ( from: List [ Symbol ] , to: List [ Symbol ] ) : TreeTypeMap

The current tree map composed with a substitution [from -> to]

The current tree map composed with a substitution [from -> to]