summaryrefslogtreecommitdiff
path: root/src/library/scala/reflect/api/StandardDefinitions.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/reflect/api/StandardDefinitions.scala')
-rwxr-xr-xsrc/library/scala/reflect/api/StandardDefinitions.scala169
1 files changed, 36 insertions, 133 deletions
diff --git a/src/library/scala/reflect/api/StandardDefinitions.scala b/src/library/scala/reflect/api/StandardDefinitions.scala
index 21f7c9283b..c2a89f92dd 100755
--- a/src/library/scala/reflect/api/StandardDefinitions.scala
+++ b/src/library/scala/reflect/api/StandardDefinitions.scala
@@ -2,144 +2,47 @@
* Copyright 2005-2011 LAMP/EPFL
* @author Martin Odersky
*/
-
package scala.reflect
package api
-trait StandardTypes {
- self: Universe =>
-
- val ByteTpe: Type
- val ShortTpe: Type
- val CharTpe: Type
- val IntTpe: Type
- val LongTpe: Type
- val FloatTpe: Type
- val DoubleTpe: Type
- val BooleanTpe: Type
- val UnitTpe: Type
-
- val AnyTpe: Type
- val AnyValTpe: Type
- val AnyRefTpe: Type
- val ObjectTpe: Type
-
- val NothingTpe: Type
- val NullTpe: Type
- val StringTpe: Type
-}
-
-trait StandardDefinitions extends StandardTypes {
+trait StandardDefinitions extends base.StandardDefinitions {
self: Universe =>
- val definitions: AbsDefinitions
-
- // I intend to pull everything in here out of the public API.
- trait AbsDefinitionsInternal {
- def ArrayModule: Symbol
- def ArrayModule_overloadedApply: Symbol
- def Array_apply: Symbol
- def Array_clone: Symbol
- def Array_length: Symbol
- def Array_update: Symbol
- def ByNameParamClass: Symbol
- def ClassTagModule: Symbol
- def ConcreteTypeTagModule: Symbol
- def ConsClass: Symbol
- def EmptyPackageClass: Symbol
- def FunctionClass : Array[Symbol]
- def IterableClass: Symbol
- def IteratorClass: Symbol
- def IteratorModule: Symbol
- def Iterator_apply: Symbol
- def JavaLangPackageClass: Symbol
- def JavaRepeatedParamClass: Symbol
- def ListModule: Symbol
- def List_apply: Symbol
- def NilModule: Symbol
- def NoneModule: Symbol
- def OptionClass: Symbol
- def ProductClass : Array[Symbol]
- def RepeatedParamClass: Symbol
- def ScalaPackageClass: Symbol
- def SeqClass: Symbol
- def SeqModule: Symbol
- def SomeClass: Symbol
- def SomeModule: Symbol
- def StringBuilderClass: Symbol
- def SymbolClass : Symbol
- def TraversableClass: Symbol
- def TupleClass : Array[Symbol]
- def TypeTagModule: Symbol
- def ScalaPrimitiveValueClasses: List[ClassSymbol]
- }
-
- trait AbsDefinitions extends AbsDefinitionsInternal {
- // packages
- def RootClass: ClassSymbol
- def RootPackage: PackageSymbol
- def EmptyPackage: PackageSymbol
- def ScalaPackage: PackageSymbol
- def JavaLangPackage: PackageSymbol
-
- // top types
- def AnyClass : ClassSymbol
- def AnyValClass: ClassSymbol
- def ObjectClass: ClassSymbol
- def AnyRefClass: TypeSymbol
-
- // bottom types
- def NullClass : ClassSymbol
- def NothingClass: ClassSymbol
-
- // the scala value classes
- def UnitClass : ClassSymbol
- def ByteClass : ClassSymbol
- def ShortClass : ClassSymbol
- def CharClass : ClassSymbol
- def IntClass : ClassSymbol
- def LongClass : ClassSymbol
- def FloatClass : ClassSymbol
- def DoubleClass : ClassSymbol
- def BooleanClass: ClassSymbol
-
- // some special classes
- def StringClass : ClassSymbol
- def ClassClass : ClassSymbol
- def ArrayClass: ClassSymbol
-
- // collections classes
- def ListClass: ClassSymbol
+ val definitions: DefinitionsApi
+
+ trait DefinitionsApi extends DefinitionsBase {
+ def JavaLangPackageClass: ClassSymbol
+ def JavaLangPackage: ModuleSymbol
+ def ArrayModule: ModuleSymbol
+ def ArrayModule_overloadedApply: TermSymbol // todo. fix the bug in Definitions.getMemberMethod
+ def Array_apply: TermSymbol // todo. fix the bug in Definitions.getMemberMethod
+ def Array_clone: TermSymbol // todo. fix the bug in Definitions.getMemberMethod
+ def Array_length: TermSymbol // todo. fix the bug in Definitions.getMemberMethod
+ def Array_update: TermSymbol // todo. fix the bug in Definitions.getMemberMethod
+ def ByNameParamClass: ClassSymbol
+ def ConsClass: ClassSymbol
+ def FunctionClass : Array[ClassSymbol]
+ def IterableClass: ClassSymbol
+ def IteratorClass: ClassSymbol
+ def IteratorModule: ModuleSymbol
+ def Iterator_apply: TermSymbol // todo. fix the bug in Definitions.getMemberMethod
+ def JavaRepeatedParamClass: ClassSymbol
def ListModule: ModuleSymbol
-
- // collections modules
- def PredefModule: ModuleSymbol
-
- // type tags
- def ClassTagClass: ClassSymbol
- def TypeTagClass: ClassSymbol
- def ConcreteTypeTagClass: ClassSymbol
-
- /** Given a type T, returns the type corresponding to the VM's
- * representation: ClassClass's type constructor applied to `arg`.
- */
- def vmClassType(arg: Type): Type // !!! better name?
- // [Eugene] we already have arg.erasure, right?
- //
- // [Paul] You misunderstand the method (it could be better named).
- // Given List[String], it returns java.lang.Class[List[String]]
- // (or the .Net equivalent), not the erasure of List[String].
- // See def ClassType in definitions - that's what it was called before,
- // and obviously that name has to go.
-
- /** The string representation used by the given type in the VM.
- */
- def vmSignature(sym: Symbol, info: Type): String
-
- /** Is symbol one of the value classes? */
- def isPrimitiveValueClass(sym: Symbol): Boolean // !!! better name?
-
- /** Is symbol one of the numeric value classes? */
- def isNumericValueClass(sym: Symbol): Boolean // !!! better name?
+ def List_apply: TermSymbol // todo. fix the bug in Definitions.getMemberMethod
+ def NilModule: ModuleSymbol
+ def NoneModule: ModuleSymbol
+ def OptionClass: ClassSymbol
+ def ProductClass : Array[ClassSymbol]
+ def RepeatedParamClass: ClassSymbol
+ def SeqClass: ClassSymbol
+ def SeqModule: ModuleSymbol
+ def SomeClass: ClassSymbol
+ def SomeModule: ModuleSymbol
+ def StringBuilderClass: ClassSymbol
+ def SymbolClass : ClassSymbol
+ def TraversableClass: ClassSymbol
+ def TupleClass: Array[Symbol] // cannot make it Array[ClassSymbol], because TupleClass(0) is supposed to be NoSymbol. weird
+ def ScalaPrimitiveValueClasses: List[ClassSymbol]
+ def ScalaNumericValueClasses: List[ClassSymbol]
}
}