UNPKG

@atomist/sdm-pack-spring

Version:

Atomist software delivery machine extension pack for Spring and Spring Boot applications

43 lines (42 loc) 2.01 kB
import { Project, ProjectFile } from "@atomist/automation-client"; /** * Path expression for a class name annotated with Spring Boot. * Uses Java formal grammar. * @type {string} */ export declare const SpringBootAppClassInJava = "//normalClassDeclaration\n [//annotation[@value='@SpringBootApplication']]\n /identifier"; /** * Path expression for a class name annotated with Spring Boot. * Uses Kotlin formal grammar. * @type {string} */ export declare const SpringBootAppClassInKotlin = "//classDeclaration\n [//annotation[@value='@SpringBootApplication']]\n //Identifier"; /** * Represents the structure of a Spring Boot project, * which can be inferred from its contents. Covers application class * and starters. */ export declare class SpringBootProjectStructure { readonly applicationPackage: string; readonly applicationClass: string; readonly appClassFile: ProjectFile; /** * Infer the Spring project structure of the given project, if found * @param {ProjectAsync} p * @return {Promise<SpringBootProjectStructure>} */ static inferFromJavaSource(p: Project, globOptions?: string | string[]): Promise<SpringBootProjectStructure>; static inferFromKotlinSource(p: Project, globOptions?: string | string[]): Promise<SpringBootProjectStructure>; static inferFromJavaOrKotlinSource(p: Project): Promise<SpringBootProjectStructure>; private static inferFromSourceWithJavaLikeImports; /** * The stem of the application class. Strip "Application" if present. */ applicationClassStem: string; /** * @param applicationPackage The package with the Spring Boot application class in it. * @param applicationClass Name of the application class within the given package * @param appClassFile path to the file containing the @SpringBootApplication annotation */ private constructor(); }