Java 类org.springframework.boot.cli.compiler.AstUtils 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringTestCompilerAutoConfiguration.java   
@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);
    }
}
项目:spring-boot-concourse    文件:SpringTestCompilerAutoConfiguration.java   
@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);
    }
}
项目:contestparser    文件:SpringTestCompilerAutoConfiguration.java   
@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);
    }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JUnitCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "Test");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringSecurityCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableWebSecurity",
            "EnableGlobalMethodSecurity");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringBatchCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableBatchProcessing");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RabbitCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableRabbit")
            || AstUtils.hasAtLeastOneAnnotation(classNode, "EnableRabbitMessaging");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringIntegrationCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableIntegration")
            || AstUtils.hasAtLeastOneAnnotation(classNode, "MessageEndpoint");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringSocialTwitterCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "Twitter");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:GroovyTemplatesCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableGroovyTemplates");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringMvcCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "Controller", "RestController",
            "EnableWebMvc");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpockCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.subclasses(classNode, "Specification");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringSocialFacebookCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "Facebook");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JmsCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableJms")
            || AstUtils.hasAtLeastOneAnnotation(classNode, "EnableJmsMessaging");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringRetryCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableRetry", "Retryable",
            "Recover");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:TransactionManagementCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableTransactionManagement");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringSocialLinkedInCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "LinkedIn");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringSecurityOAuth2CompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableAuthorizationServer",
            "EnableResourceServer", "EnableOAuth2Client", "EnableOAuth2Sso");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JdbcCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "JdbcTemplate",
            "NamedParameterJdbcTemplate", "DataSource");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ReactorCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableReactor")
            || AstUtils.hasAtLeastOneFieldOrMethod(classNode, "EventBus");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:CachingCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableCaching");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringTestCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode,
            "SpringApplicationConfiguration");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringMobileCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableDeviceResolver");
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringWebsocketCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableWebSocket",
            "EnableWebSocketMessageBroker");
}
项目:spring-boot-concourse    文件:JUnitCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "Test");
}
项目:spring-boot-concourse    文件:SpringSecurityCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableWebSecurity",
            "EnableGlobalMethodSecurity");
}
项目:spring-boot-concourse    文件:SpringBatchCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableBatchProcessing");
}
项目:spring-boot-concourse    文件:RabbitCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableRabbit")
            || AstUtils.hasAtLeastOneAnnotation(classNode, "EnableRabbitMessaging");
}
项目:spring-boot-concourse    文件:SpringIntegrationCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableIntegration")
            || AstUtils.hasAtLeastOneAnnotation(classNode, "MessageEndpoint");
}
项目:spring-boot-concourse    文件:SpringSocialTwitterCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "Twitter");
}
项目:spring-boot-concourse    文件:GroovyTemplatesCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableGroovyTemplates");
}
项目:spring-boot-concourse    文件:SpringMvcCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "Controller", "RestController",
            "EnableWebMvc");
}
项目:spring-boot-concourse    文件:SpockCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.subclasses(classNode, "Specification");
}
项目:spring-boot-concourse    文件:SpringSocialFacebookCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "Facebook");
}
项目:spring-boot-concourse    文件:JmsCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableJms")
            || AstUtils.hasAtLeastOneAnnotation(classNode, "EnableJmsMessaging");
}
项目:spring-boot-concourse    文件:SpringRetryCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableRetry", "Retryable",
            "Recover");
}
项目:spring-boot-concourse    文件:TransactionManagementCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableTransactionManagement");
}
项目:spring-boot-concourse    文件:SpringSocialLinkedInCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "LinkedIn");
}
项目:spring-boot-concourse    文件:SpringSecurityOAuth2CompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneAnnotation(classNode, "EnableAuthorizationServer",
            "EnableResourceServer", "EnableOAuth2Client", "EnableOAuth2Sso");
}
项目:spring-boot-concourse    文件:JdbcCompilerAutoConfiguration.java   
@Override
public boolean matches(ClassNode classNode) {
    return AstUtils.hasAtLeastOneFieldOrMethod(classNode, "JdbcTemplate",
            "NamedParameterJdbcTemplate", "DataSource");
}