Scala Reflection Library2.12.5 < Back
 

# Packages

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

  EXPERIMENTAL

  EXPERIMENTAL

  The base package for Scala macros.

  Macros are functions that are called by the compiler during compilation. Within these functions the programmer has access to compiler APIs. For example, it is possible to generate, analyze and typecheck code.

  See the Macros Guide on how to get started with Scala macros.

  Definition Classes
    reflect
-  abstract class Universe extends api.Universe

  EXPERIMENTAL

  EXPERIMENTAL

  The refinement of scala.reflect.api.Universe for the use by macro writers.

  This universe provides mutability for reflection artifacts (e.g. macros can change types of compiler trees, add annotation to symbols representing definitions, etc) and exposes some internal compiler functionality such as `Symbol.deSkolemize` or `Tree.attachments`.

  Definition Classes
    macros
- Alternative
- AlternativeApi
- AlternativeExtractor
- Annotated
- AnnotatedApi
- AnnotatedExtractor
- AnnotatedType
- AnnotatedTypeApi
- AnnotatedTypeExtractor
- Annotation
- AnnotationApi
- AnnotationExtractor
- AppliedTypeTree
- AppliedTypeTreeApi
- AppliedTypeTreeExtractor
- Apply
- ApplyApi
- ApplyExtractor
- ArrayArgument
- ArrayArgumentApi
- ArrayArgumentExtractor
- Assign
- AssignApi
- AssignExtractor
- AssignOrNamedArg
- AssignOrNamedArgApi
- AssignOrNamedArgExtractor
- Bind
- BindApi
- BindExtractor
- Block
- BlockApi
- BlockExtractor
- BooleanFlag
- BoundedWildcardType
- BoundedWildcardTypeApi
- BoundedWildcardTypeExtractor
- CaseDef
- CaseDefApi
- CaseDefExtractor
- ClassDef
- ClassDefApi
- ClassDefExtractor
- ClassInfoType
- ClassInfoTypeApi
- ClassInfoTypeExtractor
- ClassMirror
- ClassSymbol
- ClassSymbolApi
- Compat
- CompatApi
- CompatToken
- CompilationUnit
- CompilationUnitContextApi
- CompoundType
- CompoundTypeApi
- CompoundTypeTree
- CompoundTypeTreeApi
- CompoundTypeTreeExtractor
- Constant
- ConstantApi
- ConstantExtractor
- ConstantType
- ConstantTypeApi
- ConstantTypeExtractor
- DefDef
- DefDefApi
- DefDefExtractor
- DefTree
- DefTreeApi
- DefinitionsApi
- ExistentialType
- ExistentialTypeApi
- ExistentialTypeExtractor
- ExistentialTypeTree
- ExistentialTypeTreeApi
- ExistentialTypeTreeExtractor
- Expr
- FieldMirror
- FlagOps
- FlagSet
- FlagValues
- FreeTermSymbol
- FreeTermSymbolApi
- FreeTypeSymbol
- FreeTypeSymbolApi
- Function
- FunctionApi
- FunctionExtractor
- GenericApply
- GenericApplyApi
- Ident
- IdentApi
- IdentExtractor
- If
- IfApi
- IfExtractor
- ImplDef
- ImplDefApi
- Import
- ImportApi
- ImportExtractor
- ImportSelector
- ImportSelectorApi
- ImportSelectorExtractor
- Importer
- InstanceMirror
- Internal
- InternalApi
- JavaArgument
- JavaArgumentApi
- LabelDef
- LabelDefApi
- LabelDefExtractor
- Liftable
- Literal
- LiteralApi
- LiteralArgument
- LiteralArgumentApi
- LiteralArgumentExtractor
- LiteralExtractor
- MacroCompatApi
- MacroInternalApi
- Match
- MatchApi
- MatchExtractor
- MemberDef
- MemberDefApi
- MemberScope
- MemberScopeApi
- MethodMirror
- MethodSymbol
- MethodSymbolApi
- MethodType
- MethodTypeApi
- MethodTypeExtractor
- Mirror
- Modifiers
- ModifiersApi
- ModifiersExtractor
- ModuleDef
- ModuleDefApi
- ModuleDefExtractor
- ModuleMirror
- ModuleSymbol
- ModuleSymbolApi
- Name
- NameApi
- NameTree
- NameTreeApi
- NamesApi
- NestedArgument
- NestedArgumentApi
- NestedArgumentExtractor
- New
- NewApi
- NewExtractor
- NullaryMethodType
- NullaryMethodTypeApi
- NullaryMethodTypeExtractor
- PackageDef
- PackageDefApi
- PackageDefExtractor
- PolyType
- PolyTypeApi
- PolyTypeExtractor
- Position
- Quasiquote
- RefTree
- RefTreeApi
- RefTreeExtractor
- ReferenceToBoxed
- ReferenceToBoxedApi
- ReferenceToBoxedExtractor
- RefinedType
- RefinedTypeApi
- RefinedTypeExtractor
- ReflectiveMirror
- ReificationSupportApi
- Return
- ReturnApi
- ReturnExtractor
- Run
- RunContextApi
- RuntimeClass
- RuntimeClassApi
- RuntimeMirror
- Scope
- ScopeApi
- Select
- SelectApi
- SelectExtractor
- SelectFromTypeTree
- SelectFromTypeTreeApi
- SelectFromTypeTreeExtractor
- SingleType
- SingleTypeApi
- SingleTypeExtractor
- SingletonType
- SingletonTypeApi
- SingletonTypeTree
- SingletonTypeTreeApi
- SingletonTypeTreeExtractor
- StandardLiftableInstances
- StandardTypes
- StandardUnliftableInstances
- Star
- StarApi
- StarExtractor
- Super
- SuperApi
- SuperExtractor
- SuperType
- SuperTypeApi
- SuperTypeExtractor
- SymTree
- SymTreeApi
- Symbol
- SymbolApi
- Template
- TemplateApi
- TemplateExtractor
- TemplateMirror
- TermName
- TermNameApi
- TermNameExtractor
- TermNamesApi
- TermSymbol
- TermSymbolApi
- TermTree
- TermTreeApi
- This
- ThisApi
- ThisExtractor
- ThisType
- ThisTypeApi
- ThisTypeExtractor
- Throw
- ThrowApi
- ThrowExtractor
- Transformer
- Traverser
- Tree
- TreeApi
- TreeCopier
- TreeCopierOps
- TreeGen
- TreePrinter
- Try
- TryApi
- TryExtractor
- TypTree
- TypTreeApi
- Type
- TypeApi
- TypeApply
- TypeApplyApi
- TypeApplyExtractor
- TypeBounds
- TypeBoundsApi
- TypeBoundsExtractor
- TypeBoundsTree
- TypeBoundsTreeApi
- TypeBoundsTreeExtractor
- TypeDef
- TypeDefApi
- TypeDefExtractor
- TypeName
- TypeNameApi
- TypeNameExtractor
- TypeNamesApi
- TypeRef
- TypeRefApi
- TypeRefExtractor
- TypeSymbol
- TypeSymbolApi
- TypeTag
- TypeTree
- TypeTreeApi
- TypeTreeExtractor
- Typed
- TypedApi
- TypedExtractor
- UnApply
- UnApplyApi
- UnApplyExtractor
- Unliftable
- ValDef
- ValDefApi
- ValDefExtractor
- ValOrDefDef
- ValOrDefDefApi
- WeakTypeTag

a

scala.reflect.macros.Universe

# CompilationUnit 

###

#### abstract type CompilationUnit <: CompilationUnitContextApi

The type of compilation units.

Annotations
  @deprecated
Deprecated

  (Since version 2.11.0) c.enclosingTree-style APIs are now deprecated; consult the scaladoc for more information

Source
  Universe.scala
See also

  scala.reflect.macros.Enclosures

Linear Supertypes
AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. CompilationUnit
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Abstract Value Members

1.  abstract def body: Universe.Tree

   The AST that corresponds to this compilation unit.

   The AST that corresponds to this compilation unit.

   Definition Classes
     CompilationUnitContextApi
   Annotations
     @deprecated
   Deprecated

     (Since version 2.11.0) c.enclosingTree-style APIs are now deprecated; consult the scaladoc for more information

2.  abstract def source: SourceFile

   Source file corresponding to this compilation unit.

   Source file corresponding to this compilation unit.

   Exposes information about the file as a part of a real or virtual file system along with the contents of that file.

   The return type is `scala.reflect.io.AbstractFile`, which belongs to an experimental part of Scala reflection. It should not be used unless you know what you are doing. In subsequent releases, this API will be refined and exposed as a part of scala.reflect.api.

   Definition Classes
     CompilationUnitContextApi
   Annotations
     @deprecated
   Deprecated

     (Since version 2.11.0) c.enclosingTree-style APIs are now deprecated; consult the scaladoc for more information

### Concrete 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.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
5.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @native() @throws( ... )
6.  final def eq(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef
7.  def equals(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
8.  def finalize(): Unit
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( classOf[java.lang.Throwable] )
9.  final def getClass(): Class[_]
   Definition Classes
     AnyRef → Any
   Annotations
     @native()
10.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
11.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
12.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
13.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
14.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
15.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
16.  def toString(): String
    Definition Classes
      AnyRef → Any
17.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
18.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
19.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )

### Inherited from AnyRef

### Inherited from Any

### Ungrouped