diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 17:17:18 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 17:17:18 +0200 |
commit | 34f0d4f91b41a5d20078cba2492c2170e995e24c (patch) | |
tree | 7dcd1ec5c71866929236ffa6ef8d1406e6d9e2eb | |
parent | 3b61d19cdc7a4836aaee92dd45c811808da66e18 (diff) | |
download | scala-34f0d4f91b41a5d20078cba2492c2170e995e24c.tar.gz scala-34f0d4f91b41a5d20078cba2492c2170e995e24c.tar.bz2 scala-34f0d4f91b41a5d20078cba2492c2170e995e24c.zip |
poor dummy, what have they done to you
-rw-r--r-- | src/library/scala/reflect/DummyMirror.scala | 183 |
1 files changed, 107 insertions, 76 deletions
diff --git a/src/library/scala/reflect/DummyMirror.scala b/src/library/scala/reflect/DummyMirror.scala index dd4791e57c..741ff33be2 100644 --- a/src/library/scala/reflect/DummyMirror.scala +++ b/src/library/scala/reflect/DummyMirror.scala @@ -192,70 +192,70 @@ class DummyMirror(cl: ClassLoader) extends api.Mirror { val UnitTpe: Type = DummyType val definitions: AbsDefinitions = DummyDefinitions object DummyDefinitions extends AbsDefinitions { - def ByNameParamClass = ??? - def JavaRepeatedParamClass = ??? - def RepeatedParamClass = ??? - def AnyClass = ??? - def AnyRefClass = ??? - def AnyValClass = ??? - def ArrayClass = ??? - def ArrayModule = ??? - def ArrayModule_overloadedApply = ??? - def Array_apply = ??? - def Array_clone = ??? - def Array_length = ??? - def Array_update = ??? - def BooleanClass = ??? - def ByteClass = ??? - def CharClass = ??? - def ClassClass = ??? - def ClassTagClass = ??? - def ClassTagModule = ??? - def ConcreteTypeTagClass = ??? - def ConcreteTypeTagModule = ??? - def ConsClass = ??? - def DoubleClass = ??? - def EmptyPackage = ??? - def EmptyPackageClass = ??? - def FloatClass = ??? + def ByNameParamClass = DummySymbol + def JavaRepeatedParamClass = DummySymbol + def RepeatedParamClass = DummySymbol + def AnyClass = DummyClassSymbol + def AnyRefClass = DummyTypeSymbol + def AnyValClass = DummyClassSymbol + def ArrayClass = DummyClassSymbol + def ArrayModule = DummySymbol + def ArrayModule_overloadedApply = DummySymbol + def Array_apply = DummySymbol + def Array_clone = DummySymbol + def Array_length = DummySymbol + def Array_update = DummySymbol + def BooleanClass = DummyClassSymbol + def ByteClass = DummyClassSymbol + def CharClass = DummyClassSymbol + def ClassClass = DummyClassSymbol + def ClassTagClass = DummyClassSymbol + def ClassTagModule = DummySymbol + def ConcreteTypeTagClass = DummyClassSymbol + def ConcreteTypeTagModule = DummySymbol + def ConsClass = DummySymbol + def DoubleClass = DummyClassSymbol + def EmptyPackage = DummyPackageSymbol + def EmptyPackageClass = DummySymbol + def FloatClass = DummyClassSymbol def FunctionClass: Array[Symbol] = Array() - def IntClass = ??? - def IterableClass = ??? - def IteratorClass = ??? - def IteratorModule = ??? - def Iterator_apply = ??? - def JavaLangPackage = ??? - def JavaLangPackageClass = ??? - def ListClass = ??? - def ListModule = ??? - def List_apply = ??? - def LongClass = ??? - def NilModule = ??? - def NoneModule = ??? - def NothingClass = ??? - def NullClass = ??? - def ObjectClass = ??? - def OptionClass = ??? - def PredefModule = ??? + def IntClass = DummyClassSymbol + def IterableClass = DummySymbol + def IteratorClass = DummySymbol + def IteratorModule = DummySymbol + def Iterator_apply = DummySymbol + def JavaLangPackage = DummyPackageSymbol + def JavaLangPackageClass = DummySymbol + def ListClass = DummyClassSymbol + def ListModule = DummyModuleSymbol + def List_apply = DummySymbol + def LongClass = DummyClassSymbol + def NilModule = DummySymbol + def NoneModule = DummySymbol + def NothingClass = DummyClassSymbol + def NullClass = DummyClassSymbol + def ObjectClass = DummyClassSymbol + def OptionClass = DummySymbol + def PredefModule = DummyModuleSymbol def ProductClass: Array[Symbol] = Array() - def RootClass = ??? - def RootPackage = ??? - def ScalaPackage = ??? - def ScalaPackageClass = ??? + def RootClass = DummyClassSymbol + def RootPackage = DummyPackageSymbol + def ScalaPackage = DummyPackageSymbol + def ScalaPackageClass = DummySymbol def ScalaPrimitiveValueClasses = Nil - def SeqClass = ??? - def SeqModule = ??? - def ShortClass = ??? - def SomeClass = ??? - def SomeModule = ??? - def StringBuilderClass = ??? - def StringClass = ??? - def SymbolClass = ??? - def TraversableClass = ??? + def SeqClass = DummySymbol + def SeqModule = DummySymbol + def ShortClass = DummyClassSymbol + def SomeClass = DummySymbol + def SomeModule = DummySymbol + def StringBuilderClass = DummySymbol + def StringClass = DummyClassSymbol + def SymbolClass = DummySymbol + def TraversableClass = DummySymbol def TupleClass: Array[Symbol] = Array() - def TypeTagClass = ??? - def TypeTagModule = ??? - def UnitClass = ??? + def TypeTagClass = DummyClassSymbol + def TypeTagModule = DummySymbol + def UnitClass = DummyClassSymbol def isNumericValueClass(sym: Symbol): Boolean = notSupported() def isPrimitiveValueClass(sym: Symbol): Boolean = notSupported() def vmClassType(arg: Type): Type = DummyType @@ -415,9 +415,22 @@ class DummyMirror(cl: ClassLoader) extends api.Mirror { } // Members declared in scala.reflect.api.Symbols - type Symbol = DummySymbol.type - val NoSymbol = ??? - object DummySymbol extends AbsSymbol { + val NoSymbol = DummySymbol + type Symbol = DummySymbolApi + object DummySymbol extends DummySymbolApi + type TypeSymbol = DummyTypeSymbolApi + object DummyTypeSymbol extends DummyTypeSymbolApi + type TermSymbol = DummyTermSymbolApi + object DummyTermSymbol extends DummyTermSymbolApi + type MethodSymbol = DummyMethodSymbolApi + object DummyMethodSymbol extends DummyMethodSymbolApi + type ModuleSymbol = DummyModuleSymbolApi + object DummyModuleSymbol extends DummyModuleSymbolApi + type PackageSymbol = DummyPackageSymbolApi + object DummyPackageSymbol extends DummyPackageSymbolApi + type ClassSymbol = DummyClassSymbolApi + object DummyClassSymbol extends DummyClassSymbolApi + trait DummySymbolApi extends AbsSymbol { this: Symbol => def pos: Position = notSupported() @@ -470,6 +483,24 @@ class DummyMirror(cl: ClassLoader) extends api.Mirror { def setAnnotations(annots: AnnotationInfo*): this.type = notSupported() def kind: String = notSupported() } + trait DummyTypeSymbolApi extends DummySymbolApi with TypeSymbolApi { + this: TypeSymbol => + } + trait DummyTermSymbolApi extends DummySymbolApi with TermSymbolApi { + this: TermSymbol => + } + trait DummyMethodSymbolApi extends DummyTermSymbolApi with MethodSymbolApi { + this: MethodSymbol => + } + trait DummyModuleSymbolApi extends DummyTermSymbolApi with ModuleSymbolApi { + this: ModuleSymbol => + } + trait DummyPackageSymbolApi extends DummyModuleSymbolApi with PackageSymbolApi { + this: PackageSymbol => + } + trait DummyClassSymbolApi extends DummyTypeSymbolApi with ClassSymbolApi { + this: ClassSymbol => + } // Members declared in scala.reflect.api.ToolBoxes def mkToolBox(frontEnd: FrontEnd, options: String): AbsToolBox = notSupported() @@ -478,19 +509,19 @@ class DummyMirror(cl: ClassLoader) extends api.Mirror { // type TreeGen = DummyTreeGen.type // [Eugene] cannot compile if uncomment this val gen: TreeGen{val global: DummyMirror.this.type} = DummyTreeGen.asInstanceOf[TreeGen{val global: DummyMirror.this.type}] def modifiersFromInternalFlags(flags: Long,privateWithin: Name,annotations: List[Tree]): Modifiers = DummyModifiers - def newFreeExistential(name: String,info: Type,value: => Any,flags: Long,origin: String) = ??? - def newFreeTerm(name: String,info: Type,value: => Any,flags: Long,origin: String) = ??? - def newFreeType(name: String,info: Type,value: => Any,flags: Long,origin: String) = ??? - def selectOverloadedMethod(owner: Symbol,name: String,index: Int) = ??? - def selectOverloadedMethodIfDefined(owner: Symbol,name: String,index: Int) = ??? - def selectTerm(owner: Symbol,name: String) = ??? - def selectTermIfDefined(owner: Symbol,name: String) = ??? - def selectType(owner: Symbol,name: String) = ??? - def selectTypeIfDefined(owner: Symbol,name: String) = ??? - def staticClass(fullName: String) = ??? - def staticClassIfDefined(fullName: String) = ??? - def staticModule(fullName: String) = ??? - def staticModuleIfDefined(fullName: String) = ??? + def newFreeExistential(name: String,info: Type,value: => Any,flags: Long,origin: String) = DummySymbol + def newFreeTerm(name: String,info: Type,value: => Any,flags: Long,origin: String) = DummySymbol + def newFreeType(name: String,info: Type,value: => Any,flags: Long,origin: String) = DummySymbol + def selectOverloadedMethod(owner: Symbol,name: String,index: Int) = DummySymbol + def selectOverloadedMethodIfDefined(owner: Symbol,name: String,index: Int) = DummySymbol + def selectTerm(owner: Symbol,name: String) = DummySymbol + def selectTermIfDefined(owner: Symbol,name: String) = DummySymbol + def selectType(owner: Symbol,name: String) = DummySymbol + def selectTypeIfDefined(owner: Symbol,name: String) = DummySymbol + def staticClass(fullName: String) = DummySymbol + def staticClassIfDefined(fullName: String) = DummySymbol + def staticModule(fullName: String) = DummySymbol + def staticModuleIfDefined(fullName: String) = DummySymbol def thisModuleType(fullName: String): Type = DummyType object DummyTreeGen extends AbsTreeGen { val global: Universe = DummyMirror.this |