问题
My root question is how to benefit from the 'unchecked generics type' Eclipse compiler warning, but not have the list of those warnings in the Problems view polluted by noise from java classes which are generated from xsd files by xjc (via maven-jaxb2-plugin.)
I've read other places that I can ignore compiler warnings per source folder and that would be great, but I don't have the authority to place the generated code it it's own source folder. :(
Given my situation, my assumption is that the easiest and most durable way to do this would be to use jaxb binding files (.xjb) to add @SuppressWarnings at the class level of all of the classes that jaxb generates. However I'm not very smart on using xjc, I just see how it/maven/eclipse are wired together to generate .java files from the .xsd files. So this leads to 2 questions. First, am I wrong to think this possible/easy? Second, if that is easy what's a good way at getting started on accomplishing this?
来源:https://stackoverflow.com/questions/19917257/avoiding-compiler-warnings-on-code-generated-by-xjc