@DoNotOverride for interface default methods would be neat, e.g. for something like this, which for better composability one wouldn't want to have to create an abstract class for, and would want ensure is never changed by implementing classes:
public interface Hashable {
@DoNotOverride
default Multihash hash() {
var hasher = Hasher.sha512();
hash(hasher);
return hasher.hash(Multihash.Type.sha2_512);
}
void hash(Hasher hasher);
}
Just a thought.
@DoNotOverridefor interface default methods would be neat, e.g. for something like this, which for better composability one wouldn't want to have to create an abstract class for, and would want ensure is never changed by implementing classes:Just a thought.