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.ClassName
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;static StaticImport
staticMethodImport
(Class<?> clz, String... members) A helper implementation to create aStaticImport
from 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 aStaticImport
from 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
-