Packages

c

scala.reflect.api.Trees

TemplateExtractor

abstract class TemplateExtractor extends AnyRef

An extractor class to create and pattern match with syntax Template(parents, self, body). This AST node corresponds to the following Scala code:

extends parents { self => body }

In case when the self-type annotation is missing, it is represented as an empty value definition with nme.WILDCARD as name and NoType as type.

The symbol of a template is a local dummy. @see Symbol.newLocalDummy The owner of the local dummy is the enclosing trait or class. The local dummy is itself the owner of any local blocks. For example:

class C { def foo { // owner is C def bar // owner is local dummy } }

Source
Trees.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TemplateExtractor
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TemplateExtractor()

Abstract Value Members

  1. abstract def apply(parents: List[Universe.Tree], self: Universe.ValDef, body: List[Universe.Tree]): Universe.Template
  2. abstract def unapply(template: Universe.Template): Option[(List[Universe.Tree], Universe.ValDef, List[Universe.Tree])]