Alternatives of patterns.
The API that all alternatives support
An extractor class to create and pattern match with syntax Alternative(trees).
A tree that has an annotation attached to it.
The API that all annotateds support
An extractor class to create and pattern match with syntax Annotated(annot, arg).
Applied type <tpt> [ <args> ], eliminated by RefCheck
The API that all applied type trees support
An extractor class to create and pattern match with syntax AppliedTypeTree(tpt, args).
Value application
The API that all applies support
An extractor class to create and pattern match with syntax Apply(fun, args).
Assignment
The API that all assigns support
An extractor class to create and pattern match with syntax Assign(lhs, rhs).
Either an assignment or a named argument.
The API that all assigns support
An extractor class to create and pattern match with syntax AssignOrNamedArg(lhs, rhs).
Bind a variable to a rhs pattern.
The API that all binds support
An extractor class to create and pattern match with syntax Bind(name, body).
Block of expressions (semicolon separated expressions)
The API that all blocks support
An extractor class to create and pattern match with syntax Block(stats, expr).
Case clause in a pattern match.
The API that all case defs support
An extractor class to create and pattern match with syntax CaseDef(pat, guard, body).
A class definition.
The API that all class defs support
An extractor class to create and pattern match with syntax ClassDef(mods, name, tparams, impl).
Intersection type <parent1> with .
The API that all compound type trees support
An extractor class to create and pattern match with syntax CompoundTypeTree(templ).
A method or macro definition.
The API that all def defs support
An extractor class to create and pattern match with syntax DefDef(mods, name, tparams, vparamss, tpt, rhs).
A tree which defines a symbol-carrying entity.
The API that all def trees support
Existential type tree node
The API that all existential type trees support
An extractor class to create and pattern match with syntax ExistentialTypeTree(tpt, whereClauses).
Anonymous function, eliminated by compiler phase lambdalift
The API that all functions support
An extractor class to create and pattern match with syntax Function(vparams, body).
Common base class for Apply and TypeApply.
The API that all applies support
A reference to identifier name.
The API that all idents support
An extractor class to create and pattern match with syntax Ident(qual, name).
Conditional expression
The API that all ifs support
An extractor class to create and pattern match with syntax If(cond, thenp, elsep).
A common base class for class and object definitions.
The API that all impl defs support
Import clause
The API that all imports support
An extractor class to create and pattern match with syntax Import(expr, selectors).
Import selector
The API that all import selectors support
An extractor class to create and pattern match with syntax ImportSelector(name:, namePos, rename, renamePos).
A labelled expression.
The API that all label defs support
An extractor class to create and pattern match with syntax LabelDef(name, params, rhs).
Literal
The API that all literals support
An extractor class to create and pattern match with syntax Literal(value).
- Pattern matching expression (before compiler phase explicitouter before 2.
The API that all matches support
An extractor class to create and pattern match with syntax Match(selector, cases).
Common base class for all member definitions: types, classes, objects, packages, vals and vars, defs.
The API that all member defs support
The type of tree modifiers.
The API that all Modifiers support
An extractor class to create and pattern match with syntax Modifiers(flags, privateWithin, annotations).
An object definition, e.
The API that all module defs support
An extractor class to create and pattern match with syntax ModuleDef(mods, name, impl).
A tree with a name - effectively, a DefTree or RefTree.
The API that all name trees support
Object instantiation
The API that all news support
An extractor class to create and pattern match with syntax New(tpt).
A packaging, such as package pid { stats }
The API that all package defs support
An extractor class to create and pattern match with syntax PackageDef(pid, stats).
A tree which references a symbol-carrying entity.
The API that all ref trees support
Marks underlying reference to id as boxed.
The API that all references support
An extractor class to create and pattern match with syntax ReferenceToBoxed(ident).
Return expression
The API that all returns support
An extractor class to create and pattern match with syntax Return(expr).
A member selection <qualifier> .
The API that all selects support
An extractor class to create and pattern match with syntax Select(qual, name).
Type selection <qualifier> # <name>, eliminated by RefCheck
The API that all selects from type trees support
An extractor class to create and pattern match with syntax SelectFromTypeTree(qualifier, name).
Singleton type, eliminated by RefCheck
The API that all singleton type trees support
An extractor class to create and pattern match with syntax SingletonTypeTree(ref).
Repetition of pattern.
The API that all stars support
An extractor class to create and pattern match with syntax Star(elem).
Super reference, where qual is the corresponding this reference.
The API that all supers support
An extractor class to create and pattern match with syntax Super(qual, mix).
A tree with a mutable symbol field, initialized to NoSymbol.
The API that all sym trees support
Instantiation template of a class or trait
The API that all templates support
An extractor class to create and pattern match with syntax Template(parents, self, body).
A tree for a term.
The API that all term trees support
Self reference
The API that all thises support
An extractor class to create and pattern match with syntax This(qual).
Throw expression
The API that all tries support
An extractor class to create and pattern match with syntax Throw(expr).
A class that implement a default tree transformation strategy: breadth-first component-wise cloning.
A class that implement a default tree traversal strategy: breadth-first component-wise.
The type of Scala abstract syntax trees.
The API that all trees support.
The type of standard (lazy) tree copiers.
The API of a tree copier.
Try catch node
The API that all tries support
An extractor class to create and pattern match with syntax Try(block, catches, finalizer).
A tree for a type.
The API that all typ trees support
Explicit type application.
The API that all type applies support
An extractor class to create and pattern match with syntax TypeApply(fun, args).
Type bounds tree node
The API that all type bound trees support
An extractor class to create and pattern match with syntax TypeBoundsTree(lo, hi).
An abstract type, a type parameter, or a type alias.
The API that all type defs support
An extractor class to create and pattern match with syntax TypeDef(mods, name, tparams, rhs).
A synthetic tree holding an arbitrary type.
The API that all type trees support
An extractor class to create and pattern match with syntax TypeTree().
Type annotation, eliminated by compiler phase cleanup
The API that all typeds support
An extractor class to create and pattern match with syntax Typed(expr, tpt).
Used to represent unapply methods in pattern matching.
The API that all unapplies support
An extractor class to create and pattern match with syntax UnApply(fun, args).
Broadly speaking, a value definition.
The API that all val defs support
An extractor class to create and pattern match with syntax ValDef(mods, name, tpt, rhs).
A common base class for ValDefs and DefDefs.
The API that all val defs and def defs support
The constructor/extractor for Alternative instances.
A tag that preserves the identity of the Alternative abstract type from erasure.
A tag that preserves the identity of the Alternative abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for Annotated instances.
A tag that preserves the identity of the Annotated abstract type from erasure.
A tag that preserves the identity of the Annotated abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for AppliedTypeTree instances.
A tag that preserves the identity of the AppliedTypeTree abstract type from erasure.
A tag that preserves the identity of the AppliedTypeTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for Apply nodes.
The constructor/extractor for Apply instances.
0-1 argument list new, based on a type tree.
A tag that preserves the identity of the Apply abstract type from erasure.
A tag that preserves the identity of the Apply abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for Assign instances.
The constructor/extractor for AssignOrNamedArg instances.
A tag that preserves the identity of the AssignOrNamedArg abstract type from erasure.
A tag that preserves the identity of the AssignOrNamedArg abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the Assign abstract type from erasure.
A tag that preserves the identity of the Assign abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for Bind nodes.
The constructor/extractor for Bind instances.
A tag that preserves the identity of the Bind abstract type from erasure.
A tag that preserves the identity of the Bind abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for Block nodes.
A factory method for Block nodes.
Flattens directly nested blocks.
The constructor/extractor for Block instances.
A tag that preserves the identity of the Block abstract type from erasure.
A tag that preserves the identity of the Block abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for CaseDef nodes.
The constructor/extractor for CaseDef instances.
A tag that preserves the identity of the CaseDef abstract type from erasure.
A tag that preserves the identity of the CaseDef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for ClassDef nodes.
The constructor/extractor for ClassDef instances.
A tag that preserves the identity of the ClassDef abstract type from erasure.
A tag that preserves the identity of the ClassDef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for CompoundTypeTree instances.
A tag that preserves the identity of the CompoundTypeTree abstract type from erasure.
A tag that preserves the identity of the CompoundTypeTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for ValDef nodes.
A factory method for ValDef nodes.
A factory method for ValDef nodes.
A factory method for ValDef nodes.
A factory method for ValDef nodes.
The constructor/extractor for DefDef instances.
A tag that preserves the identity of the DefDef abstract type from erasure.
A tag that preserves the identity of the DefDef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the DefTree abstract type from erasure.
A tag that preserves the identity of the DefTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The empty tree
The constructor/extractor for ExistentialTypeTree instances.
A tag that preserves the identity of the ExistentialTypeTree abstract type from erasure.
A tag that preserves the identity of the ExistentialTypeTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for Function instances.
A tag that preserves the identity of the Function abstract type from erasure.
A tag that preserves the identity of the Function abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the GenericApply abstract type from erasure.
A tag that preserves the identity of the GenericApply abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for Ident nodes.
A factory method for Ident nodes.
The constructor/extractor for Ident instances.
A tag that preserves the identity of the Ident abstract type from erasure.
A tag that preserves the identity of the Ident abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for If instances.
A tag that preserves the identity of the If abstract type from erasure.
A tag that preserves the identity of the If abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the ImplDef abstract type from erasure.
A tag that preserves the identity of the ImplDef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for Import instances.
The constructor/extractor for ImportSelector instances.
A tag that preserves the identity of the ImportSelector abstract type from erasure.
A tag that preserves the identity of the ImportSelector abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the Import abstract type from erasure.
A tag that preserves the identity of the Import abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for LabelDef nodes.
The constructor/extractor for LabelDef instances.
A tag that preserves the identity of the LabelDef abstract type from erasure.
A tag that preserves the identity of the LabelDef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for Literal instances.
A tag that preserves the identity of the Literal abstract type from erasure.
A tag that preserves the identity of the Literal abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for Match instances.
A tag that preserves the identity of the Match abstract type from erasure.
A tag that preserves the identity of the Match abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the MemberDef abstract type from erasure.
A tag that preserves the identity of the MemberDef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for Modifiers instances.
A tag that preserves the identity of the Modifiers abstract type from erasure.
A tag that preserves the identity of the Modifiers abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for ModuleDef nodes.
The constructor/extractor for ModuleDef instances.
A tag that preserves the identity of the ModuleDef abstract type from erasure.
A tag that preserves the identity of the ModuleDef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the NameTree abstract type from erasure.
A tag that preserves the identity of the NameTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
0-1 argument list new, based on a symbol.
0-1 argument list new, based on a type.
Factory method for object creation new tpt(args_1)...(args_n)
A New(t, as) is expanded to: (new t).<init>(as)
The constructor/extractor for New instances.
A tag that preserves the identity of the New abstract type from erasure.
A tag that preserves the identity of the New abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for PackageDef instances.
A tag that preserves the identity of the PackageDef abstract type from erasure.
A tag that preserves the identity of the PackageDef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the RefTree abstract type from erasure.
A tag that preserves the identity of the RefTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for ReferenceToBoxed instances.
A tag that preserves the identity of the ReferenceToBoxed abstract type from erasure.
A tag that preserves the identity of the ReferenceToBoxed abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for Return instances.
A tag that preserves the identity of the Return abstract type from erasure.
A tag that preserves the identity of the Return abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for Select nodes.
A factory method for Select nodes.
A factory method for Select nodes.
The string name argument is assumed to represent a TermName.
The constructor/extractor for Select instances.
The constructor/extractor for SelectFromTypeTree instances.
A tag that preserves the identity of the SelectFromTypeTree abstract type from erasure.
A tag that preserves the identity of the SelectFromTypeTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the Select abstract type from erasure.
A tag that preserves the identity of the Select abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for SingletonTypeTree instances.
A tag that preserves the identity of the SingletonTypeTree abstract type from erasure.
A tag that preserves the identity of the SingletonTypeTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for Star instances.
A tag that preserves the identity of the Star abstract type from erasure.
A tag that preserves the identity of the Star abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for Super nodes.
The constructor/extractor for Super instances.
A tag that preserves the identity of the Super abstract type from erasure.
A tag that preserves the identity of the Super abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the SymTree abstract type from erasure.
A tag that preserves the identity of the SymTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for Template instances.
A tag that preserves the identity of the Template abstract type from erasure.
A tag that preserves the identity of the Template abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the TermTree abstract type from erasure.
A tag that preserves the identity of the TermTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for This nodes.
The constructor/extractor for This instances.
A tag that preserves the identity of the This abstract type from erasure.
A tag that preserves the identity of the This abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for Throw nodes.
The constructor/extractor for Throw instances.
A tag that preserves the identity of the Throw abstract type from erasure.
A tag that preserves the identity of the Throw abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the Tree abstract type from erasure.
A tag that preserves the identity of the Tree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for Try nodes.
The constructor/extractor for Try instances.
A tag that preserves the identity of the Try abstract type from erasure.
A tag that preserves the identity of the Try abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the TypTree abstract type from erasure.
A tag that preserves the identity of the TypTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for TypeApply instances.
A tag that preserves the identity of the TypeApply abstract type from erasure.
A tag that preserves the identity of the TypeApply abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for TypeBoundsTree instances.
A tag that preserves the identity of the TypeBoundsTree abstract type from erasure.
A tag that preserves the identity of the TypeBoundsTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for TypeDef nodes.
A factory method for TypeDef nodes.
The constructor/extractor for TypeDef instances.
A tag that preserves the identity of the TypeDef abstract type from erasure.
A tag that preserves the identity of the TypeDef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for TypeTree nodes.
The constructor/extractor for TypeTree instances.
A tag that preserves the identity of the TypeTree abstract type from erasure.
A tag that preserves the identity of the TypeTree abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for Typed instances.
A tag that preserves the identity of the Typed abstract type from erasure.
A tag that preserves the identity of the Typed abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/extractor for UnApply instances.
A tag that preserves the identity of the UnApply abstract type from erasure.
A tag that preserves the identity of the UnApply abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A factory method for ValDef nodes.
A factory method for ValDef nodes.
The constructor/extractor for ValDef instances.
A tag that preserves the identity of the ValDef abstract type from erasure.
A tag that preserves the identity of the ValDef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the ValOrDefDef abstract type from erasure.
A tag that preserves the identity of the ValOrDefDef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
An empty deferred value definition corresponding to:
val _: _
This is used as a placeholder in the self parameter Template if there is
no definition of a self value of self type.
Creates a lazy tree copier.
Creates a strict tree copier.
Obtains string representation of a tree
Obtains string representation of a tree
Test two objects for inequality.
Test two objects for inequality.
true if !(this == that), false otherwise.
Equivalent to x.hashCode except for boxed numeric types and null.
Equivalent to x.hashCode except for boxed numeric types and null.
For numerics, it returns a hash value which is consistent
with value equality: if two value type instances compare
as true, then ## will produce the same hash value for each
of them.
For null returns a hashcode where null.hashCode throws a
NullPointerException.
a hash value consistent with ==
Test two objects for equality.
Test two objects for equality.
The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).
true if the receiver object is equivalent to the argument; false otherwise.
The factory for Modifiers instances.
The factory for Modifiers instances.
An empty Modifiers object: no flags, empty visibility annotation and no Scala annotations.
Cast the receiver object to be of type T0.
Cast the receiver object to be of type T0.
Note that the success of a cast at runtime is modulo Scala's erasure semantics.
Therefore the expression 1.asInstanceOf[String] will throw a ClassCastException at
runtime, while the expression List(1).asInstanceOf[List[String]] will not.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the requested type.
the receiver object.
if the receiver object is not an instance of the erasure of type T0.
Create a copy of the receiver object.
Create a copy of the receiver object.
The default implementation of the clone method is platform dependent.
a copy of the receiver object.
not specified by SLS as a member of AnyRef
Tests whether the argument (arg0) is a reference to the receiver object (this).
Tests whether the argument (arg0) is a reference to the receiver object (this).
The eq method implements an equivalence relation on
non-null instances of AnyRef, and has three additional properties:
x and y of type AnyRef, multiple invocations of
x.eq(y) consistently returns true or consistently returns false.x of type AnyRef, x.eq(null) and null.eq(x) returns false.null.eq(null) returns true. When overriding the equals or hashCode methods, it is important to ensure that their behavior is
consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they
should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).
true if the argument is a reference to the receiver object; false otherwise.
The equality method for reference types.
Called by the garbage collector on the receiver object when there are no more references to the object.
Called by the garbage collector on the receiver object when there are no more references to the object.
The details of when and if the finalize method is invoked, as
well as the interaction between finalize and non-local returns
and exceptions, are all platform dependent.
not specified by SLS as a member of AnyRef
Returns string formatted according to given format string.
Returns string formatted according to given format string.
Format strings are as for String.format
(@see java.lang.String.format).
A representation that corresponds to the dynamic class of the receiver object.
A representation that corresponds to the dynamic class of the receiver object.
The nature of the representation is platform dependent.
a representation that corresponds to the dynamic class of the receiver object.
not specified by SLS as a member of AnyRef
The hashCode method for reference types.
Test whether the dynamic type of the receiver object is T0.
Test whether the dynamic type of the receiver object is T0.
Note that the result of the test is modulo Scala's erasure semantics.
Therefore the expression 1.isInstanceOf[String] will return false, while the
expression List(1).isInstanceOf[List[String]] will return true.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the specified type.
true if the receiver object is an instance of erasure of type T0; false otherwise.
Delegates the transformation strategy to scala.reflect.internal.Trees,
because pattern matching on abstract types we have here degrades performance.
Delegates the transformation strategy to scala.reflect.internal.Trees,
because pattern matching on abstract types we have here degrades performance.
Delegates the traversal strategy to scala.reflect.internal.Trees,
because pattern matching on abstract types we have here degrades performance.
Delegates the traversal strategy to scala.reflect.internal.Trees,
because pattern matching on abstract types we have here degrades performance.
Equivalent to !(this eq that).
Equivalent to !(this eq that).
true if the argument is not a reference to the receiver object; false otherwise.
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
Creates a String representation of this object.
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
a String representation of the object.
The standard (lazy) tree copier.
Provides an extension hook for the transformation strategy.
Provides an extension hook for the transformation strategy. Future-proofs against new node types.
Provides an extension hook for the traversal strategy.
Provides an extension hook for the traversal strategy. Future-proofs against new node types.
(trees: StringAdd).self
(trees: StringFormat).self
(trees: ArrowAssoc[Trees]).x
(Since version 2.10.0) Use leftOfArrow instead
(trees: Ensuring[Trees]).x
(Since version 2.10.0) Use resultOfEnsuring instead
The methods available for each reflection entity, without the implementation. Since the reflection entities are later overridden by runtime reflection and macros, their API counterparts guarantee a minimum set of methods that are implemented.
Extractors provide the machinery necessary to allow pattern matching and construction of reflection entities that is similar to case classes, although the entities are only abstract types that are later overridden.
Implicit values that provide ClassTags for the reflection
classes. These are abstract in the interface but are later filled in to provide ClassTags
for the either the runtime reflection or macros entities, depending on the use.
EXPERIMENTAL
This trait defines the node types used in Scala abstract syntax trees (AST) and operations on them.
Trees are the basis for Scala's abstract syntax that is used to represent programs. They are also called abstract syntax trees and commonly abbreviated as ASTs.
In Scala reflection, APIs that produce or use
Trees are:Trees are immutable, except for three fields pos, symbol, and tpe, which are assigned when a tree is typechecked to attribute it with the information gathered by the typechecker.
Examples
The following creates an AST representing a literal 5 in Scala source code:
Literal(Constant(5))The following creates an AST representing
print("Hello World"):The following creates an AST from a literal 5, and then uses
showRawto print it in a readable format.For more information about
Trees, see the Reflection Guide: Symbols, Trees, Types.