Scala Reflection Library2.12.2-20170504-135222-21d12e9 < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package scala
  Definition Classes
    root
-  package reflect
  Definition Classes
    scala
-  package api

  EXPERIMENTAL

  EXPERIMENTAL

  The Scala Reflection API (located in scala-reflect.jar).

  In Scala 2.10.0, the Scala Reflection API and its implementation have an "experimental" status. This means that the API and the docs are not complete and can be changed in binary- and source-incompatible manner in 2.10.1. This also means that the implementation has some known issues.

  The following types are the backbone of the Scala Reflection API, and serve as a good starting point for information about Scala Reflection:

  - scala.reflect.api.Symbols
  - scala.reflect.api.Types
  - scala.reflect.api.Mirrors
  - scala.reflect.api.Universe

  For more information about Scala Reflection, see the Reflection Guide

  Definition Classes
    reflect
-  trait Exprs extends AnyRef

  EXPERIMENTAL

  EXPERIMENTAL

  A trait that defines strongly-typed tree wrappers and operations on them for use in Scala Reflection.

  `Expr` wraps an abstract syntax tree (scala.reflect.api.Trees#Tree) and tags it with its type (scala.reflect.api.Types#Type).

  Usually `Expr`s are created via scala.reflect.api.Universe#reify, in which case a compiler produces a scala.reflect.api.TreeCreator for the provided expression and also creates a complementary scala.reflect.api.TypeTags#WeakTypeTag that corresponds to the type of that expression.

  `Expr`s can also be created manually via the `Expr` companion object, but then the burden of providing a `TreeCreator` lies on the programmer. Compile-time reflection via macros, as described in scala.reflect.macros.Aliases, provides an easier way to instantiate exprs manually. Manual creation, however, is very rarely needed when working with runtime reflection.

  `Expr` can be migrated from one mirror to another by using the `in` method. Migration means that all symbolic references to classes/objects/packages in the expression are re-resolved within the new mirror (typically using that mirror's classloader). The default universe of an `Expr` is typically scala.reflect.runtime#universe, the default mirror is typically scala.reflect.runtime#currentMirror.

  Definition Classes
    api
- Expr

o

scala.reflect.api.Exprs

# Expr 

###
Companion trait Expr

#### object Expr extends Serializable

Constructor/Extractor for Expr.

Can be useful, when having a tree and wanting to splice it in reify call, in which case the tree first needs to be wrapped in an expr.

The main source of information about exprs is the scala.reflect.api.Exprs page.

Source
  Exprs.scala

Linear Supertypes
Serializable, java.io.Serializable, AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. Expr
2. Serializable
3. Serializable
4. AnyRef
5. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  def apply[T](mirror: Mirror[Exprs.this.type], treec: TreeCreator)(implicit arg0: Universe.WeakTypeTag[T]): Universe.Expr[T]
5.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
6.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( ... )
7.  final def eq(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef
8.  def equals(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
9.  def finalize(): Unit
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( classOf[java.lang.Throwable] )
10.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
11.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
12.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
13.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
14.  final def notify(): Unit
    Definition Classes
      AnyRef
15.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
16.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
17.  def toString(): String
    Definition Classes
      AnyRef → Any
18.  def unapply[T](expr: Universe.Expr[T]): Option[Universe.Tree]
19.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
20.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
21.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

### Inherited from Serializable

### Inherited from java.io.Serializable

### Inherited from AnyRef

### Inherited from Any

### Ungrouped