Interface MethodGenerator

All Known Implementing Classes:
GeneratedMethods
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MethodGenerator
Generates new GeneratedMethod instances.
Since:
6.0
Author:
Phillip Webb
See Also:
  • Method Details

    • generateMethod

      GeneratedMethod generateMethod(Object... methodNameParts)
      Generate a new GeneratedMethod. The returned instance must define the method spec by calling using(builder -> ...).
      Parameters:
      methodNameParts - the method name parts that should be used to generate a unique method name
      Returns:
      the newly added GeneratedMethod
    • withName

      default MethodGenerator withName(Object... nameParts)
      Return a new MethodGenerator instance that generates method with additional implicit method name parts. The final generated name will be of the following form:

      Original Updated
      run <name>Run
      getValue get<Name>Value
      setValue set<Name>Value
      isEnabled is<Name>Enabled
      Parameters:
      nameParts - the implicit name parts
      Returns:
      a new MethodGenerator instance