summaryrefslogtreecommitdiff
path: root/src/library/scala/reflect/api/StandardDefinitions.scala
blob: 6b480ab83dd1baff5d388a0fd3f1fd480ee28223 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/* NSC -- new Scala compiler
 * Copyright 2005-2011 LAMP/EPFL
 * @author  Martin Odersky
 */

package scala.reflect
package api

trait StandardDefinitions { self: Universe =>

  val definitions: AbsDefinitions

  abstract class AbsDefinitions {
    // outer packages and their classes
    // Under consideration
    // def RootPackage: Symbol

    def RootClass: Symbol
    def EmptyPackage: Symbol
    def EmptyPackageClass: Symbol

    def ScalaPackage: Symbol
    def ScalaPackageClass: Symbol

    // top types
    def AnyClass   : Symbol
    def AnyValClass: Symbol
    def AnyRefClass: Symbol
    def ObjectClass: Symbol

    // bottom types
    def NullClass   : Symbol
    def NothingClass: Symbol

    // the scala value classes
    def UnitClass   : Symbol
    def ByteClass   : Symbol
    def ShortClass  : Symbol
    def CharClass   : Symbol
    def IntClass    : Symbol
    def LongClass   : Symbol
    def FloatClass  : Symbol
    def DoubleClass : Symbol
    def BooleanClass: Symbol

    // fundamental reference classes
    def SymbolClass : Symbol
    def StringClass : Symbol
    def ClassClass  : Symbol

    // fundamental modules
    def PredefModule: Symbol

    // fundamental type constructions
    def ClassType(arg: Type): Type

    /** The string representation used by the given type in the VM.
     */
    def signature(tp: Type): String

    /** Is symbol one of the value classes? */
    def isValueClass(sym: Symbol): Boolean

    /** Is symbol one of the numeric value classes? */
    def isNumericValueClass(sym: Symbol): Boolean
  }
}