Interface StaticImport


  • public interface StaticImport
    A Poet static import definition to enable inclusion of static imports at code generation time
    • Method Detail

      • className

        com.squareup.javapoet.ClassName className()
        Returns:
        The Poet representation of the class to import (may or may not yet exist)
      • memberNames

        Iterable<String> memberNames()
        The members to import from the class for example if memberNames() returned List("trim", "isBlank") for StringUtils.class then the following static imports would be generated: import static software.amazon.awssdk.utils.StringUtils.trim; import static software.amazon.awssdk.utils.StringUtils.isBlank;
        Returns:
        The members to import from the class representation
      • staticMethodImport

        static StaticImport staticMethodImport​(Class<?> clz,
                                               String... members)
        A helper implementation to create a StaticImport from a Class
        Parameters:
        clz - the class to import
        members - the members from that class to import, if none then * is assumed
        Returns:
        an anonymous implementation of StaticImport