scala.reflect.api

Trees

trait Trees extends AnyRef

Self Type
Universe
Source
Trees.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Trees
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbsModifiers extends AnyRef

  2. case class Alternative(trees: List[Tree]) extends Tree with TermTree with Product with Serializable

    Alternatives of patterns, eliminated by explicitouter, except for occurrences in encoded Switch stmt (=remaining Match(CaseDef(.

  3. case class Annotated(annot: Tree, arg: Tree) extends Tree with Product with Serializable

    A tree that has an annotation attached to it.

  4. case class AppliedTypeTree(tpt: Tree, args: List[Tree]) extends Tree with TypTree with Product with Serializable

    Applied type <tpt> [ <args> ], eliminated by RefCheck

  5. case class Apply(fun: Tree, args: List[Tree]) extends GenericApply with Product with Serializable

    Value application

  6. case class ApplyDynamic(qual: Tree, args: List[Tree]) extends Tree with TermTree with SymTree with Product with Serializable

    Dynamic value application.

  7. class ApplyImplicitView extends Apply

  8. class ApplyToImplicitArgs extends Apply

  9. case class ArrayValue(elemtpt: Tree, elems: List[Tree]) extends Tree with TermTree with Product with Serializable

    Array of expressions, needs to be translated in backend,

  10. case class Assign(lhs: Tree, rhs: Tree) extends Tree with TermTree with Product with Serializable

    Assignment

  11. class BackQuotedIdent extends Ident

  12. case class Bind(name: Name, body: Tree) extends DefTree with Product with Serializable

    Bind of a variable to a rhs pattern, eliminated by explicitouter

  13. case class Block(stats: List[Tree], expr: Tree) extends Tree with TermTree with Product with Serializable

    Block of expressions (semicolon separated expressions)

  14. case class CaseDef(pat: Tree, guard: Tree, body: Tree) extends Tree with Product with Serializable

    Case clause in a pattern match, eliminated during explicitouter (except for occurrences in switch statements)

  15. case class ClassDef(mods: Modifiers, name: TypeName, tparams: List[TypeDef], impl: Template) extends ImplDef with Product with Serializable

    A class definition.

  16. case class CompoundTypeTree(templ: Template) extends Tree with TypTree with Product with Serializable

    Intersection type <parent1> with .

  17. case class DefDef(mods: Modifiers, name: Name, tparams: List[TypeDef], vparamss: List[List[ValDef]], tpt: Tree, rhs: Tree) extends ValOrDefDef with Product with Serializable

    A method or macro definition.

  18. abstract class DefTree extends Tree with SymTree

    A tree which defines a symbol-carrying entity.

  19. case class ExistentialTypeTree(tpt: Tree, whereClauses: List[Tree]) extends Tree with TypTree with Product with Serializable

  20. class FilterTreeTraverser extends Traverser

  21. class FindTreeTraverser extends Traverser

  22. class ForeachTreeTraverser extends Traverser

  23. case class Function(vparams: List[ValDef], body: Tree) extends Tree with TermTree with SymTree with Product with Serializable

    Anonymous function, eliminated by analyzer

  24. abstract class GenericApply extends Tree with TermTree

    Common base class for Apply and TypeApply.

  25. case class Ident(name: Name) extends Tree with RefTree with Product with Serializable

    Identifier <name>

  26. case class If(cond: Tree, thenp: Tree, elsep: Tree) extends Tree with TermTree with Product with Serializable

    Conditional expression

  27. abstract class ImplDef extends MemberDef

    A common base class for class and object definitions.

  28. case class Import(expr: Tree, selectors: List[ImportSelector]) extends Tree with SymTree with Product with Serializable

    Import clause

  29. case class ImportSelector(name: Name, namePos: Int, rename: Name, renamePos: Int) extends Product with Serializable

    Import selector

  30. case class LabelDef(name: TermName, params: List[Ident], rhs: Tree) extends DefTree with TermTree with Product with Serializable

    A labelled expression.

  31. class LazyTreeCopier extends TreeCopierOps

  32. case class Literal(value: Constant) extends Tree with TermTree with Product with Serializable

    Literal

  33. case class Match(selector: Tree, cases: List[CaseDef]) extends Tree with TermTree with Product with Serializable

    - Pattern matching expression (before explicitouter)

  34. abstract class MemberDef extends DefTree

    Common base class for all member definitions: types, classes, objects, packages, vals and vars, defs.

  35. abstract type Modifiers <: AbsModifiers

  36. case class ModuleDef(mods: Modifiers, name: TermName, impl: Template) extends ImplDef with Product with Serializable

    An object definition, e.

  37. case class New(tpt: Tree) extends Tree with TermTree with Product with Serializable

    Object instantiation One should always use factory method below to build a user level new.

  38. case class PackageDef(pid: RefTree, stats: List[Tree]) extends MemberDef with Product with Serializable

    A packaging, such as package pid { stats }

  39. trait RefTree extends Tree with SymTree

    A tree which references a symbol-carrying entity.

  40. case class Return(expr: Tree) extends Tree with TermTree with SymTree with Product with Serializable

    Return expression

  41. case class Select(qualifier: Tree, name: Name) extends Tree with RefTree with Product with Serializable

    Designator <qualifier> .

  42. case class SelectFromTypeTree(qualifier: Tree, name: TypeName) extends Tree with TypTree with RefTree with Product with Serializable

    Type selection <qualifier> # <name>, eliminated by RefCheck

  43. case class SingletonTypeTree(ref: Tree) extends Tree with TypTree with Product with Serializable

    Singleton type, eliminated by RefCheck

  44. case class Star(elem: Tree) extends Tree with TermTree with Product with Serializable

    Repetition of pattern, eliminated by explicitouter

  45. class StrictTreeCopier extends TreeCopierOps

  46. case class Super(qual: Tree, mix: TypeName) extends Tree with TermTree with Product with Serializable

    Super reference, qual = corresponding this reference

  47. trait SymTree extends Tree

    A tree with a mutable symbol field, initialized to NoSymbol.

  48. case class Template(parents: List[Tree], self: ValDef, body: List[Tree]) extends Tree with SymTree with Product with Serializable

    Instantiation template of a class or trait

  49. trait TermTree extends Tree

    A tree for a term.

  50. case class This(qual: TypeName) extends Tree with TermTree with SymTree with Product with Serializable

    Self reference

  51. case class Throw(expr: Tree) extends Tree with TermTree with Product with Serializable

    Throw expression

  52. abstract class Transformer extends AnyRef

  53. class Traverser extends AnyRef

  54. abstract class Tree extends Product

    Tree is the basis for scala's abstract syntax.

  55. abstract type TreeCopier <: TreeCopierOps

  56. trait TreeCopierOps extends AnyRef

  57. case class Try(block: Tree, catches: List[CaseDef], finalizer: Tree) extends Tree with TermTree with Product with Serializable

  58. trait TypTree extends Tree

    A tree for a type.

  59. case class TypeApply(fun: Tree, args: List[Tree]) extends GenericApply with Product with Serializable

    Explicit type application.

  60. case class TypeBoundsTree(lo: Tree, hi: Tree) extends Tree with TypTree with Product with Serializable

  61. case class TypeDef(mods: Modifiers, name: TypeName, tparams: List[TypeDef], rhs: Tree) extends MemberDef with Product with Serializable

    An abstract type, a type parameter, or a type alias.

  62. case class TypeTree() extends Tree with TypTree with Product with Serializable

    A synthetic tree holding an arbitrary type.

  63. case class Typed(expr: Tree, tpt: Tree) extends Tree with TermTree with Product with Serializable

    Type annotation, eliminated by explicit outer

  64. case class UnApply(fun: Tree, args: List[Tree]) extends Tree with TermTree with Product with Serializable

  65. case class ValDef(mods: Modifiers, name: TermName, tpt: Tree, rhs: Tree) extends ValOrDefDef with Product with Serializable

    A value definition (this includes vars as well, which differ from vals only in having the MUTABLE flag set in their Modifiers.

  66. abstract class ValOrDefDef extends MemberDef

    A common base class for ValDefs and DefDefs.

Abstract Value Members

  1. abstract def Modifiers(mods: Set[Value] = Set(), privateWithin: Name = EmptyTypeName, annotations: List[Tree] = List()): Modifiers

  2. abstract def duplicateTree(tree: Tree): Tree

    Attributes
    protected
  3. abstract def emptyValDef: ValDef

    An empty deferred value definition corresponding to: val _: _ This is used as a placeholder in the self parameter Template if there is no definition of a self value of self type.

  4. abstract def newLazyTreeCopier: TreeCopier

  5. abstract def newStrictTreeCopier: TreeCopier

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Test two objects for inequality.

    Test two objects for inequality.

    returns

    true if !(this == that), false otherwise.

    Definition Classes
    Any
  3. final def ##(): Int

    Equivalent to x.hashCode except for boxed numeric types and null.

    Equivalent to x.hashCode except for boxed numeric types and null. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. For null returns a hashcode where null.hashCode throws a NullPointerException.

    returns

    a hash value consistent with ==

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

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

    Test two objects for equality.

    Test two objects for equality. The expression x == that is equivalent to if (x eq null) that eq null else x.equals(that).

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    Definition Classes
    Any
  6. object EmptyTree extends Tree with TermTree with Product with Serializable

    The empty tree

  7. def Ident(sym: Symbol): Ident

  8. def Ident(name: String): Ident

  9. def Select(qualifier: Tree, sym: Symbol): Select

  10. def Select(qualifier: Tree, name: String): Select

  11. def TypeTree(tp: Type): TypeTree

  12. final def asInstanceOf[T0]: T0

    Cast the receiver object to be of type T0.

    Cast the receiver object to be of type T0.

    Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression 1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expression List(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested type.

    returns

    the receiver object.

    Definition Classes
    Any
    Exceptions thrown
    ClassCastException

    if the receiver object is not an instance of the erasure of type T0.

  13. def clone(): AnyRef

    Create a copy of the receiver object.

    Create a copy of the receiver object.

    The default implementation of the clone method is platform dependent.

    returns

    a copy of the receiver object.

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

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

    Tests whether the argument (arg0) is a reference to the receiver object (this).

    Tests whether the argument (arg0) is a reference to the receiver object (this).

    The eq method implements an equivalence relation on non-null instances of AnyRef, and has three additional properties:

    • It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false.
    • For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false.
    • null.eq(null) returns true.

    When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).

    returns

    true if the argument is a reference to the receiver object; false otherwise.

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

    The equality method for reference types.

    The equality method for reference types. Default implementation delegates to eq.

    See also equals in Any.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

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

    Called by the garbage collector on the receiver object when there are no more references to the object.

    Called by the garbage collector on the receiver object when there are no more references to the object.

    The details of when and if the finalize method is invoked, as well as the interaction between finalize and non-local returns and exceptions, are all platform dependent.

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
    Note

    not specified by SLS as a member of AnyRef

  17. final def getClass(): Class[_]

    A representation that corresponds to the dynamic class of the receiver object.

    A representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

    a representation that corresponds to the dynamic class of the receiver object.

    Definition Classes
    AnyRef → Any
    Note

    not specified by SLS as a member of AnyRef

  18. def hashCode(): Int

    The hashCode method for reference types.

    The hashCode method for reference types. See hashCode in Any.

    returns

    the hash code value for this object.

    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Test whether the dynamic type of the receiver object is T0.

    Test whether the dynamic type of the receiver object is T0.

    Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression 1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the specified type.

    returns

    true if the receiver object is an instance of erasure of type T0; false otherwise.

    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Equivalent to !(this eq that).

    Equivalent to !(this eq that).

    returns

    true if the argument is not a reference to the receiver object; false otherwise.

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

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Wakes up a single thread that is waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

  22. final def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

    Wakes up all threads that are waiting on the receiver object's monitor.

    Definition Classes
    AnyRef
    Note

    not specified by SLS as a member of AnyRef

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

    Definition Classes
    AnyRef
  24. def toString(): String

    Creates a String representation of this object.

    Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.

    returns

    a String representation of the object.

    Definition Classes
    AnyRef → Any
  25. val treeCopy: TreeCopier

  26. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  29. def xtransform(transformer: Transformer, tree: Tree): Tree

    Attributes
    protected
  30. def xtraverse(traverser: Traverser, tree: Tree): Unit

    Attributes
    protected

Inherited from AnyRef

Inherited from Any