Nelze vybrat více než 25 témat
Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
123456789101112131415 |
- package patterntesting.check.runtime;
-
- public aspect NotNullAspect {
-
- pointcut ctorWithNotNullArg() :
- execution(*..*.new(*)) && @args(NotNull);
-
- before() : ctorWithNotNullArg() {
- Object[] args = thisJoinPoint.getArgs();
- if (args[0] == null) {
- throw new AssertionError("@NotNull constraint violated");
- }
- }
-
- }
|