Migration Notes (0.8 to 0.9)
In the attempt to add all the new features and to make OVal 1.0 release ready, a large part of OVal's code base has been refactored.
This led to certain changes in the API:
- Packages with names in plural have been changed to singular (e.g. net.sf.oval.constraints => net.sf.oval.constraint)
- Everything related to programming by contract has been moved into a new package called net.sf.oval.guard. This includes ConstraintsViolatedListener, GuardAspect, Guard, @PreValidateThis, @PostValidateThis and others.
- The Guard class now extends the Validator class, therefore the Guard.getValidator() method has been removed.
- For class invariants are now checked by default for guarded classes on every call to non-private methods. If you require the old behaviour you can disable automatic invariant checking via MyGuardAspect.aspectOf().getGuard().setInvariantCheckingActivated(false)
- Getter methods now need to be annotated with @IsInvariant if their return value should be checked on a object validation via Validator.validate(Object)
- The Guard's setReportingMode() methods have been replaced with setInProbeMode methods.