Class GeneratedMethod

java.lang.Object
org.springframework.aot.generate.GeneratedMethod

public final class GeneratedMethod extends Object
A generated method.
Since:
6.0
Author:
Phillip Webb
See Also:
  • Method Details

    • getName

      public String getName()
      Return the generated name of the method.
      Returns:
      the name of the generated method
    • getSpec

      public org.springframework.javapoet.MethodSpec getSpec()
      Return the MethodSpec for this generated method.
      Returns:
      the method spec
      Throws:
      IllegalStateException - if one of the generateBy(...) methods has not been called
    • using

      public GeneratedMethod using(Consumer<org.springframework.javapoet.MethodSpec.Builder> builder)
      Generate the method using the given consumer.
      Parameters:
      builder - a consumer that will accept a method spec builder and configure it as necessary
      Returns:
      this instance
    • toString

      public String toString()
      Overrides:
      toString in class Object