class Forest extends Universe with StdNames with Definitions with Symbols with Types with Constants with Scopes with Names with Trees with AnnotationInfos with TreePrinters with TreeGen with DocGen with TreehuggerDSLs
- Alphabetic
- By Inheritance
- Forest
- TreehuggerDSLs
- DocGen
- TreeGen
- TreePrinters
- AnnotationInfos
- Trees
- Scopes
- Constants
- Types
- Symbols
- Definitions
- StdNames
- NameManglers
- Universe
- TreePrinters
- StandardDefinitions
- AnnotationInfos
- Trees
- Names
- Scopes
- Constants
- Types
- Symbols
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Forest()
Type Members
-
sealed abstract
class
AnnotationInfo
extends Forest.AbsAnnotationInfo with Product3[Forest.Type, List[Forest.Tree], List[(Forest.Name, Forest.ClassfileAnnotArg)]]
Typed information about an annotation.
Typed information about an annotation. It can be attached to either a symbol or an annotated type.
Annotations are written to the classfile as Java annotations if
atp
conforms toClassfileAnnotation
(the classfile parser adds this interface to any Java annotation class).Annotations are pickled (written to scala symtab attribute in the classfile) if
atp
inherits formStaticAnnotation
.args
stores arguments to Scala annotations, represented as typed trees. Note that these trees are not transformed by any phases following the type-checker.assocs
stores arguments to classfile annotations as name-value pairs.- Definition Classes
- AnnotationInfos
-
abstract
class
ClassfileAnnotArg
extends Product
Arguments to classfile annotations (which are written to bytecode as java annotations) are either:
Arguments to classfile annotations (which are written to bytecode as java annotations) are either:
- constants
- arrays of constants
- or nested classfile annotations
- Definition Classes
- AnnotationInfos
-
class
CompleteAnnotationInfo
extends Forest.AnnotationInfo
- Definition Classes
- AnnotationInfos
-
case class
LiteralAnnotArg
(const: Forest.Constant) extends Forest.ClassfileAnnotArg with Product with Serializable
Represents a compile-time Constant (
Boolean
,Byte
,Short
,Char
,Int
,Long
,Float
,Double
,String
,java.lang.Class
or an instance of a Java enumeration value).Represents a compile-time Constant (
Boolean
,Byte
,Short
,Char
,Int
,Long
,Float
,Double
,String
,java.lang.Class
or an instance of a Java enumeration value).- Definition Classes
- AnnotationInfos
-
case class
Constant
(value: Any) extends Forest.AbsConstant with Product with Serializable
- Definition Classes
- Constants
-
trait
ValueClassDefinitions
extends AnyRef
- Definition Classes
- Definitions
-
sealed
trait
DocElement
extends AnyRef
- Definition Classes
- DocGen
-
case class
DocTag
(tag: String, args: List[Any]) extends Forest.DocElement with Product with Serializable
- Definition Classes
- DocGen
-
case class
DocText
(text: String) extends Forest.DocElement with Product with Serializable
- Definition Classes
- DocGen
-
abstract
type
AnnotationType
- Definition Classes
- Trees
- type Position = String
- type Scope = List[Tree]
- type TreeCopier = TreeCopierOps
-
trait
NameManglingCommon
extends AnyRef
- Definition Classes
- NameManglers
-
trait
TermNameMangling
extends Forest.NameManglingCommon
- Definition Classes
- NameManglers
-
trait
TypeNameMangling
extends Forest.NameManglingCommon
- Definition Classes
- NameManglers
-
trait
Name
extends AnyRef
- Definition Classes
- Names
-
case class
TermName
(name: String) extends Name with Product with Serializable
- Definition Classes
- Names
-
case class
TypeName
(name: String) extends Name with Product with Serializable
- Definition Classes
- Names
-
trait
CommonNames
extends AnyRef
- Definition Classes
- StdNames
-
class
JavaKeywords
extends AnyRef
- Definition Classes
- StdNames
-
trait
Keywords
extends AnyRef
This should be the first trait in the linearization.
This should be the first trait in the linearization.
- Definition Classes
- StdNames
-
abstract
class
SymbolNames
extends AnyRef
- Definition Classes
- StdNames
-
trait
TermNames
extends Forest.Keywords with Forest.CommonNames
- Definition Classes
- StdNames
-
trait
TypeNames
extends Forest.CommonNames
- Definition Classes
- StdNames
-
class
ClassSymbol
extends Forest.TypeSymbol
A class for class symbols
A class for class symbols
- Definition Classes
- Symbols
-
class
MethodSymbol
extends Forest.TermSymbol
A class for method symbols
A class for method symbols
- Definition Classes
- Symbols
-
class
ModuleClassSymbol
extends Forest.ClassSymbol
A class for module class symbols Note: Not all module classes are of this type; when unpickled, we get plain class symbols!
A class for module class symbols Note: Not all module classes are of this type; when unpickled, we get plain class symbols!
- Definition Classes
- Symbols
-
class
ModuleSymbol
extends Forest.TermSymbol
A class for module symbols
A class for module symbols
- Definition Classes
- Symbols
-
abstract
class
Symbol
extends Forest.AbsSymbol with HasFlags
- Definition Classes
- Symbols
-
class
TermSymbol
extends Forest.Symbol
A class for term symbols
A class for term symbols
- Definition Classes
- Symbols
-
class
TypeSymbol
extends Forest.Symbol
- Definition Classes
- Symbols
-
class
TreePrinter
extends Forest.TreePrinter
- Definition Classes
- TreePrinters
-
case class
Modifiers
(flags: Long, privateWithin: Forest.Name, annotations: List[Forest.AnnotationInfo]) extends Forest.AbsModifiers with HasFlags with Product with Serializable
- privateWithin
the qualifier for a private (a type name) or tpnme.EMPTY, if none is given.
- annotations
the annotations for the definition. Note: the typechecker drops these annotations, use the AnnotationInfo's (Symbol.annotations) in later phases.
- Definition Classes
- Trees
-
abstract
class
AbsTypeImpl
extends Forest.AbsType
- Definition Classes
- Types
-
case class
AnnotatedType
(annotations: List[Forest.AnnotationInfo], underlying: Forest.Type, selfsym: Forest.Symbol) extends Forest.Type with Product with Serializable
A type carrying some annotations.
A type carrying some annotations. Created by the typechecker when eliminating Annotated trees (see typedAnnotated).
- annotations
the list of annotations on the type
- underlying
the type without the annotation
- selfsym
a "self" symbol with type
underlying
; only available if -Yself-in-annots is turned on. Can beNoSymbol
if it is not used.
- Definition Classes
- Types
-
case class
ClassInfoType
(parents: List[Forest.Type], decls: List[Forest.Tree], typeSymbol: Forest.Symbol) extends Forest.CompoundType with Product with Serializable
A class representing a class info
A class representing a class info
- Definition Classes
- Types
-
abstract
class
CompoundType
extends Forest.Type
A common base class for intersection types and class types
A common base class for intersection types and class types
- Definition Classes
- Types
-
abstract
case class
ConstantType
(value: Forest.Constant) extends Forest.SingletonType with Product with Serializable
A class representing a constant type.
-
case class
ExistentialType
(quantified: List[Forest.Tree], underlying: Forest.Type) extends Forest.Type with Product with Serializable
- Definition Classes
- Types
-
class
JavaMethodType
extends Forest.MethodType
- Definition Classes
- Types
-
case class
MethodType
(params: List[Forest.Symbol], resultType: Forest.Type) extends Forest.Type with Product with Serializable
A class representing a method type with parameters.
A class representing a method type with parameters. Note that a parameterless method is represented by a NullaryMethodType:
def m(): Int MethodType(Nil, Int) def m: Int NullaryMethodType(Int)
- Definition Classes
- Types
-
case class
NamedType
(name: Forest.Name, tp: Forest.Type) extends Forest.Type with Product with Serializable
A class representing types with a name.
A class representing types with a name. When an application uses named arguments, the named argument types for calling isApplicable are represented as NamedType.
- Definition Classes
- Types
-
case class
NotNullType
(underlying: Forest.Type) extends Forest.SubType with Product with Serializable
- Definition Classes
- Types
-
case class
NullaryMethodType
(resultType: Forest.Type) extends Forest.Type with Forest.SimpleTypeProxy with Product with Serializable
- Definition Classes
- Types
-
case class
OverloadedType
(pre: Forest.Type, alternatives: List[Forest.Symbol]) extends Forest.Type with Product with Serializable
A class containing the alternatives and type prefix of an overloaded symbol.
A class containing the alternatives and type prefix of an overloaded symbol. Not used after phase
typer
.- Definition Classes
- Types
-
class
PackageClassInfoType
extends Forest.ClassInfoType
- Definition Classes
- Types
-
case class
PathType
(tree: Forest.Tree) extends Forest.Type with Product with Serializable
A class representing a path dependent type
A class representing a path dependent type
- Definition Classes
- Types
-
final
class
PathType0
extends Forest.PathType
- Definition Classes
- Types
-
case class
PolyType
(typeParams: List[Forest.Symbol], resultType: Forest.Type) extends Forest.Type with Product with Serializable
A type function or the type of a polymorphic value (and thus of kind *).
A type function or the type of a polymorphic value (and thus of kind *).
Before the introduction of NullaryMethodType, a polymorphic nullary method (e.g, def isInstanceOf[T]: Boolean) used to be typed as PolyType(tps, restpe), and a monomorphic one as PolyType(Nil, restpe) This is now: PolyType(tps, NullaryMethodType(restpe)) and NullaryMethodType(restpe) by symmetry to MethodTypes: PolyType(tps, MethodType(params, restpe)) and MethodType(params, restpe)
Thus, a PolyType(tps, TypeRef(...)) unambiguously indicates a type function (which results from eta-expanding a type constructor alias). Similarly, PolyType(tps, ClassInfoType(...)) is a type constructor.
A polytype is of kind * iff its resultType is a (nullary) method type.
- Definition Classes
- Types
-
case class
RefinedType
(parents: List[Forest.Type], decls: List[Forest.Tree]) extends Forest.CompoundType with Product with Serializable
A class representing intersection types with refinements of the form
<parents_0> with ... with <parents_n> { decls }
Cannot be created directly; one should always userefinedType
for creation.A class representing intersection types with refinements of the form
<parents_0> with ... with <parents_n> { decls }
Cannot be created directly; one should always userefinedType
for creation.- Definition Classes
- Types
-
final
class
RefinedType0
extends Forest.RefinedType
- Definition Classes
- Types
-
trait
SimpleTypeProxy
extends Forest.Type
A proxy for a type (identified by field
underlying
) that forwards most operations to it (for exceptions, see WrappingProxy, which forwards even more operations).A proxy for a type (identified by field
underlying
) that forwards most operations to it (for exceptions, see WrappingProxy, which forwards even more operations). every operation that is overridden for some kind of types should be forwarded.- Definition Classes
- Types
-
abstract
case class
SingleType
(pre: Forest.Type, sym: Forest.Symbol) extends Forest.SingletonType with Product with Serializable
A class for singleton types of the form
<prefix>.<sym.name>.type
.A class for singleton types of the form
<prefix>.<sym.name>.type
. Cannot be created directly; one should always usesingleType
for creation.- Definition Classes
- Types
-
abstract
class
SingletonType
extends Forest.SubType with Forest.SimpleTypeProxy with Forest.AbsSingletonType
- Definition Classes
- Types
-
abstract
class
SubType
extends Forest.Type
A base class for types that defer some operations to their immediate supertype.
A base class for types that defer some operations to their immediate supertype.
- Definition Classes
- Types
-
abstract
case class
SuperType
(thistpe: Forest.Type, supertpe: Forest.Type) extends Forest.SingletonType with Product with Serializable
- Definition Classes
- Types
-
abstract
case class
ThisType
(sym: Forest.Symbol) extends Forest.SingletonType with Product with Serializable
A class for this-types of the form <sym>.this.type
A class for this-types of the form <sym>.this.type
- Definition Classes
- Types
-
abstract
class
Type
extends Forest.AbsTypeImpl
The base class for all types
The base class for all types
- Definition Classes
- Types
-
abstract
case class
TypeBounds
(lo: Forest.Type, hi: Forest.Type, view: Forest.Type, context: Forest.Type) extends Forest.SubType with Product with Serializable
A class for the bounds of abstract types and type parameters
A class for the bounds of abstract types and type parameters
- Definition Classes
- Types
-
class
TypeConstraint
extends AnyRef
A class expressing upper and lower bounds constraints of type variables, as well as their instantiations.
A class expressing upper and lower bounds constraints of type variables, as well as their instantiations.
- Definition Classes
- Types
-
abstract
case class
TypeRef
(pre: Forest.Type, sym: Forest.Symbol, args: List[Forest.Type]) extends Forest.Type with Product with Serializable
A class for named types of the form
<prefix>.<sym.name>[args]
Cannot be created directly; one should always usetypeRef
for creation.A class for named types of the form
<prefix>.<sym.name>[args]
Cannot be created directly; one should always usetypeRef
for creation.- pre
...
- sym
...
- args
...
- Definition Classes
- Types
-
class
TypeVar
extends Forest.Type
A class representing a type variable: not used after phase
typer
.A class representing a type variable: not used after phase
typer
.A higher-kinded TypeVar has params (Symbols) and typeArgs (Types). A TypeVar with nonEmpty typeArgs can only be instantiated by a higher-kinded type that can be applied to those args. A TypeVar is much like a TypeRef, except it has special logic for equality and subtyping.
- Definition Classes
- Types
-
final
class
UniqueConstantType
extends Forest.ConstantType with Forest.UniqueType
- Definition Classes
- Types
-
final
class
UniqueSingleType
extends Forest.SingleType with Forest.UniqueType
- Definition Classes
- Types
-
final
class
UniqueSuperType
extends Forest.SuperType with Forest.UniqueType
- Definition Classes
- Types
-
final
class
UniqueThisType
extends Forest.ThisType with Forest.UniqueType
- Definition Classes
- Types
-
trait
UniqueType
extends Product
- Definition Classes
- Types
-
final
class
UniqueTypeBounds
extends Forest.TypeBounds with Forest.UniqueType
- Definition Classes
- Types
-
final
class
UniqueTypeRef
extends Forest.TypeRef with Forest.UniqueType
- Definition Classes
- Types
-
abstract
class
AbsAnnotationInfo
extends AnyRef
- Definition Classes
- AnnotationInfos
-
abstract
class
AnnotationInfoExtractor
extends AnyRef
- Definition Classes
- AnnotationInfos
-
abstract
class
AbsConstant
extends AnyRef
- Definition Classes
- Constants
-
abstract
class
ConstantExtractor
extends AnyRef
- Definition Classes
- Constants
-
abstract
class
AbsDefinitions
extends AnyRef
- Definition Classes
- StandardDefinitions
-
abstract
class
AbsSymbol
extends AnyRef
- Definition Classes
- Symbols
-
class
RawTreePrinter
extends Universe.TreePrinter
- Definition Classes
- TreePrinters
-
abstract
class
AbsModifiers
extends AnyRef
- Definition Classes
- Trees
-
case class
Alternative
(trees: List[Universe.Tree]) extends Universe.Tree with Universe.TermTree with Product with Serializable
Alternatives of patterns, eliminated by explicitouter, except for occurrences in encoded Switch stmt (=remaining Match(CaseDef(...))
Alternatives of patterns, eliminated by explicitouter, except for occurrences in encoded Switch stmt (=remaining Match(CaseDef(...))
- Definition Classes
- Trees
-
case class
Annotated
(annot: Universe.Tree, arg: Universe.Tree) extends Universe.Tree with Product with Serializable
A tree that has an annotation attached to it.
A tree that has an annotation attached to it. Only used for annotated types and annotation ascriptions, annotations on definitions are stored in the Modifiers. Eliminated by typechecker (typedAnnotated), the annotations are then stored in an AnnotatedType.
- Definition Classes
- Trees
-
case class
AnonFunc
(vparamss: List[List[Universe.ValDef]], tpt: Universe.Tree, rhs: Universe.Tree) extends Universe.Tree with Universe.FuncTree with Product with Serializable
- Definition Classes
- Trees
-
case class
AppliedTypeTree
(tpt: Universe.Tree, args: List[Universe.Tree]) extends Universe.Tree with Universe.TypTree with Product with Serializable
Applied type <tpt> [ <args> ], eliminated by RefCheck
Applied type <tpt> [ <args> ], eliminated by RefCheck
- Definition Classes
- Trees
-
case class
Apply
(fun: Universe.Tree, args: List[Universe.Tree]) extends Universe.GenericApply with Product with Serializable
Value application
Value application
- Definition Classes
- Trees
-
case class
ApplyDynamic
(qual: Universe.Tree, args: List[Universe.Tree]) extends Universe.Tree with Universe.TermTree with Universe.SymTree with Product with Serializable
Dynamic value application.
Dynamic value application. In a dynamic application q.f(as)
- q is stored in qual
- as is stored in args
- f is stored as the node's symbol field.
- Definition Classes
- Trees
-
class
ApplyImplicitView
extends Universe.Apply
- Definition Classes
- Trees
-
class
ApplyToImplicitArgs
extends Universe.Apply
- Definition Classes
- Trees
-
case class
ArrayValue
(elemtpt: Universe.Tree, elems: List[Universe.Tree]) extends Universe.Tree with Universe.TermTree with Product with Serializable
Array of expressions, needs to be translated in backend,
Array of expressions, needs to be translated in backend,
- Definition Classes
- Trees
-
case class
Assign
(lhs: Universe.Tree, rhs: Universe.Tree) extends Universe.Tree with Universe.TermTree with Product with Serializable
Assignment
Assignment
- Definition Classes
- Trees
-
class
BackQuotedIdent
extends Universe.Ident
- Definition Classes
- Trees
-
case class
Bind
(name: Universe.Name, body: Universe.Tree) extends Universe.DefTree with Product with Serializable
Bind of a variable to a rhs pattern, eliminated by explicitouter
Bind of a variable to a rhs pattern, eliminated by explicitouter
- Definition Classes
- Trees
-
case class
Block
(stats: List[Universe.Tree], expr: Universe.Tree) extends Universe.Tree with Universe.TermTree with Product with Serializable
Block of expressions (semicolon separated expressions)
Block of expressions (semicolon separated expressions)
- Definition Classes
- Trees
-
case class
CaseDef
(pat: Universe.Tree, guard: Universe.Tree, body: Universe.Tree) extends Universe.Tree with Product with Serializable
Case clause in a pattern match, eliminated during explicitouter (except for occurrences in switch statements)
Case clause in a pattern match, eliminated during explicitouter (except for occurrences in switch statements)
- Definition Classes
- Trees
-
case class
ClassDef
(mods: Universe.Modifiers, ctormods: Universe.Modifiers, name: Universe.TypeName, tparams: List[Universe.TypeDef], vparams: List[Universe.ValDef], impl: Universe.Template) extends Universe.ImplDef with Product with Serializable
A class definition.
A class definition.
- Definition Classes
- Trees
-
case class
Commented
(mods: Universe.Modifiers, comment: List[String], expr: Universe.Tree) extends Universe.Tree with Product with Serializable
Commented expression
Commented expression
- Definition Classes
- Trees
-
case class
CompoundTypeTree
(templ: Universe.Template) extends Universe.Tree with Universe.TypTree with Product with Serializable
Intersection type <parent1> with ...
Intersection type <parent1> with ... with <parentN> { <decls> }, eliminated by RefCheck
- Definition Classes
- Trees
-
case class
DefDef
(mods: Universe.Modifiers, name: Universe.Name, tparams: List[Universe.TypeDef], vparamss: List[List[Universe.ValDef]], tpt: Universe.Tree, rhs: Universe.Tree) extends Universe.ValOrDefDef with Product with Serializable
A method or macro definition.
A method or macro definition.
- name
The name of the method or macro. Can be a type name in case this is a type macro
- Definition Classes
- Trees
-
abstract
class
DefTree
extends Universe.Tree with Universe.SymTree
A tree which defines a symbol-carrying entity.
A tree which defines a symbol-carrying entity.
- Definition Classes
- Trees
-
sealed
trait
Enumerator
extends Universe.Tree
- Definition Classes
- Trees
-
case class
ExistentialTypeTree
(tpt: Universe.Tree, whereClauses: List[Universe.Tree]) extends Universe.Tree with Universe.TypTree with Product with Serializable
- Definition Classes
- Trees
-
class
FilterTreeTraverser
extends Universe.Traverser
- Definition Classes
- Trees
-
class
FindTreeTraverser
extends Universe.Traverser
- Definition Classes
- Trees
-
case class
ForFilter
(pos: Position, test: Universe.Tree) extends Universe.Tree with Universe.Enumerator with Product with Serializable
- Definition Classes
- Trees
-
case class
ForTree
(enums: List[Universe.Enumerator], body: Universe.Tree) extends Universe.Tree with Product with Serializable
- Definition Classes
- Trees
-
case class
ForValDef
(pos: Position, name: Universe.TermName, tpt: Universe.Tree, rhs: Universe.Tree) extends Universe.ValOrDefDef with Universe.Enumerator with Product with Serializable
- Definition Classes
- Trees
-
case class
ForValFrom
(pos: Position, name: Universe.TermName, tpt: Universe.Tree, rhs: Universe.Tree) extends Universe.ValOrDefDef with Universe.Enumerator with Product with Serializable
- Definition Classes
- Trees
-
case class
ForYieldTree
(enums: List[Universe.Enumerator], body: Universe.Tree) extends Universe.Tree with Product with Serializable
- Definition Classes
- Trees
-
class
ForeachTreeTraverser
extends Universe.Traverser
- Definition Classes
- Trees
-
trait
FuncTree
extends Universe.Tree with Universe.TermTree
A tree for a function expression.
A tree for a function expression.
- Definition Classes
- Trees
-
case class
Function
(vparams: List[Universe.ValDef], body: Universe.Tree) extends Universe.Tree with Universe.TermTree with Universe.SymTree with Product with Serializable
Anonymous function, eliminated by analyzer
Anonymous function, eliminated by analyzer
- Definition Classes
- Trees
-
abstract
class
GenericApply
extends Universe.Tree with Universe.TermTree
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.)
- Definition Classes
- Trees
-
case class
Ident
(name: Universe.Name) extends Universe.Tree with Universe.RefTree with Product with Serializable
Identifier <name>
Identifier <name>
- Definition Classes
- Trees
-
case class
If
(cond: Universe.Tree, thenp: Universe.Tree, elsep: Universe.Tree) extends Universe.Tree with Universe.TermTree with Product with Serializable
Conditional expression
Conditional expression
- Definition Classes
- Trees
-
abstract
class
ImplDef
extends Universe.MemberDef
A common base class for class and object definitions.
A common base class for class and object definitions.
- Definition Classes
- Trees
-
case class
Import
(expr: Universe.Tree, selectors: List[Universe.ImportSelector]) extends Universe.Tree with Universe.SymTree with Product with Serializable
Import clause
Import clause
- Definition Classes
- Trees
-
case class
ImportSelector
(name: Universe.Name, namePos: Int, rename: Universe.Name, renamePos: Int) extends Product with Serializable
Import selector
Import selector
Representation of an imported name its optional rename and their optional positions
- name
the imported name
- namePos
its position or -1 if undefined
- rename
the name the import is renamed to (== name if no renaming)
- renamePos
the position of the rename or -1 if undefined
- Definition Classes
- Trees
-
case class
Infix
(qualifier: Universe.Tree, name: Universe.Name, args: List[Universe.Tree]) extends Universe.Tree with Product with Serializable
Infix application
Infix application
- Definition Classes
- Trees
-
case class
InfixUnApply
(qualifier: Universe.Tree, name: Universe.Name, args: List[Universe.Tree]) extends Universe.Tree with Product with Serializable
Infix extraction, for example
case x :: rest
Infix extraction, for example
case x :: rest
- Definition Classes
- Trees
-
case class
Interpolated
(interpolator: Universe.Name, args: List[Universe.Tree]) extends Universe.Tree with Product with Serializable
- Definition Classes
- Trees
-
case class
LabelDef
(name: Universe.TermName, param: Universe.Tree, rhs: Universe.Tree) extends Universe.DefTree with Universe.TermTree with Product with Serializable
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.
- Definition Classes
- Trees
-
class
LazyTreeCopier
extends Universe.TreeCopierOps
- Definition Classes
- Trees
-
case class
Literal
(value: Universe.Constant) extends Universe.Tree with Universe.TermTree with Product with Serializable
Literal
Literal
- Definition Classes
- Trees
-
case class
Match
(selector: Universe.Tree, cases: List[Universe.CaseDef]) extends Universe.Tree with Universe.TermTree with Product with Serializable
- Pattern matching expression (before explicitouter)
- Pattern matching expression (before explicitouter)
- Switch statements (after explicitouter)
After explicitouter, cases will satisfy the following constraints:
- all guards are
EmptyTree
, - all patterns will be either
Literal(Constant(x:Int))
orAlternative(lit|...|lit)
- except for an "otherwise" branch, which has pattern
Ident(nme.WILDCARD)
- Definition Classes
- Trees
-
abstract
class
MemberDef
extends Universe.DefTree
Common base class for all member definitions: types, classes, objects, packages, vals and vars, defs.
Common base class for all member definitions: types, classes, objects, packages, vals and vars, defs.
- Definition Classes
- Trees
-
case class
ModuleDef
(mods: Universe.Modifiers, name: Universe.TermName, impl: Universe.Template) extends Universe.ImplDef with Product with Serializable
An object definition, e.g.
An object definition, e.g.
object Foo
. Internally, objects are quite frequently called modules to reduce ambiguity.- Definition Classes
- Trees
-
case class
New
(tpt: Universe.Tree) extends Universe.Tree with Universe.TermTree with Product with Serializable
Object instantiation One should always use factory method below to build a user level new.
Object instantiation One should always use factory method below to build a user level new.
- tpt
a class type
- Definition Classes
- Trees
-
case class
PackageDef
(mods: Universe.Modifiers, pid: Universe.RefTree, stats: List[Universe.Tree]) extends Universe.MemberDef with Product with Serializable
A packaging, such as
package pid { stats }
A packaging, such as
package pid { stats }
- Definition Classes
- Trees
-
case class
ProcDef
(mods: Universe.Modifiers, name: Universe.Name, tparams: List[Universe.TypeDef], vparamss: List[List[Universe.ValDef]], rhs: Universe.Tree) extends Universe.MemberDef with Product with Serializable
A procedure definition.
A procedure definition. Sugar for a function whose return type is Unit.
- name
The name of the method or macro. Can be a type name in case this is a type macro
- Definition Classes
- Trees
-
trait
RefTree
extends Universe.Tree with Universe.SymTree
A tree which references a symbol-carrying entity.
A tree which references a symbol-carrying entity. References one, as opposed to defining one; definitions are in DefTrees.
- Definition Classes
- Trees
-
case class
Return
(expr: Universe.Tree) extends Universe.Tree with Universe.TermTree with Universe.SymTree with Product with Serializable
Return expression
Return expression
- Definition Classes
- Trees
-
case class
Select
(qualifier: Universe.Tree, name: Universe.Name) extends Universe.Tree with Universe.RefTree with Product with Serializable
Designator <qualifier> .
Designator <qualifier> . <name>
- Definition Classes
- Trees
-
case class
SelectFromTypeTree
(qualifier: Universe.Tree, name: Universe.TypeName) extends Universe.Tree with Universe.TypTree with Universe.RefTree with Product with Serializable
Type selection <qualifier> # <name>, eliminated by RefCheck
Type selection <qualifier> # <name>, eliminated by RefCheck
- Definition Classes
- Trees
-
case class
SingletonTypeTree
(ref: Universe.Tree) extends Universe.Tree with Universe.TypTree with Product with Serializable
Singleton type, eliminated by RefCheck
Singleton type, eliminated by RefCheck
- Definition Classes
- Trees
-
case class
Star
(elem: Universe.Tree) extends Universe.Tree with Universe.TermTree with Product with Serializable
Repetition of pattern, eliminated by explicitouter
Repetition of pattern, eliminated by explicitouter
- Definition Classes
- Trees
-
class
StrictTreeCopier
extends Universe.TreeCopierOps
- Definition Classes
- Trees
-
case class
Super
(qual: Universe.Tree, mix: Universe.TypeName) extends Universe.Tree with Universe.TermTree with Product with Serializable
Super reference, qual = corresponding this reference
Super reference, qual = corresponding this reference
- Definition Classes
- Trees
-
trait
SymTree
extends Universe.Tree
A tree with a mutable symbol field, initialized to NoSymbol.
A tree with a mutable symbol field, initialized to NoSymbol.
- Definition Classes
- Trees
-
case class
Template
(parents: List[Universe.Tree], self: Universe.ValDef, body: List[Universe.Tree]) extends Universe.Tree with Universe.SymTree with Product with Serializable
Instantiation template of a class or trait
Instantiation template of a class or trait
- Definition Classes
- Trees
-
trait
TermTree
extends Universe.Tree
A tree for a term.
A tree for a term. Not all terms are TermTrees; use isTerm to reliably identify terms.
- Definition Classes
- Trees
-
case class
This
(qual: Universe.TypeName) extends Universe.Tree with Universe.TermTree with Universe.SymTree with Product with Serializable
Self reference
Self reference
- Definition Classes
- Trees
-
case class
Throw
(expr: Universe.Tree) extends Universe.Tree with Universe.TermTree with Product with Serializable
Throw expression
Throw expression
- Definition Classes
- Trees
-
class
Traverser
extends AnyRef
- Definition Classes
- Trees
-
abstract
class
Tree
extends Product
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:
- TermTrees, representing terms
- TypTrees, representing types. Note that is
TypTree
, notTypeTree
. - SymTrees, which may represent types or terms.
- Other Trees, which have none of those as parents.
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.
- Definition Classes
- Trees
-
trait
TreeCopierOps
extends AnyRef
- Definition Classes
- Trees
-
case class
Try
(block: Universe.Tree, catches: List[Universe.CaseDef], finalizer: Universe.Tree) extends Universe.Tree with Universe.TermTree with Product with Serializable
- Definition Classes
- Trees
-
trait
TypTree
extends Universe.Tree
A tree for a type.
A tree for a type. Not all types are TypTrees; use isType to reliably identify types.
- Definition Classes
- Trees
-
case class
TypeApply
(fun: Universe.Tree, args: List[Universe.Tree]) extends Universe.GenericApply with Product with Serializable
Explicit type application.
Explicit type application. All signs point toward it being a requirement that args.nonEmpty, but I can't find that explicitly stated anywhere. Unless your last name is odersky, you should probably treat it as true.
- Definition Classes
- Trees
-
case class
TypeBoundsTree
(lo: Universe.Tree, hi: Universe.Tree) extends Universe.Tree with Universe.TypTree with Product with Serializable
- Definition Classes
- Trees
-
case class
TypeDef
(mods: Universe.Modifiers, name: Universe.TypeName, tparams: List[Universe.TypeDef], rhs: Universe.Tree) extends Universe.MemberDef with Product with Serializable
An abstract type, a type parameter, or a type alias.
An abstract type, a type parameter, or a type alias.
- Definition Classes
- Trees
-
case class
TypeTree
() extends Universe.Tree with Universe.TypTree with Product with Serializable
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.- Definition Classes
- Trees
-
case class
Typed
(expr: Universe.Tree, tpt: Universe.Tree) extends Universe.Tree with Universe.TermTree with Product with Serializable
Type annotation, eliminated by explicit outer
Type annotation, eliminated by explicit outer
- Definition Classes
- Trees
-
case class
UnApply
(fun: Universe.Tree, args: List[Universe.Tree]) extends Universe.Tree with Universe.TermTree with Product with Serializable
- Definition Classes
- Trees
-
case class
ValDef
(mods: Universe.Modifiers, lhs: Universe.Tree, rhs: Universe.Tree) extends Universe.ValOrDefDef with Product with Serializable
A constant value definition (this includes vars as well, which differ from vals only in having the MUTABLE flag set in their Modifiers.)
A constant value definition (this includes vars as well, which differ from vals only in having the MUTABLE flag set in their Modifiers.)
- Definition Classes
- Trees
-
abstract
class
ValOrDefDef
extends Universe.MemberDef
A common base class for ValDefs and DefDefs.
A common base class for ValDefs and DefDefs.
- Definition Classes
- Trees
-
trait
AbsCompoundType
extends Universe.AbsType
This class declares methods that are visible in a
CompoundType
(i.e.This class declares methods that are visible in a
CompoundType
(i.e. a class/trait/object template or refined type of the formP_1 with ... with P_m { D_1; ...; D_n }
P_n
- Definition Classes
- Types
-
trait
AbsSingletonType
extends Universe.AbsType
This class declares methods that are visible in a
SingleType
.This class declares methods that are visible in a
SingleType
.- Definition Classes
- Types
-
abstract
class
AbsType
extends AnyRef
This class declares operations that are visible in a Type.
This class declares operations that are visible in a Type.
- Definition Classes
- Types
-
abstract
class
AnnotatedTypeExtractor
extends AnyRef
- Definition Classes
- Types
-
abstract
class
ClassInfoTypeExtractor
extends AnyRef
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, andclazz
is the symbol of the class itself.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, andclazz
is the symbol of the class itself.- Definition Classes
- Types
-
abstract
class
ConstantTypeExtractor
extends AnyRef
An extractor class to create and pattern match with syntax
ConstantType(constant)
Here,constant
is the constant value represented by the type.An extractor class to create and pattern match with syntax
ConstantType(constant)
Here,constant
is the constant value represented by the type.- Definition Classes
- Types
-
abstract
class
ExistentialTypeExtractor
extends AnyRef
- Definition Classes
- Types
-
abstract
class
MethodTypeExtractor
extends AnyRef
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, andrestpe
is the result type of the method.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, andrestpe
is the result type of the method. If the method is curried,restpe
would be anotherMethodType
. Note:MethodType(Nil, Int)
would be the type of a method defined with an empty parameter list.def f(): Int
If the method is completely parameterless, as in
def f: Int
its type is a
NullaryMethodType
.- Definition Classes
- Types
-
abstract
class
NullaryMethodTypeExtractor
extends AnyRef
- Definition Classes
- Types
-
abstract
class
PolyTypeExtractor
extends AnyRef
- Definition Classes
- Types
-
abstract
class
RefinedTypeExtractor
extends AnyRef
An extractor class to create and pattern match with syntax
RefinedType(parents, decls)
Here,parents
is the list of parent types of the class, anddecls
is the scope containing all declarations in the class.An extractor class to create and pattern match with syntax
RefinedType(parents, decls)
Here,parents
is the list of parent types of the class, anddecls
is the scope containing all declarations in the class.- Definition Classes
- Types
-
abstract
class
SingleTypeExtractor
extends AnyRef
An extractor class to create and pattern match with syntax
SingleType(pre, sym)
Here,pre
is the prefix of the single-type, andsym
is the stable value symbol referred to by the single-type.An extractor class to create and pattern match with syntax
SingleType(pre, sym)
Here,pre
is the prefix of the single-type, andsym
is the stable value symbol referred to by the single-type.- Definition Classes
- Types
-
abstract
class
SuperTypeExtractor
extends AnyRef
An extractor class to create and pattern match with syntax
SingleType(thistpe, supertpe)
An extractor class to create and pattern match with syntax
SingleType(thistpe, supertpe)
- Definition Classes
- Types
-
abstract
class
ThisTypeExtractor
extends AnyRef
An extractor class to create and pattern match with syntax
ThisType(sym)
wheresym
is the class prefix of the this type.An extractor class to create and pattern match with syntax
ThisType(sym)
wheresym
is the class prefix of the this type.- Definition Classes
- Types
-
abstract
class
TypeBoundsExtractor
extends AnyRef
An extractor class to create and pattern match with syntax
TypeBound(lower, upper)
Here,lower
is the lower bound of theTypeBounds
pair, andupper
is the upper bound.An extractor class to create and pattern match with syntax
TypeBound(lower, upper)
Here,lower
is the lower bound of theTypeBounds
pair, andupper
is the upper bound.- Definition Classes
- Types
-
abstract
class
TypeRefExtractor
extends AnyRef
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, andargs
is a possible empty list of type argumenrts.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, andargs
is a possible empty list of type argumenrts.- Definition Classes
- Types
Value Members
-
object
AnnotationInfo
extends Forest.AnnotationInfoExtractor
- Definition Classes
- AnnotationInfos → AnnotationInfos
- object Constant extends Forest.ConstantExtractor with Serializable
-
object
definitions
extends Forest.AbsDefinitions with Forest.ValueClassDefinitions
- Definition Classes
- Definitions → StandardDefinitions
-
object
DocTag
extends Product with Serializable
- Definition Classes
- DocGen
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
Apply(sym: Symbol, args: Tree*): Apply
- Definition Classes
- Trees
-
def
BackQuotedIdent(sym: Symbol): BackQuotedIdent
- Definition Classes
- Trees
-
def
Bind(sym: Symbol, body: Tree): Bind
- Definition Classes
- Trees
-
def
Block(stats: Tree*): Block
Block factory that flattens directly nested blocks.
Block factory that flattens directly nested blocks.
- Definition Classes
- Trees
-
final
val
BooleanTag: Int(2)
- Definition Classes
- Constants
-
final
val
ByteTag: Int(3)
- Definition Classes
- Constants
-
def
CaseDef(pat: Tree, body: Tree): CaseDef
casedef shorthand
casedef shorthand
- Definition Classes
- Trees
-
final
val
CharTag: Int(5)
- Definition Classes
- Constants
-
final
val
ClassTag: Int(12)
- Definition Classes
- Constants
-
final
val
DoubleTag: Int(9)
- Definition Classes
- Constants
-
val
EmptyScope: Nil.type
The empty scope (immutable).
The empty scope (immutable).
- Definition Classes
- Scopes
-
def
EmptyTypeName: TypeName
- Definition Classes
- Names
-
final
val
EnumTag: Int(13)
- Definition Classes
- Constants
- val Flags: treehugger.Flags.type
-
final
val
FloatTag: Int(8)
- Definition Classes
- Constants
-
def
ForFilter(test: Tree): ForFilter
- Definition Classes
- Trees
-
def
ForValDef(name: TermName, tpt: Tree, rhs: Tree): ForValDef
- Definition Classes
- Trees
-
def
ForValFrom(name: TermName, tpt: Tree, rhs: Tree): ForValFrom
- Definition Classes
- Trees
-
def
Ident(sym: Symbol): Ident
- Definition Classes
- Trees
-
def
Infix(qualifier: Tree, sym: Symbol, args: List[Tree]): Infix
- Definition Classes
- Trees
-
def
InfixUnApply(qualifier: Tree, sym: Symbol, args: List[Tree]): InfixUnApply
- Definition Classes
- Trees
-
final
val
IntTag: Int(6)
- Definition Classes
- Constants
-
def
Interpolated(sym: Symbol, args: List[Tree]): Interpolated
- Definition Classes
- Trees
-
def
LabelDef(sym: Symbol, param: Tree, rhs: Tree): LabelDef
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
- Definition Classes
- Trees
-
final
val
LongTag: Int(7)
- Definition Classes
- Constants
-
val
MODULE_SUFFIX_STRING: String
- Definition Classes
- StdNames
- def Modifiers(mods: Set[api.Modifier.Value], privateWithin: Name, annotations: List[AnnotationInfo]): Modifiers
-
def
Modifiers(flags: Long): Modifiers
- Definition Classes
- Trees
-
def
Modifiers(flags: Long, privateWithin: Name): Modifiers
- Definition Classes
- Trees
-
def
ModuleDef(sym: Symbol, impl: Template): ModuleDef
- sym
the class symbol
- impl
the implementation template
- Definition Classes
- Trees
-
def
New(sym: Symbol, args: Tree*): Tree
0-1 argument list new, based on a symbol.
0-1 argument list new, based on a symbol.
- Definition Classes
- Trees
-
def
New(tpt: Tree, argss: List[List[Tree]]): Tree
Factory method for object creation
new tpt(args_1)...(args_n)
ANew(t, as)
is expanded to:(new t).<init>(as)
Factory method for object creation
new tpt(args_1)...(args_n)
ANew(t, as)
is expanded to:(new t).<init>(as)
- Definition Classes
- Trees
-
lazy val
NoMods: Modifiers
- Definition Classes
- Trees
-
val
NoPackage: Ident
- Definition Classes
- Trees
- val NoPosition: Position
-
final
val
NoTag: Int(0)
- Definition Classes
- Constants
-
final
val
NullTag: Int(11)
- Definition Classes
- Constants
-
def
Select(qualifier: Tree, sym: Symbol): Select
- Definition Classes
- Trees
-
final
val
ShortTag: Int(4)
- Definition Classes
- Constants
-
final
val
StringTag: Int(10)
- Definition Classes
- Constants
-
def
Super(qual: Tree): Super
- Definition Classes
- Trees
-
def
Super(sym: Symbol): Super
- Definition Classes
- Trees
-
def
Super(sym: Symbol, mix: TypeName): Super
- Definition Classes
- Trees
-
final
val
SymbolTag: Int(14)
- Definition Classes
- Constants
-
def
This(sym: Symbol): This
- Definition Classes
- Trees
-
def
TypeDef(sym: Symbol): TypeDef
- Definition Classes
- Trees
-
def
TypeDef(sym: Symbol, rhs: Tree): TypeDef
A TypeDef node which defines given
sym
with given tight hand siderhs
.A TypeDef node which defines given
sym
with given tight hand siderhs
.- Definition Classes
- Trees
-
def
TypeTree(tp: Type): TypeTree
- Definition Classes
- Trees
-
final
val
UnitTag: Int(1)
- Definition Classes
- Constants
-
def
ValDef(sym: Symbol): ValDef
- Definition Classes
- Trees
-
def
ValDef(sym: Symbol, rhs: Tree): ValDef
- Definition Classes
- Trees
-
def
ValDef(mods: Modifiers, name: Name, tpt: Tree, rhs: Tree): ValDef
- Definition Classes
- Trees
-
def
annotatedType(annots: List[AnnotationInfo], underlying: Type, selfsym: Symbol = NoSymbol): Type
Creator for AnnotatedTypes.
Creator for AnnotatedTypes. It returns the underlying type if annotations.isEmpty rather than walking into the assertion.
- Definition Classes
- Types
-
def
appliedType(tycon: Type, args: List[Type]): Type
A creator for type applications
A creator for type applications
- Definition Classes
- Types
-
def
appliedType(tycon: Type, args: Type*): Type
- Definition Classes
- Types
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
backquotedPath(t: Tree): String
Turns a path into a String, introducing backquotes as necessary.
Turns a path into a String, introducing backquotes as necessary.
- Definition Classes
- TreePrinters
-
val
builtinFullNames: Set[String]
- Definition Classes
- Types
-
lazy val
classfileAnnotArgManifest: ClassManifest[ClassfileAnnotArg]
- Definition Classes
- AnnotationInfos → AnnotationInfos
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
compareLengths(xs1: List[_], xs2: List[_]): Int
- Definition Classes
- Types
- Annotations
- @tailrec()
-
def
copyTypeRef(tp: Type, pre: Type, sym: Symbol, args: List[Type]): Type
- Definition Classes
- Types
-
def
encode(str: String): TermName
- Definition Classes
- StdNames
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- val forMSIL: Boolean
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
final
def
hasLength(xs: List[_], len: Int): Boolean
Again avoiding calling length, but the lengthCompare interface is clunky.
Again avoiding calling length, but the lengthCompare interface is clunky.
- Definition Classes
- Types
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTupleTree(tree: Tree): Boolean
- Definition Classes
- TreeGen
-
val
javanme: JavaKeywords
- Definition Classes
- StdNames
-
final
val
maxTostringRecursions: Int(50)
The maximum number of recursions allowed in toString
The maximum number of recursions allowed in toString
- Definition Classes
- Types
-
def
maybeMkAsInstanceOf(tree: Tree, pt: Type, tpe: Type, beforeRefChecks: Boolean = false): Tree
Cast
tree
topt
, unless tpe is a subtype of pt, or pt is Unit.Cast
tree
topt
, unless tpe is a subtype of pt, or pt is Unit.- Definition Classes
- TreeGen
-
def
mkAnd(tree1: Tree, tree2: Tree): Tree
- Definition Classes
- TreeGen
-
def
mkApplyIfNeeded(qual: Tree): Tree
If this is a reference to a method with an empty parameter list, wrap it in an apply.
If this is a reference to a method with an empty parameter list, wrap it in an apply.
- Definition Classes
- TreeGen
-
def
mkAsInstanceOf(value: Tree, tpe: Type, any: Boolean = true, wrapInApply: Boolean = true): Tree
Builds a cast with given value and type.
Builds a cast with given value and type.
- Definition Classes
- TreeGen
-
def
mkAttributedIdent(sym: Symbol): Tree
- Definition Classes
- TreeGen
-
def
mkAttributedQualifier(tpe: Type, termSym: Symbol): Tree
Builds a reference to value whose type is given stable prefix.
Builds a reference to value whose type is given stable prefix. If the type is unsuitable, e.g. it is a TypeRef for an abstract type variable, then an Ident will be made using termSym as the Ident's symbol. In that case, termSym must not be NoSymbol.
- Definition Classes
- TreeGen
-
def
mkAttributedQualifier(tpe: Type): Tree
Builds a reference to value whose type is given stable prefix.
Builds a reference to value whose type is given stable prefix. The type must be suitable for this. For example, it must not be a TypeRef pointing to an abstract type variable.
- Definition Classes
- TreeGen
-
def
mkAttributedRef(sym: Symbol): Tree
Builds a reference to given symbol.
Builds a reference to given symbol.
- Definition Classes
- TreeGen
-
def
mkAttributedRef(pre: Type, sym: Symbol): Tree
Builds a reference to given symbol with given stable prefix.
Builds a reference to given symbol with given stable prefix.
- Definition Classes
- TreeGen
-
def
mkAttributedSelect(qual: Tree, sym: Symbol): Tree
- Definition Classes
- TreeGen
-
def
mkAttributedThis(sym: Symbol): Tree
Builds a reference with stable type to given symbol
Builds a reference with stable type to given symbol
- Definition Classes
- TreeGen
-
def
mkAttributedTypeApply(target: Tree, method: Symbol, targs: List[Type]): Tree
- Definition Classes
- TreeGen
-
def
mkCast(tree: Tree, pt: Type): Tree
Cast
tree
to typept
Cast
tree
to typept
- Definition Classes
- TreeGen
-
def
mkClassOf(tp: Type): Tree
Apparently we smuggle a Type around as a Literal(Constant(tp)) and the implementation of Constant#tpe is such that x.tpe becomes ClassType(value.asInstanceOf[Type]), i.e.
Apparently we smuggle a Type around as a Literal(Constant(tp)) and the implementation of Constant#tpe is such that x.tpe becomes ClassType(value.asInstanceOf[Type]), i.e. java.lang.Class[Type]. Can't find any docs on how/why it's done this way. See ticket SI-490 for some interesting comments from lauri alanko suggesting that the type given by classOf[T] is too strong and should be weakened so as not to suggest that classOf[List[String]] is any different from classOf[List[Int]].
!!! See deconstMap in Erasure for one bug this encoding has induced: I would be very surprised if there aren't more.
- Definition Classes
- TreeGen
-
def
mkIsInstanceOf(value: Tree, tpe: Type, any: Boolean = true, wrapInApply: Boolean = true): Tree
Builds an instance test with given value and type.
Builds an instance test with given value and type.
- Definition Classes
- TreeGen
-
def
mkMethodCall(target: Tree, targs: List[Type], args: List[Tree]): Tree
- Definition Classes
- TreeGen
-
def
mkMethodCall(receiver: Tree, method: Symbol, targs: List[Type], args: List[Tree]): Tree
- Definition Classes
- TreeGen
-
def
mkMethodCall(receiver: Symbol, methodName: Name, args: List[Tree]): Tree
- Definition Classes
- TreeGen
-
def
mkMethodCall(target: Tree, args: List[Tree]): Tree
- Definition Classes
- TreeGen
-
def
mkMethodCall(method: Symbol, args: List[Tree]): Tree
- Definition Classes
- TreeGen
-
def
mkMethodCall(method: Symbol, targs: List[Type], args: List[Tree]): Tree
- Definition Classes
- TreeGen
-
def
mkMethodCall(receiver: Symbol, methodName: Name, targs: List[Type], args: List[Tree]): Tree
A creator for method calls, e.g.
A creator for method calls, e.g. fn[T1, T2, ...](v1, v2, ...) There are a number of variations.
- receiver
symbol of the method receiver
- methodName
name of the method to call
- targs
type arguments (if Nil, no TypeApply node will be generated)
- args
value arguments
- returns
the newly created trees.
- Definition Classes
- TreeGen
-
def
mkNewCons(head: Tree, tail: Tree): Tree
Builds a list with given head and tail.
Builds a list with given head and tail.
- Definition Classes
- TreeGen
-
def
mkNil: Tree
Builds a list with given head and tail.
Builds a list with given head and tail.
- Definition Classes
- TreeGen
-
def
mkOr(tree1: Tree, tree2: Tree): Tree
- Definition Classes
- TreeGen
-
def
mkScalaDoc(target: Tree, elems: List[DocElement]): Commented
- Definition Classes
- DocGen
-
def
mkTuple(elems: List[Tree]): Tree
Builds a tuple
Builds a tuple
- Definition Classes
- TreeGen
-
def
mkTypeApply(target: Tree, method: Symbol, targs: List[Type]): Tree
- Definition Classes
- TreeGen
-
def
mkTypeApply(fun: Tree, targs: List[Tree]): Tree
Builds a type application node if args.nonEmpty, returns fun otherwise.
Builds a type application node if args.nonEmpty, returns fun otherwise.
- Definition Classes
- TreeGen
-
def
mkUnattributedRef(sym: Symbol): Tree
Builds an untyped reference to given symbol.
Builds an untyped reference to given symbol.
- Definition Classes
- TreeGen
-
def
mkZero(tp: Type): Tree
Builds a tree representing an undefined local, as in var x: T = _ which is appropriate to the given Type.
Builds a tree representing an undefined local, as in var x: T = _ which is appropriate to the given Type.
- Definition Classes
- TreeGen
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newLazyTreeCopier: TreeCopier
-
def
newScope(): Nil.type
Create a new scope
- def newStrictTreeCopier: TreeCopier
-
def
newTermName(name: String): TermName
- Definition Classes
- Names
-
def
newTreePrinter(): TreePrinter
- Definition Classes
- TreePrinters
-
def
newTreePrinter(stream: OutputStream): TreePrinter
- Definition Classes
- TreePrinters
-
def
newTreePrinter(writer: PrintWriter): TreePrinter
Hook to define what
show(tree)
means.Hook to define what
show(tree)
means.- Definition Classes
- TreePrinters → TreePrinters
-
def
newTypeName(name: String): TypeName
- Definition Classes
- Names
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
productConstr: Select
- Definition Classes
- TreeGen
-
implicit
def
promoteTermNamesAsNecessary(name: Name): TermName
- Definition Classes
- Names
-
def
quotedName(name: Name): String
- Definition Classes
- TreePrinters
-
def
quotedName(name: Name, decode: Boolean): String
Adds backticks if the name is a scala keyword.
Adds backticks if the name is a scala keyword.
- Definition Classes
- TreePrinters
-
def
refinedType(parents: List[Type], owner: Symbol, decls: List[Tree], customToString: String): Type
the canonical creator for a refined type with a given scope
the canonical creator for a refined type with a given scope
- Definition Classes
- Types
-
def
rootId(name: Name): Select
- Definition Classes
- TreeGen
-
def
rootScalaDot(name: Name): Select
- Definition Classes
- TreeGen
-
final
def
sameLength(xs1: List[_], xs2: List[_]): Boolean
True if two lists have the same length.
True if two lists have the same length. Since calling length on linear sequences is O(n), it is an inadvisable way to test length equality.
- Definition Classes
- Types
-
def
scalaAnyRefConstr: Select
- Definition Classes
- TreeGen
-
def
scalaDot(name: Name): Select
- Definition Classes
- TreeGen
-
def
scalaFunctionConstr(argtpes: List[Tree], restpe: Tree, abstractFun: Boolean = false): Tree
- Definition Classes
- TreeGen
-
def
scalaScalaObjectConstr: Select
- Definition Classes
- TreeGen
-
def
scalaUnitConstr: Select
- Definition Classes
- TreeGen
-
def
serializableConstr: Select
- Definition Classes
- TreeGen
-
def
show(tree: Tree, mkPrinter: (PrintWriter) ⇒ Forest.TreePrinter = newTreePrinter): String
- Definition Classes
- TreePrinters
-
final
val
showOuterTests: Boolean(false)
- Definition Classes
- TreePrinters
-
def
showRaw(tree: Tree): String
- Definition Classes
- TreePrinters
-
def
singleType(pre: Type, sym: Symbol): Type
The canonical creator for single-types
The canonical creator for single-types
- Definition Classes
- Types
-
lazy val
sn: SymbolNames
- Definition Classes
- StdNames
-
implicit
def
stringToTermName(s: String): TermName
- Definition Classes
- StdNames
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
val
treeCopy: TreeCopier
- Definition Classes
- Trees
-
def
treeToString(args: Any*): String
- Definition Classes
- TreePrinters
-
def
typeRef(pre: Type, sym: Symbol, args: Type*): Type
- Definition Classes
- Types
-
def
typeRef(pre: Type, sym: Symbol, args: List[Type]): Type
- Definition Classes
- Types
-
def
typeRef(sym: Symbol): Type
- Definition Classes
- Types
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
xprintTree(treePrinter: TreePrinter, tree: Tree): Unit
Hook for extensions
Hook for extensions
- Definition Classes
- TreePrinters
-
def
xtraverse(traverser: Traverser, tree: Tree): Unit
- Attributes
- protected
- Definition Classes
- Trees
-
object
nme
extends Forest.TermNames with Forest.TermNameMangling
- Definition Classes
- StdNames
-
object
tpnme
extends Forest.TypeNames with Forest.TypeNameMangling
- Definition Classes
- StdNames
- object NoSymbol extends Forest.Symbol
-
object
ConsoleWriter
extends Writer
A writer that writes to the current Console and is sensitive to replacement of the Console's output stream.
A writer that writes to the current Console and is sensitive to replacement of the Console's output stream.
- Definition Classes
- TreePrinters
-
object
treehuggerDSL
- Definition Classes
- TreehuggerDSLs
- object emptyValDef extends Forest.ValDef
- object AnnotatedType extends Forest.AnnotatedTypeExtractor with Serializable
-
object
ClassInfoType
extends Forest.ClassInfoTypeExtractor with Serializable
The constructor/deconstructor for
ClassInfoType
instances. -
object
ConstantType
extends Forest.ConstantTypeExtractor with Serializable
The constructor/deconstructor for
ConstantType
instances. -
object
ErrorType
extends Forest.Type with Product with Serializable
An object representing an erroneous type
An object representing an erroneous type
- Definition Classes
- Types
- object ExistentialType extends Forest.ExistentialTypeExtractor with Serializable
-
object
MethodType
extends Forest.MethodTypeExtractor with Serializable
The constructor/deconstructor for
MethodType
instances. -
object
NoPrefix
extends Forest.Type with Product with Serializable
An object representing a non-existing prefix
-
object
NoType
extends Forest.Type with Product with Serializable
An object representing a non-existing type
- object NullaryMethodType extends Forest.NullaryMethodTypeExtractor with Serializable
-
object
PathType
extends Serializable
- Definition Classes
- Types
- object PolyType extends Forest.PolyTypeExtractor with Serializable
-
object
RefinedType
extends Forest.RefinedTypeExtractor with Serializable
The constructor/deconstructor for
RefinedType
instances. -
object
SingleType
extends Forest.SingleTypeExtractor with Serializable
The constructor/deconstructor for
SingleType
instances. -
object
SuperType
extends Forest.SuperTypeExtractor with Serializable
The constructor/deconstructor for
SuperType
instances. -
object
ThisType
extends Forest.ThisTypeExtractor with Serializable
The constructor/deconstructor for
ThisType
instances. -
object
TypeBounds
extends Forest.TypeBoundsExtractor with Serializable
The constructor/deconstructor for
TypeBounds
instances. -
object
TypeRef
extends Forest.TypeRefExtractor with Serializable
The constructor/deconstructor for
TypeRef
instances. -
object
TypeVar
- Definition Classes
- Types
-
object
WildcardType
extends Forest.Type with Product with Serializable
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.
- Definition Classes
- Types
-
object
BackQuotedIdent
extends Serializable
- Definition Classes
- Trees
-
object
EmptyTree
extends Universe.Tree with Universe.TermTree with Product with Serializable
The empty tree
The empty tree
- Definition Classes
- Trees