Interface StaticImport
public interface StaticImport
A Poet static import definition to enable inclusion of static imports at code generation time
-
Method Summary
Modifier and TypeMethodDescriptioncom.squareup.javapoet.ClassNameThe 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;static StaticImportstaticMethodImport(Class<?> clz, String... members) A helper implementation to create aStaticImportfrom aClass
-
Method Details
-
className
com.squareup.javapoet.ClassName className()- Returns:
- The Poet representation of the class to import (may or may not yet exist)
-
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
A helper implementation to create aStaticImportfrom aClass- Parameters:
clz- the class to importmembers- the members from that class to import, if none then * is assumed- Returns:
- an anonymous implementation of
StaticImport
-