Scala Compiler2.13.6 < Back


# Packages

-  package root

  The Scala compiler and reflection APIs.

  The Scala compiler and reflection APIs.

  Definition Classes
    root
-  package scala
  Definition Classes
    root
-  package tools
  Definition Classes
    scala
-  package nsc
  Definition Classes
    tools
-  package tasty
  Definition Classes
    nsc
-  class TreeUnpickler[Tasty <: TastyUniverse] extends AnyRef

  `TreeUnpickler` is responsible for traversing all trees in the "ASTs" section of a TASTy file, which represent the definitions inside the classfile associated with the root class/module.

  `TreeUnpickler` is responsible for traversing all trees in the "ASTs" section of a TASTy file, which represent the definitions inside the classfile associated with the root class/module. `TreeUnpickler` will enter the public api of the TASTy file into the symbolTable of `TastyUniverse`. "Public API" includes annotations when they are simple trees.

  Where possible, `TreeUnpickler` should not directly manipulate values created by the symbolTable, but use operations provided by `TastyUniverse`

  Definition Classes
    tasty
- Completer
- OwnerTree
- TreeReader

c

scala.tools.nsc.tasty.TreeUnpickler

# TreeReader

###

#### class TreeReader extends AnyRef

Source
  TreeUnpickler.scala

Linear Supertypes
AnyRef, Any
Type Hierarchy

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. TreeReader
2. AnyRef
3. Any

Implicitly

1. by SafeEq
2. by any2stringadd
3. by StringFormat
4. by Ensuring
5. by ArrowAssoc

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Instance Constructors

1.  new TreeReader(reader: TastyReader)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def !==(u: TreeReader): Boolean
   Implicit
     This member is added by an implicit conversion from TreeReader toSafeEq[TreeReader] performed by method SafeEq in scala.tools.nsc.tasty.
   Definition Classes
     SafeEq
   Annotations
     @inline()
3.  final def ##: Int
   Definition Classes
     AnyRef → Any
4.  def +(other: String): String
   Implicit
     This member is added by an implicit conversion from TreeReader toany2stringadd[TreeReader] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd
5.  def ->[B](y: B): (TreeReader, B)
   Implicit
     This member is added by an implicit conversion from TreeReader toArrowAssoc[TreeReader] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()
6.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
7.  final def ===(u: TreeReader): Boolean
   Implicit
     This member is added by an implicit conversion from TreeReader toSafeEq[TreeReader] performed by method SafeEq in scala.tools.nsc.tasty.
   Definition Classes
     SafeEq
   Annotations
     @inline()
8.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
9.  def clone(): AnyRef
   Attributes
     protected[lang]
   Definition Classes
     AnyRef
   Annotations
     @throws(classOf[java.lang.CloneNotSupportedException]) @native()
10.  def createMemberSymbol()(implicit ctx: Tasty.Context): Tasty.Symbol

    Create symbol of member definition or parameter node and enter in symAtAddr map

    Create symbol of member definition or parameter node and enter in symAtAddr map

    returns

      the created symbol

11.  def createSymbol()(implicit ctx: Tasty.Context): Tasty.Symbol

    Create symbol of definition node and enter in symAtAddr map

    Create symbol of definition node and enter in symAtAddr map

    returns

      the created symbol

12.  def ensuring(cond: (TreeReader) => Boolean, msg: => Any): TreeReader
    Implicit
      This member is added by an implicit conversion from TreeReader toEnsuring[TreeReader] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
13.  def ensuring(cond: (TreeReader) => Boolean): TreeReader
    Implicit
      This member is added by an implicit conversion from TreeReader toEnsuring[TreeReader] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
14.  def ensuring(cond: Boolean, msg: => Any): TreeReader
    Implicit
      This member is added by an implicit conversion from TreeReader toEnsuring[TreeReader] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
15.  def ensuring(cond: Boolean): TreeReader
    Implicit
      This member is added by an implicit conversion from TreeReader toEnsuring[TreeReader] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
16.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
17.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
18.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
19.  def fork: TreeReader
20.  def forkAt(start: Addr): TreeReader
21.  def formatted(fmtstr: String): String
    Implicit
      This member is added by an implicit conversion from TreeReader toStringFormat[TreeReader] performed by method StringFormat in scala.Predef.
    Definition Classes
      StringFormat
    Annotations
      @inline()
22.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
23.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
24.  def indexParams(tag: Int)(implicit ctx: Tasty.Context): Unit

    Create symbols the longest consecutive sequence of parameters with given `tag` starting at current address.

25.  def indexStats(end: Addr)(implicit ctx: Tasty.Context): Unit

    Create symbols for the definitions in the statement sequence between current address and `end`.

26.  def indexTemplateParams()(implicit ctx: Tasty.Context): Unit

    Create symbols for all type and value parameters of template starting at current address.

27.  def isAbstractType(ttag: Int)(implicit ctx: Tasty.Context): Boolean
28.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
29.  def isTopLevel: Boolean
30.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
31.  def nextUnsharedTag: Int

    The next tag, following through SHARED tags

32.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
33.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
34.  def processPackage[T](op: (Addr) => (Tasty.Context) => T)(implicit ctx: Tasty.Context): T

    Process package with given operation `op`.

    Process package with given operation `op`. The operation takes as arguments

    - an end address,
    - a context which has the processed package as owner
35.  def readConstant(tag: Int)(implicit ctx: Tasty.Context): Tasty.Constant
36.  def readIndexedMember()(implicit ctx: Tasty.Context): NoCycle
37.  def readIndexedParams[T <: MaybeCycle](tag: Int)(implicit ctx: Tasty.Context): List[T]
38.  def readIndexedStatAsSym(exprOwner: Tasty.Symbol)(implicit ctx: Tasty.Context): NoCycle
39.  def readIndexedStatsAsSyms(exprOwner: Tasty.Symbol, end: Addr)(implicit ctx: Tasty.Context): List[NoCycle]
40.  def readLaterWithOwner[T <: AnyRef](end: Addr, op: (TreeReader) => (Tasty.Context) => T)(implicit ctx: Tasty.Context): (Tasty.Symbol) => (Tasty.Context) => T
41.  def readModifiers[WithinType](end: Addr, readAnnot: (Tasty.Context) => Tasty.DeferredAnnotation, readWithin: (Tasty.Context) => WithinType, defaultWithin: WithinType)(implicit ctx: Tasty.Context): (TastyFlagSet, List[Tasty.DeferredAnnotation], WithinType)

    Read modifier list into triplet of flags, annotations and a privateWithin boundary symbol.

42.  def readParamNamesAndMods(end: Addr): (List[TastyName], TastyFlagSet)

    Read names in an interleaved sequence of types/bounds and (parameter) names, possibly followed by a sequence of modifiers.

43.  def readParamTypes[T <: Tasty.Type](n: Int)(implicit ctx: Tasty.Context): List[T]

    Read `n` parameter types or bounds which are interleaved with names

44.  def readParams[T <: MaybeCycle](tag: Int)(implicit ctx: Tasty.Context): List[T]
45.  def readStatsAsSyms(exprOwner: Tasty.Symbol, end: Addr)(implicit ctx: Tasty.Context): List[NoCycle]
46.  def readSymRef()(implicit ctx: Tasty.Context): Tasty.Symbol

    Read reference to definition and return symbol created at that definition

47.  def readTastyName(): TastyName
48.  def readTerm()(implicit ctx: Tasty.Context): Tasty.Tree
49.  def readTpt()(implicit ctx: Tasty.Context): Tasty.Tree
50.  def readType()(implicit ctx: Tasty.Context): Tasty.Type

    Read a type

51.  def readTypeRef(): Tasty.Type
52.  val reader: TastyReader
53.  def scanTree(buf: ListBuffer[OwnerTree], mode: MemberDefMode): Unit

    Record all directly nested definitions and templates in current tree as `OwnerTree`s in `buf`.

    Record all directly nested definitions and templates in current tree as `OwnerTree`s in `buf`. A complication concerns member definitions. These are lexically nested in a Template node, but need to be listed separately in the OwnerTree of the enclosing class in order not to confuse owner chains.

54.  def scanTrees(buf: ListBuffer[OwnerTree], end: Addr, mode: MemberDefMode): Unit

    Record all directly nested definitions and templates between current address and `end` as `OwnerTree`s in `buf`

55.  def skipParams(): Unit
56.  def skipTree(): Unit
57.  def skipTree(tag: Int): Unit
58.  def symbolAt(addr: Addr)(implicit ctx: Tasty.Context): Tasty.Symbol

    The symbol at given address; create a new one if none exists yet

59.  def symbolAtCurrent()(implicit ctx: Tasty.Context): Tasty.Symbol

    The symbol defined by current definition

60.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
61.  def toString(): String
    Definition Classes
      AnyRef → Any
62.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
63.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
64.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()

### Deprecated Value Members

1.  def →[B](y: B): (TreeReader, B)
   Implicit
     This member is added by an implicit conversion from TreeReader toArrowAssoc[TreeReader] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @deprecated
   Deprecated

     (Since version 2.13.0) Use `->` instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion SafeEq fromTreeReader to SafeEq[TreeReader]

### Inherited by implicit conversion any2stringadd fromTreeReader to any2stringadd[TreeReader]

### Inherited by implicit conversion StringFormat fromTreeReader to StringFormat[TreeReader]

### Inherited by implicit conversion Ensuring fromTreeReader to Ensuring[TreeReader]

### Inherited by implicit conversion ArrowAssoc fromTreeReader to ArrowAssoc[TreeReader]

### Ungrouped