Class GenericBomAstTransformation

  • All Implemented Interfaces:
    org.codehaus.groovy.transform.ASTTransformation, SpringBootAstTransformation, org.springframework.core.Ordered
    Direct Known Subclasses:
    GrailsBomAstTransformation

    public abstract class GenericBomAstTransformation
    extends java.lang.Object
    implements SpringBootAstTransformation, org.springframework.core.Ordered
    A base class that lets plugin authors easily add additional BOMs to all apps. All the dependencies in the BOM (and its transitives) will be added to the dependency management lookup, so an app can use just the artifact id (e.g. "spring-jdbc") in a @Grab. To install, implement the missing methods and list the class in META-INF/services/org.springframework.boot.cli.compiler.SpringBootAstTransformation . The Ordered.getOrder() value needs to be before DependencyManagementBomTransformation.ORDER.
    Since:
    2022.1.0
    • Field Summary

      • Fields inherited from interface org.springframework.core.Ordered

        HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.lang.String getBomModule()
      The bom to be added to dependency management in compact form: "<groupId>:<artifactId>:<version>" (like in a @Grab).
      void visit​(org.codehaus.groovy.ast.ASTNode[] nodes, org.codehaus.groovy.control.SourceUnit source)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.core.Ordered

        getOrder
    • Constructor Detail

      • GenericBomAstTransformation

        public GenericBomAstTransformation()
    • Method Detail

      • visit

        public void visit​(org.codehaus.groovy.ast.ASTNode[] nodes,
                          org.codehaus.groovy.control.SourceUnit source)
        Specified by:
        visit in interface org.codehaus.groovy.transform.ASTTransformation
      • getBomModule

        protected abstract java.lang.String getBomModule()
        The bom to be added to dependency management in compact form: "<groupId>:<artifactId>:<version>" (like in a @Grab).
        Returns:
        the maven co-ordinates of the BOM to add