GeneratedMethod
| Modifier and Type | Field and Description |
|---|---|
| private final ClassName | |
| private final List | |
| private final Function | |
| private final MethodName |
| Access | Constructor and Description |
|---|---|
| pack-priv | GeneratedMethods(ClassName
the declaring class name className, Function<MethodName, String> the method name generator methodNameGenerator)Create a new |
| private | GeneratedMethods(ClassName className, Function<MethodName, String> methodNameGenerator, MethodName prefix, List<GeneratedMethod> generatedMethods)
|
| Modifier and Type | Method and Description |
|---|---|
| public GeneratedMethod | Returns: the newly addedGeneratedMethodthe suggested name for the method suggestedName, Consumer<MethodSpec.a methodConsumer used to build methodAdd a new |
| public GeneratedMethod | Returns: the newly addedGeneratedMethodthe suggested name parts for the method suggestedNameParts, Consumer<MethodSpec.a methodConsumer used to build methodAdd a new |
| pack-priv void | doWithMethodSpecs(Consumer<MethodSpec>
the action to perform action)Call the given action with each of the |
| pack-priv Stream | |
| public GeneratedMethods | Returns: a new instance with the specified prefixthe prefix to add to suggested method names prefix)Specify the prefix to use for method names. |
| className | back to summary |
|---|---|
| private final ClassName className | |
| generatedMethods | back to summary |
|---|---|
| private final List<GeneratedMethod> generatedMethods | |
| methodNameGenerator | back to summary |
|---|---|
| private final Function<MethodName, String> methodNameGenerator | |
| prefix | back to summary |
|---|---|
| private final MethodName prefix | |
| GeneratedMethods | back to summary |
|---|---|
| pack-priv GeneratedMethods(ClassName className, Function<MethodName, String> methodNameGenerator) Create a new
| |
| GeneratedMethods | back to summary |
|---|---|
| private GeneratedMethods(ClassName className, Function<MethodName, String> methodNameGenerator, MethodName prefix, List<GeneratedMethod> generatedMethods) | |
| add | back to summary |
|---|---|
| public GeneratedMethod add(String suggestedName, Consumer<MethodSpec. Add a new The The prefix is applied a little differently for suggested names that
start with
| |
| add | back to summary |
|---|---|
| public GeneratedMethod add(String[] suggestedNameParts, Consumer<MethodSpec. Add a new The The prefix is applied a little differently for suggested name parts
that start with
| |
| doWithMethodSpecs | back to summary |
|---|---|
| pack-priv void doWithMethodSpecs(Consumer<MethodSpec> action) Call the given action with each of the
| |
| stream | back to summary |
|---|---|
| pack-priv Stream | |
| withPrefix | back to summary |
|---|---|
| public GeneratedMethods withPrefix(String prefix) Specify the prefix to use for method names. The prefix applies to
suggested method names, with special handling of
| |