How to provide static import for some methods using checkstyle?
for instance
I want the following method to be used only from static imports:
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
So code like this should not be allowed:
if (Objects.nonNull(varName)) {
Any ideas on how to achieve this with (preferred) standard or non-standard tools?
source
share