Packages

  • package root

    The Scala compiler and reflection APIs.

    The Scala compiler and reflection APIs.

    Definition Classes
    root
  • package scala
    Definition Classes
    root
  • package tools
    Definition Classes
    scala
  • package nsc
    Definition Classes
    tools
  • package typechecker
    Definition Classes
    nsc
  • trait DestructureTypes extends AnyRef

    A generic means of breaking down types into their subcomponents.

    A generic means of breaking down types into their subcomponents. Types are decomposed top down, and recognizable substructure is dispatched via self-apparently named methods. Those methods can be overridden for custom behavior, but only the abstract methods require implementations, each of which must create some unknown "Node" type from its inputs.

    • wrapProduct create Node from a product of Nodes
    • wrapSequence create Node from a sequence of Nodes
    • wrapAtom create Node from an arbitrary value

    This is a work in progress.

    Definition Classes
    typechecker
  • DestructureType

trait DestructureType[Node] extends (Global.Type) => Node

Source
DestructureTypes.scala
Linear Supertypes
(Global.Type) => Node, AnyRef, Any
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DestructureType
  2. Function1
  3. AnyRef
  4. Any
Implicitly
  1. by UnliftOps
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def withLabel(node: Node, label: String): Node
  2. abstract def withType(node: Node, typeName: String): Node
  3. abstract def wrapAtom[U](value: U): Node
  4. abstract def wrapEmpty: Node
  5. abstract def wrapMono(in: Node, out: Node): Node
  6. abstract def wrapPoly(in: Node, out: Node): Node
  7. abstract def wrapProduct(nodes: List[Node]): Node
  8. abstract def wrapSequence(nodes: List[Node]): Node

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from DestructureType[Node] toany2stringadd[DestructureType[Node]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (DestructureType[Node], B)
    Implicit
    This member is added by an implicit conversion from DestructureType[Node] toArrowAssoc[DestructureType[Node]] performed by method ArrowAssoc in scala.Predef.This conversion will take place only if Node is a subclass of Option[Nothing] (Node <: Option[Nothing]).
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def andThen[A](g: (Node) => A): (Global.Type) => A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  7. def annotatedType(annotations: List[Global.AnnotationInfo], underlying: Global.Type): Node
  8. def annotation(ann: Global.AnnotationInfo): Node
  9. def apply(tp: Global.Type): Node
    Definition Classes
    DestructureType → Function1
  10. def apply(label: String, tp: Global.Type): Node
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def atom[U](label: String, value: U): Node
  13. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  14. def compose[A](g: (A) => Global.Type): (A) => Node
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  15. def constant(label: String, const: Global.Constant): Node
  16. def ensuring(cond: (DestructureType[Node]) => Boolean, msg: => Any): DestructureType[Node]
    Implicit
    This member is added by an implicit conversion from DestructureType[Node] toEnsuring[DestructureType[Node]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: (DestructureType[Node]) => Boolean): DestructureType[Node]
    Implicit
    This member is added by an implicit conversion from DestructureType[Node] toEnsuring[DestructureType[Node]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: Boolean, msg: => Any): DestructureType[Node]
    Implicit
    This member is added by an implicit conversion from DestructureType[Node] toEnsuring[DestructureType[Node]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean): DestructureType[Node]
    Implicit
    This member is added by an implicit conversion from DestructureType[Node] toEnsuring[DestructureType[Node]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  22. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  23. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from DestructureType[Node] toStringFormat[DestructureType[Node]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  24. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def list(nodes: List[Node]): Node
  28. def monoFunction(params: List[Global.Symbol], restpe: Global.Type): Node
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. def node(label: String, node: Node): Node
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. def nullaryFunction(restpe: Global.Type): Node
  34. def parentList(tps: List[Global.Type]): Node
  35. def polyFunction(tparams: List[Global.Symbol], restpe: Global.Type): Node
  36. def prefix(pre: Global.Type): Node
  37. def product(typeName: String, nodes: Node*): Node
  38. def product(tp: Global.Type, nodes: Node*): Node
  39. def resultType(restpe: Global.Type): Node
  40. def scope(decls: Global.Scope): Node
  41. def symbolType(sym: Global.Symbol): String
  42. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  43. def toString(): String
    Definition Classes
    Function1 → AnyRef → Any
  44. def typeArgs(tps: List[Global.Type]): Node
  45. def typeBounds(lo0: Global.Type, hi0: Global.Type): Node
  46. def typeConstraint(constr: Global.TypeConstraint): Node
  47. def typeParams(tps: List[Global.Symbol]): Node
  48. def typeRef(tp: Global.TypeRef): Node

    This imposes additional structure beyond that which is visible in the case class hierarchy.

    This imposes additional structure beyond that which is visible in the case class hierarchy. In particular, (too) many different constructs are encoded in TypeRefs; here they are partitioned somewhat before being dispatched.

    For example, a typical type parameter is encoded as TypeRef(NoPrefix, sym, Nil) with its upper and lower bounds stored in the info of the symbol. Viewing the TypeRef naively we are treated to both too much information (useless prefix, usually empty args) and too little (bounds hidden behind indirection.) So drop the prefix and promote the bounds.

  49. def typeRefType(sym: Global.Symbol): String
  50. def unlift: PartialFunction[Global.Type, B]
    Implicit
    This member is added by an implicit conversion from DestructureType[Node] toUnliftOps[Global.Type, B] performed by method UnliftOps in scala.Function1.This conversion will take place only if Node is a subclass of Option[B] (Node <: Option[B]).
    Definition Classes
    UnliftOps
  51. def valueParams(params: List[Global.Symbol]): Node
  52. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  53. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  54. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  55. def wrapSymbolInfo(sym: Global.Symbol): Node
  56. def wrapTree(tree: Global.Tree): Node

Deprecated Value Members

  1. def [B](y: B): (DestructureType[Node], B)
    Implicit
    This member is added by an implicit conversion from DestructureType[Node] toArrowAssoc[DestructureType[Node]] performed by method ArrowAssoc in scala.Predef.This conversion will take place only if Node is a subclass of Option[Nothing] (Node <: Option[Nothing]).
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from (Global.Type) => Node

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion UnliftOps fromDestructureType[Node] to UnliftOps[Global.Type, B]

Inherited by implicit conversion any2stringadd fromDestructureType[Node] to any2stringadd[DestructureType[Node]]

Inherited by implicit conversion StringFormat fromDestructureType[Node] to StringFormat[DestructureType[Node]]

Inherited by implicit conversion Ensuring fromDestructureType[Node] to Ensuring[DestructureType[Node]]

Inherited by implicit conversion ArrowAssoc fromDestructureType[Node] to ArrowAssoc[DestructureType[Node]]

Ungrouped