My question is short. Are method preconditions and postconditions enforced by the compiler?
Have a look at Contracts for Java, which helps enforing pre- and postconditions as well as invariants through annotations. But there's no compile-time-checking, only runtime as far as I know.