@Override public void apply(GroovyClassLoader loader, GroovyCompilerConfiguration configuration, GeneratorContext generatorContext, SourceUnit source, ClassNode classNode) throws CompilationFailedException { if (!AstUtils.hasAtLeastOneAnnotation(classNode, "RunWith")) { AnnotationNode runWith = new AnnotationNode(ClassHelper.make("RunWith")); runWith.addMember("value", new ClassExpression(ClassHelper.make("SpringRunner"))); classNode.addAnnotation(runWith); } }
@Override public void apply(GroovyClassLoader loader, GroovyCompilerConfiguration configuration, GeneratorContext generatorContext, SourceUnit source, ClassNode classNode) throws CompilationFailedException { if (!AstUtils.hasAtLeastOneAnnotation(classNode, "RunWith")) { AnnotationNode runwith = new AnnotationNode(ClassHelper.make("RunWith")); runwith.addMember("value", new ClassExpression(ClassHelper.make("SpringJUnit4ClassRunner"))); classNode.addAnnotation(runwith); } }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "Test"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableWebSecurity", "EnableGlobalMethodSecurity"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableBatchProcessing"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableRabbit") || AstUtils.hasAtLeastOneAnnotation(classNode, "EnableRabbitMessaging"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableIntegration") || AstUtils.hasAtLeastOneAnnotation(classNode, "MessageEndpoint"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "Twitter"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableGroovyTemplates"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "Controller", "RestController", "EnableWebMvc"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.subclasses(classNode, "Specification"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "Facebook"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableJms") || AstUtils.hasAtLeastOneAnnotation(classNode, "EnableJmsMessaging"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableRetry", "Retryable", "Recover"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableTransactionManagement"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "LinkedIn"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableAuthorizationServer", "EnableResourceServer", "EnableOAuth2Client", "EnableOAuth2Sso"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "JdbcTemplate", "NamedParameterJdbcTemplate", "DataSource"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableReactor") || AstUtils.hasAtLeastOneFieldOrMethod(classNode, "EventBus"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableCaching"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "SpringApplicationConfiguration"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableDeviceResolver"); }
@Override public boolean matches(ClassNode classNode) { return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableWebSocket", "EnableWebSocketMessageBroker"); }