Class aClass = prob.getClass();
Annotation[] annotations = aClass.getAnnotations();
for(Annotation annotation : annotations){
if(annotation instanceof DefaultSeverity){
DefaultSeverity myAnnotation = (DefaultSeverity) annotation;
CompilerProblemSeverity cps = myAnnotation.value();
String level;
if (cps.equals(CompilerProblemSeverity.ERROR))
level = Message.ERROR;
else if (cps.equals(CompilerProblemSeverity.WARNING))
level = Message.WARNING;