In the library spring-core in the file NonNull.java (spring core lang) is the following:
import javax.annotation.Nonnull;
import javax.annotation.meta.TypeQualifierNickname;
But when I use Spring boot app, I cannot see any library inside my fat JAR which defines such annotations. And I do not think that they are part of Java 17. Still my application which uses @NonNull annotation works. How it is possible? Am I missing something? EDITED: It seems to me, that it is possible to create annotation A in package A referencing to another annotation B in package B and does not have runtime dependency on library which defines B.