Grammar-Kit
Grammar-Kit copied to clipboard
Erroneous @Nullable annotation on generated getter
In my grammar the automatically generated getter seems to be producing a slightly odd result for getUpperBound, which is marked as @Nullable, when it should be @NotNull just like its twin getLowerBound.
range ::= LSB string RANGE_OPERATOR string RSB {
methods = [
getLowerBound="/string[0]"
getUpperBound="/string[1]"
]
}
generates:
@NotNull
List<EBNFString> getStringList();
@NotNull
EBNFString getGetLowerBound();
@Nullable
EBNFString getGetUpperBound();
For the interface and unless I'm mistaken that last method should definitely be @NotNull like the lower bound is.
Right. For lists the exact quantity logic is not currently implemented.