Annotation Interface ArgumentCheckByAssertion


@Target({METHOD,CONSTRUCTOR}) @Retention(SOURCE) public @interface ArgumentCheckByAssertion
Marker annotation for methods which use assertions for validating their arguments. Arguments validation with assertions is usually not a recommended practice, but Apache SIS does that when unconditional argument checks would be too expensive. Examples:
  • Checking wether two Coordinate Reference Systems are equal (ignoring metadata) in methods potentially executed millions of times (e.g. adding points).
  • Checking the class of argument values when those classes should never be wrong if the code has been compiled without Java compiler warnings.
This annotation is used for documenting methods where some preconditions are checked with assertions. The Javadoc should document what those preconditions are.
Since:
1.5