try {
Class gTransClass = transformLoader.loadClass(entry.getKey(), false, true, false);
//no inspection unchecked
GroovyASTTransformation transformAnnotation = (GroovyASTTransformation) gTransClass.getAnnotation(GroovyASTTransformation.class);
if (transformAnnotation == null) {
compilationUnit.getErrorCollector().addWarning(new WarningMessage(
WarningMessage.POSSIBLE_ERRORS,
"Transform Class " + entry.getKey() + " is specified as a global transform in " + entry.getValue().toExternalForm()
+ " but it is not annotated by " + GroovyASTTransformation.class.getName()
+ " the global tranform associated with it may fail and cause the compilation to fail.",
null,