We all like to catch errors at the compilation stage, instead of runtime exceptions. They are easiest to eliminate, the compiler itself shows all the places that need fixing. Although most problems can only be detected when the program is started, we try to do this as soon as possible. here and here . The most important method in it is process. In which we can get a list of all the annotated elements and conduct the necessary checks.
public boolean process (Set
, returned by the getClass () method. For example, they can be compared to find out if the types ...