abstract class Universe extends Symbols with Types with Constants with Scopes with Names with Trees with AnnotationInfos with StandardDefinitions with TreePrinters
- Alphabetic
- By Inheritance
- Universe
- TreePrinters
- StandardDefinitions
- AnnotationInfos
- Trees
- Names
- Scopes
- Constants
- Types
- Symbols
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Universe()
Type Members
-
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
-
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
-
trait
TreePrinter
extends AnyRef
- 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
-
abstract
type
AnnotatedType <: Type
- Definition Classes
- Types
-
abstract
type
AnnotationInfo <: AbsAnnotationInfo
- Definition Classes
- AnnotationInfos
-
abstract
type
AnnotationType
- Definition Classes
- Trees
-
abstract
type
ClassInfoType <: CompoundType
The
ClassInfo
type signature is used to define parents and declarations of classes, traits, and objects.The
ClassInfo
type signature is used to define parents and declarations of classes, traits, and objects. If a class, trait, or object C is declared like thisC extends P_1 with ... with P_m { D_1; ...; D_n}
its
ClassInfo
type has the following form:ClassInfo(List(P_1, ..., P_m), Scope(D_1, ..., D_n), C)
- Definition Classes
- Types
-
abstract
type
ClassfileAnnotArg <: AnyRef
- Definition Classes
- AnnotationInfos
-
abstract
type
CompoundType <: Type
A subtype of Type representing refined types as well as
ClassInfo
signatures.A subtype of Type representing refined types as well as
ClassInfo
signatures.- Definition Classes
- Types
-
abstract
type
Constant <: AbsConstant
- Definition Classes
- Constants
-
abstract
type
ConstantType <: SingletonType
The
ConstantType
type is not directly written in user programs, but arises as the type of a constant.The
ConstantType
type is not directly written in user programs, but arises as the type of a constant. The REPL expresses constant types like Int(11). Here are some constants with their types.1 ConstantType(Constant(1)) "abc" ConstantType(Constant("abc"))
- Definition Classes
- Types
-
abstract
type
ExistentialType <: Type
- Definition Classes
- Types
-
abstract
type
MethodType <: Type
The
MethodType
type signature is used to indicate parameters and result type of a methodThe
MethodType
type signature is used to indicate parameters and result type of a method- Definition Classes
- Types
-
abstract
type
Modifiers <: AbsModifiers
- Definition Classes
- Trees
-
abstract
type
NullaryMethodType <: Type
- Definition Classes
- Types
-
abstract
type
PolyType <: Type
- Definition Classes
- Types
- abstract type Position
-
abstract
type
RefinedType <: CompoundType
The
RefinedType
type defines types of any of the forms on the left, with their RefinedType representations to the right.The
RefinedType
type defines types of any of the forms on the left, with their RefinedType representations to the right.P_1 with ... with P_m { D_1; ...; D_n} RefinedType(List(P_1, ..., P_m), Scope(D_1, ..., D_n)) P_1 with ... with P_m RefinedType(List(P_1, ..., P_m), Scope()) { D_1; ...; D_n} RefinedType(List(AnyRef), Scope(D_1, ..., D_n))
- Definition Classes
- Types
-
abstract
type
Scope
- Definition Classes
- Scopes
-
abstract
type
SingleType <: SingletonType
The
SingleType
type describes types of any of the forms on the left, with their TypeRef representations to the right.The
SingleType
type describes types of any of the forms on the left, with their TypeRef representations to the right.(T # x).type SingleType(T, x) p.x.type SingleType(p.type, x) x.type SingleType(NoPrefix, x)
- Definition Classes
- Types
-
abstract
type
SingletonType >: Null <: Type
The type of Scala singleton types, i.e.
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.
- Definition Classes
- Types
-
abstract
type
SuperType <: SingletonType
The
SuperType
type is not directly written, but arises whenC.super
is used as a prefix in aTypeRef
orSingleType
.The
SuperType
type is not directly written, but arises whenC.super
is used as a prefix in aTypeRef
orSingleType
. It's internal presentation isSuperType(thistpe, supertpe)
Here,
thistpe
is the type of the corresponding this-type. For instance, in the type arising from C.super, thethistpe
part would beThisType(C)
.supertpe
is the type of the super class referred to by thesuper
.- Definition Classes
- Types
-
abstract
type
Symbol >: Null <: AbsSymbol
- Definition Classes
- Symbols
-
abstract
type
ThisType <: SingletonType
The
ThisType
type describes types of the form on the left with the correspnding ThisType representations to the right.The
ThisType
type describes types of the form on the left with the correspnding ThisType representations to the right.C.this.type ThisType(C)
- Definition Classes
- Types
-
abstract
type
TreeCopier <: TreeCopierOps
- Definition Classes
- Trees
-
abstract
type
Type >: Null <: AbsType
The type of Scala types, and also Scala type signatures.
The type of Scala types, and also Scala type signatures. (No difference is internally made between the two).
- Definition Classes
- Types
-
abstract
type
TypeBounds <: Type
The
TypeBounds
type signature is used to indicate lower and upper type bounds of type parameters and abstract types.The
TypeBounds
type signature is used to indicate lower and upper type bounds of type parameters and abstract types. It is not a first-class type. If an abstract type or type parameter is declared with any of the forms on the left, its type signature is the TypeBounds type on the right.T >: L <: U TypeBounds(L, U) T >: L TypeBounds(L, Any) T <: U TypeBounds(Nothing, U)
- Definition Classes
- Types
-
abstract
type
TypeRef <: Type
The
TypeRef
type describes types of any of the forms on the left, with their TypeRef representations to the right.The
TypeRef
type describes types of any of the forms on the left, with their TypeRef representations to the right.T # C[T_1, ..., T_n] TypeRef(T, C, List(T_1, ..., T_n)) p.C[T_1, ..., T_n] TypeRef(p.type, C, List(T_1, ..., T_n)) C[T_1, ..., T_n] TypeRef(NoPrefix, C, List(T_1, ..., T_n)) T # C TypeRef(T, C, Nil) p.C TypeRef(p.type, C, Nil) C TypeRef(NoPrefix, C, Nil)
- Definition Classes
- Types
Abstract Value Members
-
abstract
val
AnnotatedType: AnnotatedTypeExtractor
- Definition Classes
- Types
-
abstract
val
AnnotationInfo: AnnotationInfoExtractor
- Definition Classes
- AnnotationInfos
-
abstract
val
ClassInfoType: ClassInfoTypeExtractor
The constructor/deconstructor for
ClassInfoType
instances.The constructor/deconstructor for
ClassInfoType
instances.- Definition Classes
- Types
-
abstract
val
Constant: ConstantExtractor
- Definition Classes
- Constants
-
abstract
val
ConstantType: ConstantTypeExtractor
The constructor/deconstructor for
ConstantType
instances.The constructor/deconstructor for
ConstantType
instances.- Definition Classes
- Types
-
abstract
val
ExistentialType: ExistentialTypeExtractor
- Definition Classes
- Types
-
abstract
val
MethodType: MethodTypeExtractor
The constructor/deconstructor for
MethodType
instances.The constructor/deconstructor for
MethodType
instances.- Definition Classes
- Types
-
abstract
def
Modifiers(mods: Set[Modifier.Value] = Set(), privateWithin: Name = EmptyTypeName, annotations: List[AnnotationInfo] = List()): Modifiers
- Definition Classes
- Trees
- abstract val NoPosition: Position
-
abstract
val
NoPrefix: Type
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 asSingleType(NoPrefix, <x>)
, where<x>
stands for the symbol forx
.- Definition Classes
- Types
-
abstract
val
NoSymbol: Symbol
- Definition Classes
- Symbols
-
abstract
val
NoType: Type
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.
- Definition Classes
- Types
-
abstract
val
NullaryMethodType: NullaryMethodTypeExtractor
- Definition Classes
- Types
-
abstract
val
PolyType: PolyTypeExtractor
- Definition Classes
- Types
-
abstract
val
RefinedType: RefinedTypeExtractor
The constructor/deconstructor for
RefinedType
instances.The constructor/deconstructor for
RefinedType
instances.- Definition Classes
- Types
-
abstract
val
SingleType: SingleTypeExtractor
The constructor/deconstructor for
SingleType
instances.The constructor/deconstructor for
SingleType
instances.- Definition Classes
- Types
-
abstract
val
SuperType: SuperTypeExtractor
The constructor/deconstructor for
SuperType
instances.The constructor/deconstructor for
SuperType
instances.- Definition Classes
- Types
-
abstract
val
ThisType: ThisTypeExtractor
The constructor/deconstructor for
ThisType
instances.The constructor/deconstructor for
ThisType
instances.- Definition Classes
- Types
-
abstract
val
TypeBounds: TypeBoundsExtractor
The constructor/deconstructor for
TypeBounds
instances.The constructor/deconstructor for
TypeBounds
instances.- Definition Classes
- Types
-
abstract
val
TypeRef: TypeRefExtractor
The constructor/deconstructor for
TypeRef
instances.The constructor/deconstructor for
TypeRef
instances.- Definition Classes
- Types
-
implicit abstract
def
classfileAnnotArgManifest: ClassManifest[ClassfileAnnotArg]
- Definition Classes
- AnnotationInfos
-
abstract
val
definitions: AbsDefinitions
- Definition Classes
- StandardDefinitions
-
abstract
def
emptyValDef: ValDef
- Definition Classes
- Trees
-
abstract
def
newLazyTreeCopier: TreeCopier
- Definition Classes
- Trees
-
abstract
def
newScope(): Scope
- Definition Classes
- Scopes
-
abstract
def
newStrictTreeCopier: TreeCopier
- Definition Classes
- Trees
-
abstract
def
newTreePrinter(out: PrintWriter): TreePrinter
Hook to define what
show(tree)
means.Hook to define what
show(tree)
means.- Definition Classes
- TreePrinters
Concrete Value Members
-
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
-
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
BackQuotedIdent(sym: Symbol): BackQuotedIdent
- Definition Classes
- Trees
-
def
EmptyTypeName: TypeName
- Definition Classes
- Names
-
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
-
def
Interpolated(sym: Symbol, args: List[Tree]): Interpolated
- Definition Classes
- Trees
-
def
Select(qualifier: Tree, sym: Symbol): Select
- Definition Classes
- Trees
-
def
TypeTree(tp: Type): TypeTree
- Definition Classes
- Trees
-
def
ValDef(mods: Modifiers, name: Name, tpt: Tree, rhs: Tree): ValDef
- Definition Classes
- Trees
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newTermName(name: String): TermName
- Definition Classes
- Names
-
def
newTypeName(name: String): TypeName
- Definition Classes
- Names
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
implicit
def
promoteTermNamesAsNecessary(name: Name): TermName
- Definition Classes
- Names
-
def
show(tree: Tree, mkPrinter: (PrintWriter) ⇒ TreePrinter = newTreePrinter): String
- Definition Classes
- TreePrinters
-
def
showRaw(tree: Tree): String
- Definition Classes
- TreePrinters
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
val
treeCopy: TreeCopier
- Definition Classes
- Trees
-
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
xtraverse(traverser: Traverser, tree: Tree): Unit
- Attributes
- protected
- Definition Classes
- Trees