Interface StaticImport
-
public interface StaticImport
A Poet static import definition to enable inclusion of static imports at code generation time
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description com.squareup.javapoet.ClassName
className()
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;static StaticImport
staticMethodImport(Class<?> clz, String... members)
A helper implementation to create aStaticImport
from aClass
-
-
-
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 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
-
-