Код: Выделить всё
public @Nullable String getWhatever() {
return whatever;
}
public void setWhatever(@Nullable final String whatever) {
this.whatever = whatever;
}
public
@Nullable E getWhateverAsEnum(final Class enumClass) {
return Optional.ofNullable(getWhatever())
.map(v -> __AttributeEnumUtils.valueOfAttributeValue(enumClass, v))
.orElse(null);
}
public void setWhateverFromEnum(@Nullable final __AttributeEnum.__OfString enumValue) {
^^^^^^^^^
setWhatever(
Optional.ofNullable(enumValue)
.map(__AttributeEnum.__OfString::attributeValue)
.orElse(null)
);
}
Код: Выделить всё
java: type annotation @org.jspecify.annotations.Nullable is not expected here
(to annotate a qualified type, write ....__AttributeEnum.@org.jspecify.annotations.Nullable ....__AttributeEnum.__OfString)
Подробнее здесь: https://stackoverflow.com/questions/797 ... annotation