Changeset 940
- Timestamp:
- 09/25/07 23:15:22 (1 year ago)
- Files:
-
- trunk/src/main/php/net/stubbles/reflection/stubBaseReflectionClass.php (modified) (3 diffs)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionClass.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionObject.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionPrimitive.php (modified) (3 diffs)
- trunk/src/test/php/net/stubbles/reflection/ReflectionTestSuite.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/reflection/stubReflectionPrimitiveTestCase.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/reflection/stubBaseReflectionClass.php
r883 r940 7 7 * @subpackage reflection 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection.stubReflectionType'); 9 10 /** 10 11 * Marker interface for stubReflectionClass and stubReflectionObject. … … 18 19 * @subpackage reflection 19 20 */ 20 interface stubBaseReflectionClass 21 interface stubBaseReflectionClass extends stubReflectionType 21 22 { 22 23 /** … … 36 37 */ 37 38 public function getAnnotation($annotationName); 38 39 /**40 * checks whether a value is equal to the class41 *42 * @param mixed $compare43 * @return bool44 */45 public function equals($compare);46 39 47 40 /** trunk/src/main/php/net/stubbles/reflection/stubReflectionClass.php
r834 r940 265 265 return $refPackage; 266 266 } 267 268 /** 269 * checks whether the type is an object 270 * 271 * @return bool 272 */ 273 public function isObject() 274 { 275 return true; 276 } 277 278 /** 279 * checks whether the type is a primitive 280 * 281 * @return bool 282 */ 283 public function isPrimitive() 284 { 285 return false; 286 } 267 287 } 268 288 ?> trunk/src/main/php/net/stubbles/reflection/stubReflectionObject.php
r834 r940 286 286 return $refPackage; 287 287 } 288 289 /** 290 * checks whether the type is an object 291 * 292 * @return bool 293 */ 294 public function isObject() 295 { 296 return true; 297 } 298 299 /** 300 * checks whether the type is a primitive 301 * 302 * @return bool 303 */ 304 public function isPrimitive() 305 { 306 return false; 307 } 288 308 } 289 309 ?> trunk/src/main/php/net/stubbles/reflection/stubReflectionPrimitive.php
r934 r940 7 7 * @subpackage reflection 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection.stubReflectionType'); 9 stubClassLoader::load('net.stubbles.lang.stubEnum', 10 'net.stubbles.reflection.stubReflectionType' 11 ); 10 12 /** 11 13 * Type reference for primitives. … … 98 100 99 101 /** 102 * returns the name of the type 103 * 104 * @return string 105 */ 106 public function getName() 107 { 108 return $this->name(); 109 } 110 111 /** 100 112 * checks whether the type is an object 101 113 * … … 139 151 public function __toString() 140 152 { 141 return 'net.stubbles.reflection.stubReflectionPrimitive[' . $this-> name . "] {\n}\n";153 return 'net.stubbles.reflection.stubReflectionPrimitive[' . $this->value . "] {\n}\n"; 142 154 } 143 155 } trunk/src/test/php/net/stubbles/reflection/ReflectionTestSuite.php
r698 r940 46 46 $this->addTestFile(dirname(__FILE__) . '/stubReflectionParameterTestCase.php'); 47 47 $this->addTestFile(dirname(__FILE__) . '/stubReflectionPropertyTestCase.php'); 48 $this->addTestFile(dirname(__FILE__) . '/stubReflectionPrimitiveTestCase.php'); 48 49 } 49 50 }
