Changeset 1016
- Timestamp:
- 11/09/07 15:43:54 (10 months ago)
- Files:
-
- trunk/src/main/php/net/stubbles/reflection/annotations/stubAnnotatable.php (added)
- trunk/src/main/php/net/stubbles/reflection/stubBaseReflectionClass.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionFunction.php (modified) (8 diffs)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionMethod.php (modified) (9 diffs)
- trunk/src/main/php/net/stubbles/reflection/stubReflectionProperty.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/reflection/stubBaseReflectionClass.php
r940 r1016 7 7 * @subpackage reflection 8 8 */ 9 stubClassLoader::load('net.stubbles.reflection.stubReflectionType'); 9 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotatable', 10 'net.stubbles.reflection.stubReflectionType' 11 ); 10 12 /** 11 13 * Marker interface for stubReflectionClass and stubReflectionObject. … … 19 21 * @subpackage reflection 20 22 */ 21 interface stubBaseReflectionClass extends stubReflectionType 23 interface stubBaseReflectionClass extends stubReflectionType, stubAnnotatable 22 24 { 23 /**24 * check whether the class has the given annotation or not25 *26 * @param string $annotationName27 * @return bool28 */29 public function hasAnnotation($annotationName);30 31 /**32 * return the specified annotation33 *34 * @param string $annotationName35 * @return stubAnnotation36 * @throws ReflectionException37 */38 public function getAnnotation($annotationName);39 40 25 /** 41 26 * returns the full qualified class name of the reflected class trunk/src/main/php/net/stubbles/reflection/stubReflectionFunction.php
r984 r1016 8 8 * @subpackage reflection 9 9 */ 10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotationFactory', 10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotatable', 11 'net.stubbles.reflection.annotations.stubAnnotationFactory', 11 12 'net.stubbles.reflection.stubReflectionClass', 12 13 'net.stubbles.reflection.stubReflectionParameter', … … 19 20 * @subpackage reflection 20 21 */ 21 class stubReflectionFunction extends ReflectionFunction 22 class stubReflectionFunction extends ReflectionFunction implements stubAnnotatable 22 23 { 23 24 /** … … 33 34 */ 34 35 protected $docComment; 35 36 36 37 /** 37 38 * constructor … … 45 46 $this->docComment = $this->getDocComment(); 46 47 } 47 48 48 49 /** 49 50 * check whether the class has the given annotation or not … … 56 57 return stubAnnotationFactory::has($this->docComment, $annotationName, stubAnnotation::TARGET_FUNCTION, $this->functionName, $this->getFileName()); 57 58 } 58 59 59 60 /** 60 61 * return the specified annotation … … 68 69 return stubAnnotationFactory::create($this->docComment, $annotationName, stubAnnotation::TARGET_FUNCTION, $this->functionName, $this->getFileName()); 69 70 } 70 71 71 72 /** 72 73 * checks whether a value is equal to the class … … 83 84 return false; 84 85 } 85 86 86 87 /** 87 88 * returns a string representation of the class … … 101 102 return 'net.stubbles.reflection.stubReflectionFunction[' . $this->functionName . "()] {\n}\n"; 102 103 } 103 104 104 105 /** 105 106 * returns a list of all parameters trunk/src/main/php/net/stubbles/reflection/stubReflectionMethod.php
r984 r1016 8 8 * @subpackage reflection 9 9 */ 10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotationFactory', 10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotatable', 11 'net.stubbles.reflection.annotations.stubAnnotationFactory', 11 12 'net.stubbles.reflection.stubReflectionClass', 12 13 'net.stubbles.reflection.stubReflectionParameter', … … 19 20 * @subpackage reflection 20 21 */ 21 class stubReflectionMethod extends ReflectionMethod 22 class stubReflectionMethod extends ReflectionMethod implements stubAnnotatable 22 23 { 23 24 /** … … 39 40 */ 40 41 protected $docComment; 41 42 42 43 /** 43 44 * constructor … … 53 54 $this->docComment = $this->getDocComment(); 54 55 } 55 56 56 57 /** 57 58 * check whether the class has the given annotation or not … … 64 65 return stubAnnotationFactory::has($this->docComment, $annotationName, stubAnnotation::TARGET_METHOD, $this->className.'::'.$this->methodName, $this->getFileName()); 65 66 } 66 67 67 68 /** 68 69 * return the specified annotation … … 76 77 return stubAnnotationFactory::create($this->docComment, $annotationName, stubAnnotation::TARGET_METHOD, $this->className.'::'.$this->methodName, $this->getFileName()); 77 78 } 78 79 79 80 /** 80 81 * checks whether a value is equal to the class … … 91 92 return false; 92 93 } 93 94 94 95 /** 95 96 * returns a string representation of the class … … 109 110 return 'net.stubbles.reflection.stubReflectionMethod[' . $this->className . '::' . $this->methodName . "()] {\n}\n"; 110 111 } 111 112 112 113 /** 113 114 * returns the class that declares this method … … 121 122 return $stubRefClass; 122 123 } 123 124 124 125 /** 125 126 * returns a list of all parameters trunk/src/main/php/net/stubbles/reflection/stubReflectionProperty.php
r834 r1016 8 8 * @subpackage reflection 9 9 */ 10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotationFactory', 10 stubClassLoader::load('net.stubbles.reflection.annotations.stubAnnotatable', 11 'net.stubbles.reflection.annotations.stubAnnotationFactory', 11 12 'net.stubbles.reflection.stubReflectionClass' 12 13 ); … … 17 18 * @subpackage reflection 18 19 */ 19 class stubReflectionProperty extends ReflectionProperty 20 class stubReflectionProperty extends ReflectionProperty implements stubAnnotatable 20 21 { 21 22 /** … … 53 54 $this->docComment = $this->getDocComment(); 54 55 } 55 56 56 57 /** 57 58 * check whether the class has the given annotation or not … … 64 65 return stubAnnotationFactory::has($this->docComment, $annotationName, stubAnnotation::TARGET_PROPERTY, $this->className.'::'.$this->propertyName, $this->getDeclaringClass()->getFileName()); 65 66 } 66 67 67 68 /** 68 69 * return the specified annotation … … 76 77 return stubAnnotationFactory::create($this->docComment, $annotationName, stubAnnotation::TARGET_PROPERTY, $this->className.'::'.$this->propertyName, $this->getDeclaringClass()->getFileName()); 77 78 } 78 79 79 80 /** 80 81 * checks whether a value is equal to the class … … 91 92 return false; 92 93 } 93 94 94 95 /** 95 96 * returns a string representation of the class … … 109 110 return 'net.stubbles.reflection.stubReflectionProperty[' . $this->className . '::' . $this->propertyName . "] {\n}\n"; 110 111 } 111 112 112 113 /** 113 114 * returns the class that declares this parameter
