1 8 package test.withincode; 9 10 import java.lang.reflect.Field ; 11 import java.lang.reflect.Modifier ; 12 13 import org.codehaus.aspectwerkz.definition.Pointcut; 14 import org.codehaus.aspectwerkz.joinpoint.EnclosingStaticJoinPoint; 15 import org.codehaus.aspectwerkz.joinpoint.FieldRtti; 16 import org.codehaus.aspectwerkz.joinpoint.JoinPoint; 17 import org.codehaus.aspectwerkz.joinpoint.Rtti; 18 import org.codehaus.aspectwerkz.joinpoint.StaticJoinPoint; 19 20 import test.handler.HandlerTestBeforeException; 21 22 23 30 public class WithincodeStaticinitializationAspect { 31 34 Pointcut withincodeTarget; 35 36 39 Pointcut withincodeClinit; 40 41 44 Pointcut withincodeClinitPattern; 45 46 49 Pointcut set; 50 51 54 Pointcut get; 55 56 59 Pointcut getset; 60 61 64 Pointcut ctorCall; 65 66 69 Pointcut methodCall; 70 71 74 public void beforeCtorCall() { 75 WithincodeClinitTest.addMessage("beforeCtorCall"); 76 } 77 78 81 public void beforeWithincodeClinitCtorCall() { 82 WithincodeClinitTest.addMessage("beforeWithincodeClinitCtorCall"); 83 } 84 85 88 public void beforeWithincodeClinitPatternCtorCall() { 89 WithincodeClinitTest.addMessage("beforeWithincodeClinitPatternCtorCall"); 90 } 91 92 95 public void afterWithincodeClinitPatternCtorCall() { 96 WithincodeClinitTest.addMessage("afterWithincodeClinitPatternCtorCall"); 97 } 98 99 102 public void afterWithincodeClinitCtorCall() { 103 WithincodeClinitTest.addMessage("afterWithincodeClinitCtorCall"); 104 } 105 106 109 public void afterCtorCall() { 110 WithincodeClinitTest.addMessage("afterCtorCall"); 111 } 112 113 116 public void afterReturningCtorCall() { 117 WithincodeClinitTest.addMessage("afterReturningCtorCall"); 118 } 119 120 123 public void beforeGetSet() { 124 WithincodeClinitTest.addMessage("beforeGetSet"); 125 } 126 127 130 public void afterGetSet() { 131 WithincodeClinitTest.addMessage("afterGetSet"); 132 } 133 134 135 138 public void afterReturningGetSet() { 139 WithincodeClinitTest.addMessage("afterReturningGetSet"); 140 } 141 142 145 public void beforeMethodCall() { 146 WithincodeClinitTest.addMessage("beforeMethodCall"); 147 } 148 149 152 public void afterFinallyMethodCall() { 153 WithincodeClinitTest.addMessage("afterFinallyMethodCall"); 154 } 155 156 159 public void afterReturningMethodCall() { 160 WithincodeClinitTest.addMessage("afterReturningMethodCall"); 162 } 163 164 167 public void afterThrowingMethodCall() { 168 WithincodeClinitTest.addMessage("afterThrowingMethodCall"); 169 } 170 171 174 public void afterThrowingTypeMethodCall() { 175 WithincodeClinitTest.addMessage("afterThrowingTypeMethodCall"); 176 } 177 178 181 public void beforeHandler() { 182 WithincodeClinitTest.addMessage("beforeHandler"); 183 } 184 185 189 public void beforeCtorCall(StaticJoinPoint sjp) { 190 WithincodeClinitTest.addSJP(sjp); 191 } 192 193 196 public Object aroundCtorCall(StaticJoinPoint sjp) throws Throwable { 197 WithincodeClinitTest.addSJP(sjp); 198 return sjp.proceed(); 199 } 200 201 204 public void afterCtorCall(StaticJoinPoint sjp) { 205 WithincodeClinitTest.addSJP(sjp); 206 } 207 208 211 public void afterReturningCtorCall(StaticJoinPoint sjp) { 212 WithincodeClinitTest.addSJP(sjp); 213 } 214 215 218 public void beforeGetSet(StaticJoinPoint sjp) { 219 WithincodeClinitTest.addSJP(sjp); 220 } 221 222 225 public Object aroundGetSet(StaticJoinPoint sjp) throws Throwable { 226 WithincodeClinitTest.addSJP(sjp); 227 return sjp.proceed(); 228 } 229 230 233 public void afterGetSet(StaticJoinPoint sjp) { 234 WithincodeClinitTest.addSJP(sjp); 235 } 236 237 240 public void afterReturningGetSet(StaticJoinPoint sjp) { 241 WithincodeClinitTest.addSJP(sjp); 242 } 243 244 247 public void beforeMethodCall(StaticJoinPoint sjp) { 248 WithincodeClinitTest.addSJP(sjp); 249 } 250 251 254 public Object aroundMethodCall(StaticJoinPoint sjp) throws Throwable { 255 WithincodeClinitTest.addSJP(sjp); 256 return sjp.proceed(); 257 } 258 259 262 public void afterThrowingTypeMethodCall(StaticJoinPoint sjp) { 263 WithincodeClinitTest.addSJP(sjp); 264 } 265 266 269 public void afterThrowingMethodCall(StaticJoinPoint sjp) { 270 WithincodeClinitTest.addSJP(sjp); 271 } 272 273 276 public void afterFinallyMethodCall(StaticJoinPoint sjp) { 277 WithincodeClinitTest.addSJP(sjp); 278 } 279 280 283 public void beforeHandler(StaticJoinPoint sjp) { 284 WithincodeClinitTest.addSJP(sjp); 285 } 286 287 290 public void beforeArgsHandler(StaticJoinPoint sjp, HandlerTestBeforeException htbe) { 291 WithincodeClinitTest.addSJP(sjp); 292 } 293 294 298 public void beforeCtorCall(JoinPoint sjp) { 299 WithincodeClinitTest.addJP(sjp); 300 } 301 302 305 public Object aroundCtorCall(JoinPoint sjp) throws Throwable { 306 WithincodeClinitTest.addJP(sjp); 307 return sjp.proceed(); 308 } 309 310 313 public void afterCtorCall(JoinPoint sjp) { 314 WithincodeClinitTest.addJP(sjp); 315 } 316 317 320 public void afterReturningCtorCall(JoinPoint sjp) { 321 WithincodeClinitTest.addJP(sjp); 322 } 323 324 327 public void beforeGetSet(JoinPoint sjp) { 328 WithincodeClinitTest.addJP(sjp); 329 } 330 331 334 public Object aroundGetSet(JoinPoint sjp) throws Throwable { 335 WithincodeClinitTest.addJP(sjp); 336 return sjp.proceed(); 337 } 338 339 342 public void afterGetSet(JoinPoint sjp) { 343 WithincodeClinitTest.addJP(sjp); 344 } 345 346 349 public void afterReturningGetSet(JoinPoint sjp) { 350 WithincodeClinitTest.addJP(sjp); 351 } 352 353 356 public void beforeMethodCall(JoinPoint sjp) { 357 WithincodeClinitTest.addJP(sjp); 358 } 359 360 363 public Object aroundMethodCall(JoinPoint sjp) throws Throwable { 364 WithincodeClinitTest.addJP(sjp); 365 return sjp.proceed(); 366 } 367 368 371 public void afterThrowingTypeMethodCall(JoinPoint sjp) { 372 WithincodeClinitTest.addJP(sjp); 373 } 374 375 378 public void afterThrowingMethodCall(JoinPoint sjp) { 379 WithincodeClinitTest.addJP(sjp); 380 } 381 382 385 public void afterFinallyMethodCall(JoinPoint sjp) { 386 WithincodeClinitTest.addJP(sjp); 387 } 388 389 392 public void beforeHandler(JoinPoint sjp) { 393 WithincodeClinitTest.addJP(sjp); 394 } 395 396 399 public void beforeArgsHandler(JoinPoint sjp, HandlerTestBeforeException htbe) { 400 WithincodeClinitTest.addJP(sjp); 401 } 402 403 } 404 | Popular Tags |