trait Types extends treehugger.api.Types
- Alphabetic
- By Inheritance
- Types
- Types
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- abstract class AbsTypeImpl extends Forest.AbsType
-
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.
-
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
-
abstract
class
CompoundType
extends Forest.Type
A common base class for intersection types and class types
-
abstract
case class
ConstantType
(value: Forest.Constant) extends Forest.SingletonType with Product with Serializable
A class representing a constant type.
A class representing a constant type.
- value
...
- case class ExistentialType (quantified: List[Forest.Tree], underlying: Forest.Type) extends Forest.Type with Product with Serializable
- class JavaMethodType extends Forest.MethodType
-
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)
-
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.
- case class NotNullType (underlying: Forest.Type) extends Forest.SubType with Product with Serializable
- case class NullaryMethodType (resultType: Forest.Type) extends Forest.Type with Forest.SimpleTypeProxy with Product with Serializable
-
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
. - class PackageClassInfoType extends Forest.ClassInfoType
-
case class
PathType
(tree: Forest.Tree) extends Forest.Type with Product with Serializable
A class representing a path dependent type
- final class PathType0 extends Forest.PathType
-
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.
-
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. - final class RefinedType0 extends Forest.RefinedType
-
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. -
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. - abstract class SingletonType extends Forest.SubType with Forest.SimpleTypeProxy with Forest.AbsSingletonType
-
abstract
class
SubType
extends Forest.Type
A base class for types that defer some operations to their immediate supertype.
- abstract case class SuperType (thistpe: Forest.Type, supertpe: Forest.Type) extends Forest.SingletonType with Product with Serializable
-
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
-
abstract
class
Type
extends Forest.AbsTypeImpl
The base class for all 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
-
class
TypeConstraint
extends AnyRef
A class expressing upper and lower bounds constraints of type variables, as well as their instantiations.
-
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
...
-
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.
- final class UniqueConstantType extends Forest.ConstantType with Forest.UniqueType
- final class UniqueSingleType extends Forest.SingleType with Forest.UniqueType
- final class UniqueSuperType extends Forest.SuperType with Forest.UniqueType
- final class UniqueThisType extends Forest.ThisType with Forest.UniqueType
- trait UniqueType extends Product
- final class UniqueTypeBounds extends Forest.TypeBounds with Forest.UniqueType
- final class UniqueTypeRef extends Forest.TypeRef with Forest.UniqueType
-
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
-
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
annotatedType(annots: List[Forest.AnnotationInfo], underlying: Forest.Type, selfsym: Forest.Symbol = NoSymbol): Forest.Type
Creator for AnnotatedTypes.
Creator for AnnotatedTypes. It returns the underlying type if annotations.isEmpty rather than walking into the assertion.
-
def
appliedType(tycon: Forest.Type, args: List[Forest.Type]): Forest.Type
A creator for type applications
- def appliedType(tycon: Forest.Type, args: Forest.Type*): Forest.Type
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val builtinFullNames: Set[String]
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
compareLengths(xs1: List[_], xs2: List[_]): Int
- Annotations
- @tailrec()
- def copyTypeRef(tp: Forest.Type, pre: Forest.Type, sym: Forest.Symbol, args: List[Forest.Type]): Forest.Type
-
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
-
final
def
hasLength(xs: List[_], len: Int): Boolean
Again avoiding calling length, but the lengthCompare interface is clunky.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
val
maxTostringRecursions: Int(50)
The maximum number of recursions allowed in toString
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
refinedType(parents: List[Forest.Type], owner: Forest.Symbol, decls: List[Forest.Tree], customToString: String): Forest.Type
the canonical creator for a refined type with a given scope
-
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.
-
def
singleType(pre: Forest.Type, sym: Forest.Symbol): Forest.Type
The canonical creator for single-types
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def typeRef(pre: Forest.Type, sym: Forest.Symbol, args: Forest.Type*): Forest.Type
- def typeRef(pre: Forest.Type, sym: Forest.Symbol, args: List[Forest.Type]): Forest.Type
- def typeRef(sym: Forest.Symbol): Forest.Type
-
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( ... )
- 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
- 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
- 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
-
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.