|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpatterntesting.java.runtime.AbstractNullPointerTrap
public abstract aspect AbstractNullPointerTrap
| Advice Detail |
before(): invalidNullParameter..
If a (null) parameter is detected something is wrong with the application code
| Advises: | patterntesting.java.runtime.AbstractNullPointerTrapTest.acceptNoNullArg |
afterReturning(java.lang.Object): nonVoidMethods..
A 'null' as return value is often an indication that something is wrong (otherwise an exception should be thrown)
| Advises: | patterntesting.java.runtime.AbstractNullPointerTrapTest.getUnallowedNullString |
| Pointcut Detail |
Specify what the application code is that should be subject to the pattern test.
Ex: pointcut applicationCode(): within(patterntesting.sample.*)
Specify which code is allowed to have null parameters.
Specify which methods may return null. Some methods (like find methods or getters) may return a null value.
Addresses all methods (or constructors) with at least one argument with should not be given as null parameter
AbstractNullTestTest
| Pointcut Summary | |
| public | applicationCode() Specify what the application code is that should be subject to the pattern test. |
| public | nullArgsAllowed() Specify which code is allowed to have null parameters. |
| public | mayReturnNull() Specify which methods may return null. |
| (package private) | invalidNullParameter() Addresses all methods (or constructors) with at least one argument with should not be given as null parameter |
| Advice Summary | ||
| before(): invalidNullParameter.. If a (null) parameter is detected something is wrong with the application code
| ||
| afterReturning(java.lang.Object): nonVoidMethods.. A 'null' as return value is often an indication that something is wrong (otherwise an exception should be thrown)
| ||
| Constructor Summary | |
|---|---|
AbstractNullPointerTrap()
|
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractNullPointerTrap()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||