Package org.springframework.aot.generate
Class GeneratedMethod
java.lang.Object
org.springframework.aot.generate.GeneratedMethod
A generated method.
- Since:
- 6.0
- Author:
- Phillip Webb
- See Also:
-
Method Details
-
getName
Return the generated name of the method.- Returns:
- the name of the generated method
-
getSpec
public org.springframework.javapoet.MethodSpec getSpec()Return theMethodSpec
for this generated method.- Returns:
- the method spec
- Throws:
IllegalStateException
- if one of thegenerateBy(...)
methods has not been called
-
using
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
-