@interface: nah, mogliby dać jak w takim kotlinie, domyślnie do zmiennej nula nie przypiszesz, musi być np Object?. Bo adnotacje na każdej metodzie to zwyczajnie.... masa pisania i wygląda tak okropnie że się czytać nie da :D
Więc ot-tak na potrzeby wygodniejszego pisania w IDE mam
@Documented @Nonnull @Retention(RetentionPolicy.RUNTIME) @TypeQualifierDefault({ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE}) public @interface NonnullByDefault {} I daje w każdej paczce/pakiecie/jak kto tam to nazywa
apache should invent a "common" annotation and a tool that can convert it to any other annotation. the solution to the problem of too many standards is to invent a new standard. – irreputable Feb 11 '11 at 0:15
https://stackoverflow.com/questions/4963300/which-notnull-java-annotation-should-i-use
Polecam caly watek
#interfacesmieci
#java
Bo adnotacje na każdej metodzie to zwyczajnie.... masa pisania i wygląda tak okropnie że się czytać nie da :D
Więc ot-tak na potrzeby wygodniejszego pisania w IDE mam
@Documented @Nonnull @Retention(RetentionPolicy.RUNTIME)
@TypeQualifierDefault({ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE})
public @interface NonnullByDefault {}
I daje w każdej paczce/pakiecie/jak kto tam to nazywa
Mógłby ktoś w końcu wprowadzić jedną anotację, której wszyscy by używali, przynajmniej byłoby wiadomo, jaka jest wspólna wersja