Types

tastyquery.Types$
object Types

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Types.type

Members list

Concise view

Type members

Classlikes

final class AndType(val first: Type, val second: Type) extends GroundType with ValueType

Attributes

Companion:
object
Graph
Supertypes
trait ValueType
trait TermType
class Type
class Prefix
class Object
trait Matchable
class Any
object AndType

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
AndType.type
final class AnnotatedType(val typ: Type, val annotation: Tree) extends TypeProxy with ValueType

typ @ annot

typ @ annot

Attributes

Graph
Supertypes
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
final class AppliedType(val tycon: Type, val args: List[Type]) extends TypeProxy with ValueType

A type application C[T_1, ..., T_n] Typebounds for wildcard application: C[_], C[?]

A type application C[T_1, ..., T_n] Typebounds for wildcard application: C[_], C[?]

Attributes

Graph
Supertypes
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
sealed trait Binders

Encapsulates the binders associated with a ParamRef.

Encapsulates the binders associated with a ParamRef.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
sealed trait BoundType extends Type

Attributes

Graph
Supertypes
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
final class BoundedType(val bounds: TypeBounds, val alias: Option[Type]) extends Type

Attributes

Graph
Supertypes
class Type
class Prefix
class Object
trait Matchable
class Any
final class ConstantType(val value: Constant) extends TypeProxy with SingletonType

A constant type with single value.

A constant type with single value.

Attributes

Graph
Supertypes
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
abstract class CustomTransientGroundType extends GroundType

Superclass for custom transient ground types used by custom algorithms.

Superclass for custom transient ground types used by custom algorithms.

When writing algorithms that manipulate Types, it is sometimes useful to temporarily store custom data in place of Types. This can be done by defining a subclass of CustomTransientGroundType. At the end of the day, all CustomTransientGroundTypes should have been replaced by proper Types.

The methods of tasty-query never expose instances of CustomTransientGroundType, but you may use it for your own purposes.

When permorming an exhaustive match on all possible Types, you should cover CustomTransientGroundType in a case that always throws (unless you are actually using it for some purposes):

val tpe: Type = ...
tpe match
 case tpe: TypeRef => ...
 ...
 case tpe: CustomTransientGroundType =>
   throw AssertionError(s"Unexpected custom transient ground type $tpe")
end match

Attributes

Graph
Supertypes
class Type
class Prefix
class Object
trait Matchable
class Any

Attributes

Companion:
object
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Attributes

Companion:
enum
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final class ExprType(val resultType: Type) extends TypeProxy with MethodicType

A by-name parameter type of the form => T, or the type of a method with no parameter list.

A by-name parameter type of the form => T, or the type of a method with no parameter list.

Attributes

Graph
Supertypes
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
sealed abstract class GroundType extends Type

Non-proxy types

Non-proxy types

Attributes

Graph
Supertypes
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
sealed trait LambdaType extends ParamRefBinders with TermType

Attributes

Graph
Supertypes
trait TermType
trait Binders
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
sealed abstract class LambdaTypeCompanion[N <: Name, PInfo <: Type | TypeBounds, LT <: LambdaType]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object MethodType.type
object PolyType.type
object TypeLambda.type
final class MatchType(val bound: Type, val scrutinee: Type, val cases: List[MatchTypeCase | TypeLambda]) extends TypeProxy with ValueType

selector match { cases }

selector match { cases }

Attributes

Graph
Supertypes
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
final class MatchTypeCase(val pattern: Type, val result: Type) extends GroundType

case pattern => result

case pattern => result

Attributes

Graph
Supertypes
class Type
class Prefix
class Object
trait Matchable
class Any
final class MethodType(val paramNames: List[TermName])(paramTypesExp: MethodType => List[Type], resultTypeExp: MethodType => Type) extends MethodicType with TermLambdaType

Attributes

Companion:
object
Graph
Supertypes
trait Binders
trait TermType
class Type
class Prefix
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait MethodicType extends TermType

Attributes

Graph
Supertypes
trait TermType
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
class ExprType
class PolyType
sealed abstract class NamedType extends PathType

Attributes

Companion:
object
Graph
Supertypes
trait PathType
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
class TermRef
class TypeRef
Self type
object NamedType

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class NamedTypeBounds(val name: TypeName, val bounds: TypeBounds) extends Type

Attributes

Graph
Supertypes
class Type
class Prefix
class Object
trait Matchable
class Any
object NoPrefix extends Prefix

Attributes

Graph
Supertypes
class Prefix
class Object
trait Matchable
class Any
Self type
final class OrType(val first: Type, val second: Type) extends GroundType with ValueType

Attributes

Companion:
object
Graph
Supertypes
trait ValueType
trait TermType
class Type
class Prefix
class Object
trait Matchable
class Any
object OrType

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
OrType.type
final class PackageRef(val fullyQualifiedName: FullyQualifiedName) extends Type

Attributes

Graph
Supertypes
class Type
class Prefix
class Object
trait Matchable
class Any
sealed trait ParamRef extends BoundType

Attributes

Graph
Supertypes
trait BoundType
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
sealed trait ParamRefBinders extends Binders

Attributes

Graph
Supertypes
trait Binders
class Object
trait Matchable
class Any
Known subtypes
sealed trait PathType extends TypeProxy with ValueType

Attributes

Graph
Supertypes
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
class NamedType
class TermRef
class TypeRef
class ThisType
final class PolyType extends MethodicType with Binders with TypeLambdaType

Attributes

Companion:
object
Graph
Supertypes
trait Binders
trait TermType
class Type
class Prefix
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed abstract class Prefix extends TypeMappable

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
final case class RealTypeBounds(low: Type, high: Type) extends TypeBounds

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
final class RecThis(binder: RecType) extends BoundType with SingletonType

Attributes

Graph
Supertypes
trait ValueType
trait TermType
trait BoundType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
final class RecType extends RefinedOrRecType with Binders

Attributes

Companion:
object
Graph
Supertypes
trait Binders
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
object RecType

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
RecType.type
sealed abstract class RefinedOrRecType extends TypeProxy

Attributes

Graph
Supertypes
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
sealed abstract class RefinedType extends RefinedOrRecType with ValueType

Attributes

Graph
Supertypes
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
sealed trait SingletonType extends TypeProxy with ValueType

A marker trait for types that are guaranteed to contain only a single non-null value (they might contain null in addition).

A marker trait for types that are guaranteed to contain only a single non-null value (they might contain null in addition).

Attributes

Graph
Supertypes
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
final class SuperType(val thistpe: ThisType, val explicitSupertpe: Option[Type]) extends TypeProxy with SingletonType

The type of a super reference cls.super where thistpe is cls.this and supertpe is the type of the value referenced by super.

The type of a super reference cls.super where thistpe is cls.this and supertpe is the type of the value referenced by super.

Attributes

Graph
Supertypes
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
sealed trait TermLambdaType extends LambdaType

Attributes

Graph
Supertypes
trait TermType
trait Binders
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
final class TermParamRef(val binders: TermLambdaType, val paramNum: Int) extends ParamRef with SingletonType

Attributes

Graph
Supertypes
trait ValueType
trait TermType
trait ParamRef
trait BoundType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
final class TermRef extends NamedType with SingletonType

The singleton type for path prefix#myDesignator.

The singleton type for path prefix#myDesignator.

Attributes

Companion:
object
Graph
Supertypes
class NamedType
trait PathType
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
object TermRef

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
TermRef.type
final class TermRefinement(val parent: Type, val refinedName: TermName, val refinedType: Type) extends RefinedType

A term refinement parent { val/def refinedName: refinedType }.

A term refinement parent { val/def refinedName: refinedType }.

Attributes

parent

The type being refined

refinedName

The name of the refined term member

refinedType

The refined type for the given term member

Graph
Supertypes
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
sealed trait TermType extends Type

A marker trait for types that apply only to term symbols or that represent higher-kinded types.

A marker trait for types that apply only to term symbols or that represent higher-kinded types.

Attributes

Graph
Supertypes
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
final class ThisType(val tref: TypeRef) extends PathType with SingletonType

Attributes

Graph
Supertypes
trait PathType
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
abstract class Type extends Prefix

Attributes

Graph
Supertypes
class Prefix
class Object
trait Matchable
class Any
Known subtypes
final case class TypeAlias(alias: Type) extends TypeBounds

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
sealed trait TypeBinders extends ParamRefBinders

Attributes

Graph
Supertypes
trait Binders
class Object
trait Matchable
class Any
Known subtypes
sealed abstract class TypeBounds(val low: Type, val high: Type) extends TypeMappable

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
final class TypeLambda(val paramNames: List[TypeName])(paramTypeBoundsExp: TypeLambda => List[TypeBounds], resultTypeExp: TypeLambda => Type) extends TypeProxy with TermType with TypeLambdaType

Attributes

Companion:
object
Graph
Supertypes
trait Binders
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait TypeLambdaType extends LambdaType with TypeBinders

Attributes

Graph
Supertypes
trait TermType
trait Binders
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
class PolyType

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object PolyType.type
object TypeLambda.type
sealed trait TypeMappable

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
final class TypeParamRef(val binders: TypeLambdaType, val paramNum: Int) extends TypeProxy with ValueType with ParamRef

Attributes

Graph
Supertypes
trait ParamRef
trait BoundType
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
sealed abstract class TypeProxy extends Type

Type proxies. Each implementation is expected to redefine the underlying method.

Type proxies. Each implementation is expected to redefine the underlying method.

Attributes

Graph
Supertypes
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
final class TypeRef extends NamedType

Attributes

Companion:
object
Graph
Supertypes
class NamedType
trait PathType
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
object TypeRef

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
TypeRef.type
final class TypeRefinement(val parent: Type, val refinedName: TypeName, val refinedBounds: TypeBounds) extends RefinedType

A type refinement parent { type refinedName <:> refinedBounds }.

A type refinement parent { type refinedName <:> refinedBounds }.

Attributes

parent

The type being refined

refinedBounds

The refined bounds for the given type member

refinedName

The name of the refined type member

Graph
Supertypes
trait ValueType
trait TermType
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any
sealed trait ValueType extends TermType

A marker trait for types that can be types of values or that are higher-kinded

A marker trait for types that can be types of values or that are higher-kinded

Attributes

Graph
Supertypes
trait TermType
class Type
class Prefix
class Object
trait Matchable
class Any
Known subtypes
final class WildcardTypeBounds(val bounds: TypeBounds) extends TypeProxy

Attributes

Graph
Supertypes
class TypeProxy
class Type
class Prefix
class Object
trait Matchable
class Any