dotty.tools.dotc.ast

TypedTreeInfo

Related Doc: package ast

trait TypedTreeInfo extends TreeInfo[Type]

Self Type
TypedTreeInfo with Instance[Type]
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TypedTreeInfo
  2. TreeInfo
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class MatchingArgs extends AnyRef

    Definition Classes
    TreeInfo

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. def arguments(tree: (TypedTreeInfo.this)#Tree): List[(TypedTreeInfo.this)#Tree]

    The (last) list of arguments of an application

    The (last) list of arguments of an application

    Definition Classes
    TreeInfo
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def catchesAllOf(cdef: (TypedTreeInfo.this)#CaseDef, threshold: Type)(implicit ctx: Context): Boolean

    Does this CaseDef catch everything of a certain Type?

    Does this CaseDef catch everything of a certain Type?

    Definition Classes
    TreeInfo
  7. def catchesThrowable(cdef: (TypedTreeInfo.this)#CaseDef)(implicit ctx: Context): Boolean

    Does this CaseDef catch Throwable?

    Does this CaseDef catch Throwable?

    Definition Classes
    TreeInfo
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. object closure

    An extractor for closures, either contained in a block or standalone.

  10. def closureBody(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): (TypedTreeInfo.this)#Tree

    If tree is a closure, its body, otherwise tree itself

  11. def constToLiteral(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): (TypedTreeInfo.this)#Tree

    If tree is a constant expression, its value as a Literal, or tree itself otherwise.

    If tree is a constant expression, its value as a Literal, or tree itself otherwise.

    Note: Demanding idempotency instead of purity in literalize is strictly speaking too loose. Example

    object O { final val x = 42; println("43") } O.x

    Strictly speaking we can't replace O.x with 42. But this would make most expressions non-constant. Maybe we can change the spec to accept this kind of eliding behavior. Or else enforce true purity in the compiler. The choice will be affected by what we will do with inline and with Singleton type bounds (see SIP 23). Presumably

    object O1 { val x: Singleton = 42; println("43") } object O2 { inline val x = 42; println("43") }

    should behave differently.

    O1.x should have the same effect as { println("43"); 42 }

    whereas

    O2.x = 42

    Revisit this issue once we have implemented inline. Then we can demand purity of the prefix unless the selection goes to an inline val.

    Note: This method should be applied to all term tree nodes that are not literals, that can be idempotent, and that can have constant types. So far, only nodes of the following classes qualify:

    Ident Select TypeApply

  12. def decomposeCall(tree: (TypedTreeInfo.this)#Tree): ((TypedTreeInfo.this)#Tree, List[(TypedTreeInfo.this)#Tree], List[List[(TypedTreeInfo.this)#Tree]])

    Decompose a call fn[targs](vargs_1)...(vargs_n) into its constituents (where targs, vargss may be empty)

  13. def defKind(tree: (TypedTreeInfo.this)#Tree): FlagSet

    The largest subset of {NoInits, PureInterface} that a trait enclosing this statement can have as flags.

    The largest subset of {NoInits, PureInterface} that a trait enclosing this statement can have as flags. Does tree contain an initialization part when seen as a member of a class or trait?

    Definition Classes
    TreeInfo
  14. def defPath(sym: Symbol, root: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): List[(TypedTreeInfo.this)#Tree]

    Going from child to parent, the path of tree nodes that starts with a definition of symbol sym and ends with root, or Nil if no such path exists.

    Going from child to parent, the path of tree nodes that starts with a definition of symbol sym and ends with root, or Nil if no such path exists. Pre: sym must have a position.

  15. def definedSym(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): Symbol

    If tree is a DefTree, the symbol defined by it, otherwise NoSymbol

  16. def definingStats(sym: Symbol)(implicit ctx: Context): List[(TypedTreeInfo.this)#Tree]

    The statement sequence that contains a definition of sym, or Nil if none was found.

    The statement sequence that contains a definition of sym, or Nil if none was found. For a tree to be found, The symbol must have a position and its definition tree must be reachable from come tree stored in an enclosing context.

  17. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def firstConstructor(stats: List[(TypedTreeInfo.this)#Tree]): (TypedTreeInfo.this)#Tree

    The first constructor definition in stats

    The first constructor definition in stats

    Definition Classes
    TreeInfo
  21. def firstConstructorArgs(stats: List[(TypedTreeInfo.this)#Tree]): List[(TypedTreeInfo.this)#Tree]

    The arguments to the first constructor in stats.

    The arguments to the first constructor in stats.

    Definition Classes
    TreeInfo
  22. def forallResults(tree: (TypedTreeInfo.this)#Tree, p: ((TypedTreeInfo.this)#Tree) ⇒ Boolean): Boolean

    Checks whether predicate p is true for all result parts of this expression, where we zoom into Ifs, Matches, and Blocks.

    Checks whether predicate p is true for all result parts of this expression, where we zoom into Ifs, Matches, and Blocks.

    Definition Classes
    TreeInfo
  23. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  24. def hasNamedArg(args: List[Any]): Boolean

    Does this list contain a named argument tree?

    Does this list contain a named argument tree?

    Definition Classes
    TreeInfo
  25. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  26. def isCatchCase(cdef: (TypedTreeInfo.this)#CaseDef)(implicit ctx: Context): Boolean

    Is this pattern node a catch-all or type-test pattern?

  27. def isDeclarationOrTypeDef(tree: (TypedTreeInfo.this)#Tree): Boolean

    Definition Classes
    TreeInfo
  28. def isDefaultCase(cdef: (TypedTreeInfo.this)#CaseDef): Boolean

    Is this pattern node a catch-all (wildcard or variable) pattern?

    Is this pattern node a catch-all (wildcard or variable) pattern?

    Definition Classes
    TreeInfo
  29. def isGuardedCase(cdef: (TypedTreeInfo.this)#CaseDef): Boolean

    Is this case guarded?

    Is this case guarded?

    Definition Classes
    TreeInfo
  30. def isIdempotentExpr(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): Boolean

  31. def isIdempotentRef(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): Boolean

  32. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  33. def isLeftAssoc(operator: Name): Boolean

    Is name a left-associative operator?

    Is name a left-associative operator?

    Definition Classes
    TreeInfo
  34. val isNamedArg: (Any) ⇒ Boolean

    Definition Classes
    TreeInfo
  35. def isOpAssign(tree: (TypedTreeInfo.this)#Tree): Boolean

    Definition Classes
    TreeInfo
  36. def isPureExpr(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): Boolean

  37. def isPureRef(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): Boolean

  38. def isRepeatedParamType(tpt: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): Boolean

    Is tpt a vararg type of the form T* or => T*?

    Is tpt a vararg type of the form T* or => T*?

    Definition Classes
    TreeInfo
  39. def isSelf(tree: (TypedTreeInfo.this)#Tree, enclClass: Symbol)(implicit ctx: Context): Boolean

    Is tree a this node which belongs to enclClass?

  40. def isSelfConstrCall(tree: (TypedTreeInfo.this)#Tree): Boolean

    Is tree a self constructor call this(...)? I.e.

    Is tree a self constructor call this(...)? I.e. a call to a constructor of the same object?

    Definition Classes
    TreeInfo
  41. def isSelfOrSuperConstrCall(tree: (TypedTreeInfo.this)#Tree): Boolean

    Definition Classes
    TreeInfo
  42. def isSuperConstrCall(tree: (TypedTreeInfo.this)#Tree): Boolean

    Is tree a super constructor call?

    Is tree a super constructor call?

    Definition Classes
    TreeInfo
  43. def isSuperSelection(tree: untpd.Tree): Boolean

    Definition Classes
    TreeInfo
  44. def isSyntheticDefaultCase(cdef: (TypedTreeInfo.this)#CaseDef): Boolean

    Is this pattern node a synthetic catch-all case, added during PartialFuction synthesis before we know whether the user provided cases are exhaustive.

    Is this pattern node a synthetic catch-all case, added during PartialFuction synthesis before we know whether the user provided cases are exhaustive.

    Definition Classes
    TreeInfo
  45. def isVarPattern(pat: untpd.Tree): Boolean

    Is tree a variable pattern?

    Is tree a variable pattern?

    Definition Classes
    TreeInfo
  46. def isVariableOrGetter(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): Boolean

    Is tree a reference to a mutable variable, or to a potential getter that has a setter in the same class?

  47. def isWildcardArg(tree: (TypedTreeInfo.this)#Tree): Boolean

    Is the argument a wildcard argument of the form _ or x @ _?

    Is the argument a wildcard argument of the form _ or x @ _?

    Definition Classes
    TreeInfo
  48. def isWildcardStarArg(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): Boolean

    Is this argument node of the form <expr> : _* ?

    Is this argument node of the form <expr> : _* ?

    Definition Classes
    TreeInfo
  49. def isWildcardStarArgList(trees: List[(TypedTreeInfo.this)#Tree])(implicit ctx: Context): Boolean

    Does this argument list end with an argument of the form <expr> : _* ?

    Does this argument list end with an argument of the form <expr> : _* ?

    Definition Classes
    TreeInfo
  50. def localSyms(stats: List[(TypedTreeInfo.this)#Tree])(implicit ctx: Context): List[Symbol]

    The symbols defined locally in a statement list

  51. def mayBeTypePat(tree: untpd.Tree): Boolean

    can this type be a type pattern?

    can this type be a type pattern?

    Definition Classes
    TreeInfo
  52. def mayBeVarGetter(sym: Symbol)(implicit ctx: Context): Boolean

    Is symbol potentially a getter of a mutable variable?

  53. def methPart(tree: (TypedTreeInfo.this)#Tree): (TypedTreeInfo.this)#Tree

    The method part of an application node, possibly enclosed in a block with only valdefs as statements.

    The method part of an application node, possibly enclosed in a block with only valdefs as statements. the reason for also considering blocks is that named arguments can transform a call into a block, e.g. <init>(b = foo, a = bar) is transformed to { val x$1 = foo val x$2 = bar <init>(x$2, x$1) }

    Definition Classes
    TreeInfo
  54. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  55. final def notify(): Unit

    Definition Classes
    AnyRef
  56. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  57. def numArgs(tree: (TypedTreeInfo.this)#Tree): Int

    The number of arguments in an application

    The number of arguments in an application

    Definition Classes
    TreeInfo
  58. def patVars(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): List[Symbol]

    The variables defined by a pattern, in reverse order of their appearance.

  59. def sliceTopLevel(tree: (TypedTreeInfo.this)#Tree, cls: ClassSymbol)(implicit ctx: Context): List[(TypedTreeInfo.this)#Tree]

    The tree containing only the top-level classes and objects matching either cls or its companion object

  60. def stripApply(tree: (TypedTreeInfo.this)#Tree): (TypedTreeInfo.this)#Tree

    If this is an application, its function part, stripping all Apply nodes (but leaving TypeApply nodes in).

    If this is an application, its function part, stripping all Apply nodes (but leaving TypeApply nodes in). Otherwise the tree itself.

    Definition Classes
    TreeInfo
  61. def stripCast(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): (TypedTreeInfo.this)#Tree

    Strips layers of .asInstanceOf[T] / _.$asInstanceOf[T]() from an expression

  62. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  63. def toString(): String

    Definition Classes
    AnyRef → Any
  64. def topLevelClasses(tree: (TypedTreeInfo.this)#Tree)(implicit ctx: Context): List[ClassSymbol]

    The top level classes in this tree, including only those module classes that are not a linked class of some other class in the result.

  65. def unbind(x: (TypedTreeInfo.this)#Tree): (TypedTreeInfo.this)#Tree

    The underlying pattern ignoring any bindings

    The underlying pattern ignoring any bindings

    Definition Classes
    TreeInfo
  66. def unsplice[T >: Untyped](tree: Tree[T]): Tree[T]

    Definition Classes
    TreeInfo
  67. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  68. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from TreeInfo[Type]

Inherited from AnyRef

Inherited from Any

Ungrouped