If an implicit value of type u.
Alternatives of patterns, eliminated by explicitouter, except for occurrences in encoded Switch stmt (=remaining Match(CaseDef(.
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).
.
The API that all annotated types support
An extractor class to create and pattern match with syntax
AnnotatedType(annotations, underlying, selfsym).
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
Dynamic value application.
The API that all apply dynamics support
An extractor class to create and pattern match with syntax ApplyDynamic(qual, args).
An extractor class to create and pattern match with syntax Apply(fun, args).
Array of expressions, needs to be translated in backend.
The API that all array values support
An extractor class to create and pattern match with syntax ArrayValue(elemtpt, elems).
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 of a variable to a rhs pattern, eliminated by explicitouter Eliminated by patmat/explicitouter.
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).
.
The API that all this types support
Case clause in a pattern match, eliminated during explicitouter (except for occurrences in switch statements).
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).
.
The API that all class info types support
An extractor class to create and pattern match with syntax ClassInfo(parents, decls, clazz)
Here, parents is the list of parent types of the class, decls is the scope
containing all declarations in the class, and clazz is the symbol of the class
itself.
A mirror that reflects the instance parts of a runtime class
The abstract type of class symbols representing class and trait definitions
The API of class symbols
The base API that all class symbols support
A subtype of Type representing refined types as well as ClassInfo signatures.
A subtype of Type representing refined types as well as ClassInfo signatures.
Intersection type <parent1> with .
The API that all compound type trees support
An extractor class to create and pattern match with syntax CompoundTypeTree(templ).
.
The API that all constant types support
An extractor class to create and pattern match with syntax ConstantType(constant)
Here, constant is the constant value represented by the type.
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
.
The API that all existential types support
An extractor class to create and pattern match with syntax
ExistentialType(quantified, underlying).
Document me!
The API that all existential type trees support
An extractor class to create and pattern match with syntax ExistentialTypeTree(tpt, whereClauses).
An expression tree tagged with its type
A mirror that reflects a field
The abstract type of free terms introduced by reification
The API of free term symbols
The base API that all free term symbols support
The abstract type of free types introduced by reification
The API of free term symbols
The base API that all free type symbols support
Anonymous function, eliminated by 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.
Common base class for Apply and TypeApply. This could in principle be a SymTree, but whether or not a Tree is a SymTree isn't used to settle any interesting questions, and it would add a useless field to all the instances (useless, since GenericApply forwards to the underlying fun.)
The API that all applies support
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 mirror that reflects a runtime value
A labelled expression.
A labelled expression. Not expressible in language syntax, but generated by the compiler to simulate while/do-while loops, and also by the pattern matcher.
The label acts much like a nested function, where params represents
the incoming parameters. The symbol given to the LabelDef should have
a MethodType, as if it were a nested function.
Jumps are apply nodes attributed with a label's symbol. The arguments from the apply node will be passed to the label and assigned to the Idents.
Forward jumps within a block are allowed.
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 explicitouter)
- Pattern matching expression (before explicitouter)
After explicitouter, cases will satisfy the following constraints:
EmptyTree,Literal(Constant(x:Int))
or Alternative(lit|...|lit)Ident(nme.WILDCARD)
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
A mirror that reflects a method handle
The abstract type of method symbols representing def declarations
The API of method symbols
The API of method symbols
The base API that all method symbols support
.
The API that all method types support
An extractor class to create and pattern match with syntax MethodType(params, respte)
Here, params is a potentially empty list of parameter symbols of the method,
and restpe is the result type of the method.
.
..
.
.
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 mirror that reflects a Scala object definition or the static parts of a runtime class
The abstract type of module symbols representing object declarations
The API of module symbols
The API of module symbols
The base API that all module symbols support
The abstract type of names
The extended API of names that's supported on reflect mirror via an implicit conversion in reflect.
The base API that all names support
A tree with a name - effectively, a DefTree or RefTree.
The API that all name trees support
Object instantiation One should always use factory method below to build a user level new.
The API that all news support
An extractor class to create and pattern match with syntax New(tpt).
.
The API that all nullary method types support
An extractor class to create and pattern match with syntax NullaryMethodType(resultType).
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).
.
The API that all polymorphic types support
An extractor class to create and pattern match with syntax PolyType(typeParams, resultType).
.
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).
.
The API that all refined types support
An extractor class to create and pattern match with syntax RefinedType(parents, decls)
Here, parents is the list of parent types of the class, and decls is the scope
containing all declarations in the class.
A mirror that reflects instances and static classes
Return expression
The API that all returns support
An extractor class to create and pattern match with syntax Return(expr).
The API of a mirror for a reflective universe
Designator <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).
.
The API that all single types support
An extractor class to create and pattern match with syntax SingleType(pre, sym)
Here, pre is the prefix of the single-type, and sym is the stable value symbol
referred to by the single-type.
The type of Scala singleton types, i.
The type of Scala singleton types, i.e. types that are inhabited by only one nun-null value. These include types of the forms
C.this.type C.super.type x.type
as well as constant types.
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, qual = corresponding this reference A super reference C.
The API that all supers support
An extractor class to create and pattern match with syntax Super(qual, mix).
.
The API that all super types support
An extractor class to create and pattern match with syntax SingleType(thistpe, supertpe)
A tree with a mutable symbol field, initialized to NoSymbol.
The API that all sym trees support
The abstract type of symbols representing declarations
The API of symbols
The base API that all symbols 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 mirror that reflects the instance or static parts of a runtime class
The abstract type of names representing types
The abstract type of names representing types
The abstract type of term symbols representing val, var, def, and object declarations as well as packages and value parameters.
The API of term symbols
The base API that all term symbols support
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).
.
The API that all this types support
An extractor class to create and pattern match with syntax ThisType(sym)
where sym is the class prefix of the this type.
Throw expression
The API that all tries support
An extractor class to create and pattern match with syntax Throw(expr).
Tree is the basis for scala's abstract syntax.
Tree is the basis for scala's abstract syntax. The nodes are implemented as case classes, and the parameters which initialize a given tree are immutable: however Trees have several mutable fields which are manipulated in the course of typechecking, including pos, symbol, and tpe.
Newly instantiated trees have tpe set to null (though it
may be set immediately thereafter depending on how it is
constructed.) When a tree is passed to the typer, typically via
typer.typed(tree), under normal circumstances the tpe must be
null or the typer will ignore it. Furthermore, the typer is not
required to return the same tree it was passed.
Trees can be easily traversed with e.g. foreach on the root node; for a more nuanced traversal, subclass Traverser. Transformations can be considerably trickier: see the numerous subclasses of Transformer found around the compiler.
Copying Trees should be done with care depending on whether it need be done lazily or strictly (see LazyTreeCopier and StrictTreeCopier) and on whether the contents of the mutable fields should be copied. The tree copiers will copy the mutable attributes to the new tree; calling Tree#duplicate will copy symbol and tpe, but all the positions will be focused.
Trees can be coarsely divided into four mutually exclusive categories:
TypTree, not TypeTree.SymTrees include important nodes Ident and Select, which are used as both terms and types; they are distinguishable based on whether the Name is a TermName or TypeName. The correct way for to test for a type or a term (on any Tree) are the isTerm/isType methods on Tree.
"Others" are mostly syntactic or short-lived constructs. Examples include CaseDef, which wraps individual match cases: they are neither terms nor types, nor do they carry a symbol. Another example is Parens, which is eliminated during parsing.
.
The base API that all trees support
The standard (lazy) tree copier
The standard (lazy) tree copier
The API of a tree copier tree copiers are made available by an implicit conversion in reflect.
[Eugene++] comment me!
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
The type of Scala types, and also Scala type signatures.
The extended API of types
Explicit type application.
The API that all type applies support
An extractor class to create and pattern match with syntax TypeApply(fun, args).
The base API that all types support
.
The API that all type bounds support
An extractor class to create and pattern match with syntax TypeBound(lower, upper)
Here, lower is the lower bound of the TypeBounds pair, and upper is
the upper bound.
Document me!
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).
The abstract type of names representing terms
The abstract type of names representing terms
.
The API that all type refs support
An extractor class to create and pattern match with syntax TypeRef(pre, sym, args)
Here, pre is the prefix of the type reference, sym is the symbol
referred to by the type reference, and args is a possible empty list of
type argumenrts.
The abstract type of type symbols representing type, class, and trait declarations, as well as type parameters
The API of type symbols
The base API that all type symbols support
If an implicit value of type u.
A synthetic tree holding an arbitrary type.
A synthetic tree holding an arbitrary type. Not to be confused with
with TypTree, the trait for trees that are only used for type trees.
TypeTree's are inserted in several places, but most notably in
RefCheck, where the arbitrary type trees are all replaced by
TypeTree's.
The API that all type trees support
An extractor class to create and pattern match with syntax TypeTree().
Type annotation, eliminated by cleanup
The API that all typeds support
An extractor class to create and pattern match with syntax Typed(expr, tpt).
Noone knows what this is.
The API that all unapplies support
An extractor class to create and pattern match with syntax UnApply(fun, args).
Broadly speaking, a value definition.
Broadly speaking, a value definition. All these are encoded as ValDefs:
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/deconstructor for Alternative instances.
The constructor/deconstructor 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/deconstructor for Annotated instances.
The constructor/deconstructor 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/deconstructor for AnnotatedType instances.
The constructor/deconstructor for AnnotatedType instances.
A tag that preserves the identity of the AnnotatedType abstract type from erasure.
A tag that preserves the identity of the AnnotatedType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for AppliedTypeTree instances.
The constructor/deconstructor 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.
The constructor/deconstructor for Apply instances.
The constructor/deconstructor for Apply instances.
The constructor/deconstructor for ApplyDynamic instances.
The constructor/deconstructor for ApplyDynamic instances.
A tag that preserves the identity of the ApplyDynamic abstract type from erasure.
A tag that preserves the identity of the ApplyDynamic abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
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/deconstructor for ArrayValue instances.
The constructor/deconstructor for ArrayValue instances.
A tag that preserves the identity of the ArrayValue abstract type from erasure.
A tag that preserves the identity of the ArrayValue abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for Assign instances.
The constructor/deconstructor for Assign instances.
The constructor/deconstructor for AssignOrNamedArg instances.
The constructor/deconstructor 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.
The constructor/deconstructor for Bind instances.
The constructor/deconstructor 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.
Block factory that flattens directly nested blocks.
Block factory that flattens directly nested blocks.
The constructor/deconstructor for Block instances.
The constructor/deconstructor 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 tag that preserves the identity of the BoundedWildcardType abstract type from erasure.
A tag that preserves the identity of the BoundedWildcardType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
casedef shorthand
casedef shorthand
The constructor/deconstructor for CaseDef instances.
The constructor/deconstructor 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.
the class symbol
the implementation template
The constructor/deconstructor for ClassDef instances.
The constructor/deconstructor 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/deconstructor for ClassInfoType instances.
The constructor/deconstructor for ClassInfoType instances.
A tag that preserves the identity of the ClassInfoType abstract type from erasure.
A tag that preserves the identity of the ClassInfoType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the ClassSymbol abstract type from erasure.
A tag that preserves the identity of the ClassSymbol abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the CompoundType abstract type from erasure.
A tag that preserves the identity of the CompoundType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for CompoundTypeTree instances.
The constructor/deconstructor 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.
The constructor/deconstructor for ConstantType instances.
The constructor/deconstructor for ConstantType instances.
A tag that preserves the identity of the ConstantType abstract type from erasure.
A tag that preserves the identity of the ConstantType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for DefDef instances.
The constructor/deconstructor 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 empty tree
The constructor/deconstructor for ExistentialType instances.
The constructor/deconstructor for ExistentialType instances.
A tag that preserves the identity of the ExistentialType abstract type from erasure.
A tag that preserves the identity of the ExistentialType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for ExistentialTypeTree instances.
The constructor/deconstructor 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.
A tag that preserves the identity of the FlagSet abstract type from erasure.
A tag that preserves the identity of the FlagSet abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the FreeTermSymbol abstract type from erasure.
A tag that preserves the identity of the FreeTermSymbol abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the FreeTypeSymbol abstract type from erasure.
A tag that preserves the identity of the FreeTypeSymbol abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for Function instances.
The constructor/deconstructor 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.
The constructor/deconstructor for Ident instances.
The constructor/deconstructor 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/deconstructor for If instances.
The constructor/deconstructor 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/deconstructor for Import instances.
The constructor/deconstructor for Import instances.
The constructor/deconstructor for ImportSelector instances.
The constructor/deconstructor 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.
The constructor/deconstructor for LabelDef instances.
The constructor/deconstructor 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/deconstructor for Literal instances.
The constructor/deconstructor 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/deconstructor for Match instances.
The constructor/deconstructor 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.
A tag that preserves the identity of the MethodSymbol abstract type from erasure.
A tag that preserves the identity of the MethodSymbol abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for MethodType instances.
The constructor/deconstructor for MethodType instances.
A tag that preserves the identity of the MethodType abstract type from erasure.
A tag that preserves the identity of the MethodType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
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.
the class symbol
the implementation template
The constructor/deconstructor for ModuleDef instances.
The constructor/deconstructor 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 ModuleSymbol abstract type from erasure.
A tag that preserves the identity of the ModuleSymbol 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 type.
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)
Factory method for object creation new tpt(args_1)...(args_n)
A New(t, as) is expanded to: (new t).<init>(as)
The constructor/deconstructor for New instances.
The constructor/deconstructor 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 empty set of flags
The empty set of flags
.
..
This constant is used as a special value denoting the empty prefix in a path dependent type.
This constant is used as a special value denoting the empty prefix in a path dependent type.
For instance x.type is represented as SingleType(NoPrefix, <x>), where <x> stands for
the symbol for x.
A special "missing" symbol
A special "missing" symbol
This constant is used as a special value that indicates that no meaningful type exists.
This constant is used as a special value that indicates that no meaningful type exists.
The constructor/deconstructor for NullaryMethodType instances.
The constructor/deconstructor for NullaryMethodType instances.
A tag that preserves the identity of the NullaryMethodType abstract type from erasure.
A tag that preserves the identity of the NullaryMethodType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for PackageDef instances.
The constructor/deconstructor 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.
The constructor/deconstructor for PolyType instances.
The constructor/deconstructor for PolyType instances.
A tag that preserves the identity of the PolyType abstract type from erasure.
A tag that preserves the identity of the PolyType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the FlagSet abstract type from erasure.
A tag that preserves the identity of the FlagSet 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/deconstructor for ReferenceToBoxed instances.
The constructor/deconstructor 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/deconstructor for RefinedType instances.
The constructor/deconstructor for RefinedType instances.
A tag that preserves the identity of the RefinedType abstract type from erasure.
A tag that preserves the identity of the RefinedType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for Return instances.
The constructor/deconstructor 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 tag that preserves the identity of the Scope abstract type from erasure.
A tag that preserves the identity of the Scope abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for Select instances.
The constructor/deconstructor for Select instances.
The constructor/deconstructor for SelectFromTypeTree instances.
The constructor/deconstructor 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/deconstructor for SingleType instances.
The constructor/deconstructor for SingleType instances.
A tag that preserves the identity of the SingleType abstract type from erasure.
A tag that preserves the identity of the SingleType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the SingletonType abstract type from erasure.
A tag that preserves the identity of the SingletonType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for SingletonTypeTree instances.
The constructor/deconstructor 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/deconstructor for Star instances.
The constructor/deconstructor 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.
The constructor/deconstructor for Super instances.
The constructor/deconstructor 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.
The constructor/deconstructor for SuperType instances.
The constructor/deconstructor for SuperType instances.
A tag that preserves the identity of the SuperType abstract type from erasure.
A tag that preserves the identity of the SuperType 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.
A tag that preserves the identity of the Symbol abstract type from erasure.
A tag that preserves the identity of the Symbol abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for Template instances.
The constructor/deconstructor 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 TermSymbol abstract type from erasure.
A tag that preserves the identity of the TermSymbol 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.
The constructor/deconstructor for This instances.
The constructor/deconstructor 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.
The constructor/deconstructor for ThisType instances.
The constructor/deconstructor for ThisType instances.
A tag that preserves the identity of the ThisType abstract type from erasure.
A tag that preserves the identity of the ThisType abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for Throw instances.
The constructor/deconstructor 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.
The constructor/deconstructor for Try instances.
The constructor/deconstructor 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/deconstructor for TypeApply instances.
The constructor/deconstructor 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/deconstructor for TypeBounds instances.
The constructor/deconstructor for TypeBounds instances.
A tag that preserves the identity of the TypeBounds abstract type from erasure.
A tag that preserves the identity of the TypeBounds abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for TypeBoundsTree instances.
The constructor/deconstructor 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 TypeDef node which defines abstract type or type parameter for given sym
A TypeDef node which defines abstract type or type parameter for given sym
A TypeDef node which defines given sym with given tight hand side rhs.
A TypeDef node which defines given sym with given tight hand side rhs.
The constructor/deconstructor for TypeDef instances.
The constructor/deconstructor 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.
The constructor/deconstructor for TypeRef instances.
The constructor/deconstructor for TypeRef instances.
A tag that preserves the identity of the TypeRef abstract type from erasure.
A tag that preserves the identity of the TypeRef abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the TypeSymbol abstract type from erasure.
A tag that preserves the identity of the TypeSymbol abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
A tag that preserves the identity of the Type abstract type from erasure.
A tag that preserves the identity of the Type abstract type from erasure.
Can be used for pattern matching, instance tests, serialization and likes.
The constructor/deconstructor for TypeTree instances.
The constructor/deconstructor 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/deconstructor for Typed instances.
The constructor/deconstructor 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/deconstructor for UnApply instances.
The constructor/deconstructor 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.
The constructor/deconstructor for ValDef instances.
The constructor/deconstructor 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 object representing an unknown type, used during type inference.
An object representing an unknown type, used during type inference. If you see WildcardType outside of inference it is almost certainly a bug.
A creator for type applications
A creator for type applications
Assigns a given position to all position-less nodes of a given AST.
Assigns a given position to all position-less nodes of a given AST.
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.
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.
A creator for existential types.
A creator for existential types. This generates:
tpe1 where { tparams } where tpe1 is the result of extrapolating tpe with regard to tparams.
Extrapolating means that type variables in tparams occurring
in covariant positions are replaced by upper bounds, (minus any
SingletonClass markers), type variables in tparams occurring in
contravariant positions are replaced by upper bounds, provided the
resulting type is legal with regard to stability, and does not contain
any type variable in tparams.
The abstraction drops all type parameters that are not directly or
indirectly referenced by type tpe1. If there are no remaining type
parameters, simply returns result type tpe.
The greatest lower bound of a list of types, as determined by <:<.
The greatest lower bound of a list of types, as determined by <:<.
A creator for intersection type where intersections of a single type are replaced by the type itself, and repeated parent classes are merged.
A creator for intersection type where intersections of a single type are replaced by the type itself, and repeated parent classes are merged.
!!! Repeated parent classes are not merged - is this a bug in the comment or in the code?
A creator for intersection type where intersections of a single type are replaced by the type itself.
A creator for intersection type where intersections of a single type are replaced by the type itself.
The least upper bound of a list of types, as determined by <:<.
The least upper bound of a list of types, as determined by <:<.
Create a new scope nested in another one with which it shares its elements
Create a new scope nested in another one with which it shares its elements
Hook to define what showRaw(...) means.
Hook to define what showRaw(...) means.
Create a new scope
Create a new scope
Create a new scope with given initial elements
Create a new scope with given initial elements
Create a new term name.
Create a new term name.
Hook to define what show(...) means.
Hook to define what show(...) means.
Creates a new type name.
Creates a new type name.
A creator for type parameterizations that strips empty type parameter lists.
A creator for type parameterizations that strips empty type parameter lists. Use this factory method to indicate the type has kind * (it's a polymorphic value) until we start tracking explicit kinds equivalent to typeFun (except that the latter requires tparams nonEmpty).
The canonical creator for a refined type with an initially empty scope.
The canonical creator for a refined type with an initially empty scope.
the canonical creator for a refined type with a given scope
the canonical creator for a refined type with a given scope
.
..
Renders a prettified representation of a flag set.
Renders a prettified representation of a flag set.
Renders a prettified representation of a name.
Renders a prettified representation of a name.
The canonical creator for single-types
The canonical creator for single-types
The canonical creator for typerefs
The canonical creator for typerefs
A position that wraps the non-empty set of trees.
A position that wraps the non-empty set of trees. The point of the wrapping position is the point of the first trees' position. If all some the trees are non-synthetic, returns a range position enclosing the non-synthetic trees Otherwise returns a synthetic offset position to point.
A position that wraps a set of trees.
A position that wraps a set of trees. The point of the wrapping position is the point of the default position. If some of the trees are ranges, returns a range position enclosing all ranges Otherwise returns default position.
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.
.
...
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.
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
Given an expression, generate a tree that when compiled and executed produces the original tree.
Given an expression, generate a tree that when compiled and executed produces the original tree. The produced tree will be bound to the Universe it was called from.
For instance, given the abstract syntax tree representation of the <[ x + 1 ]> expression:
Apply(Select(Ident("x"), "+"), List(Literal(Constant(1))))
The reifier transforms it to the following expression:
<[ val $u: u.type = u // where u is a reference to the Universe that calls the reify $u.Expr[Int]($u.Apply($u.Select($u.Ident($u.newFreeVar("x", <Int>, x), "+"), List($u.Literal($u.Constant(1)))))) ]>
Reification performs expression splicing (when processing Expr.splice) and type splicing (for every type T that has a TypeTag[T] implicit in scope):
val two = mirror.reify(2) // Literal(Constant(2)) val four = mirror.reify(two.splice + two.splice) // Apply(Select(two.tree, newTermName("$plus")), List(two.tree)) def macroImpl[T](c: Context) = { ... // T here is just a type parameter, so the tree produced by reify won't be of much use in a macro expansion // however, if T were annotated with c.TypeTag (which would declare an implicit parameter for macroImpl) // then reification would subtitute T with the TypeTree that was used in a TypeApply of this particular macro invocation val factory = c.reify{ new Queryable[T] } ... }
The transformation looks mostly straightforward, but it has its tricky parts: * Reifier retains symbols and types defined outside the reified tree, however locally defined entities get erased and replaced with their original trees * Free variables are detected and wrapped in symbols of the type FreeVar * Mutable variables that are accessed from a local function are wrapped in refs * Since reified trees can be compiled outside of the scope they've been created in, special measures are taken to ensure that all members accessed in the reifee remain visible
Renders a prettified representation of a reflection artifact.
Renders a prettified representation of a reflection artifact. Typically it looks very close to the Scala code it represents.
Renders internal structure of a flag set.
Renders internal structure of a flag set.
Renders internal structure of a name.
Renders internal structure of a name.
Renders internal structure of a reflection artifact.
Renders internal structure of a reflection artifact.
Intentionally no implicit from String => Name.
Intentionally no implicit from String => Name.
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.
By default trees are printed with show
By default trees are printed with show
(javaUniverse: StringAdd).self
(javaUniverse: StringFormat).self
(javaUniverse: ArrowAssoc[JavaUniverse]).x
(Since version 2.10.0) Use leftOfArrow instead
(javaUniverse: Ensuring[JavaUniverse]).x
(Since version 2.10.0) Use resultOfEnsuring instead