类 GeneratedMethod
java.lang.Object
cn.taketoday.aot.generate.GeneratedMethod
A generated method.
- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Stephane Nicoll
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明private final cn.taketoday.javapoet.ClassNameprivate final cn.taketoday.javapoet.MethodSpecprivate final String -
构造器概要
构造器构造器说明GeneratedMethod(cn.taketoday.javapoet.ClassName className, String name, Consumer<cn.taketoday.javapoet.MethodSpec.Builder> method) Create a newGeneratedMethodinstance with the given name. -
方法概要
修饰符和类型方法说明(专用程序包) cn.taketoday.javapoet.MethodSpecReturn theMethodSpecfor this generated method.getName()Return the generated name of the method.Return aMethodReferenceto this generated method.toString()
-
字段详细资料
-
className
private final cn.taketoday.javapoet.ClassName className -
name
-
methodSpec
private final cn.taketoday.javapoet.MethodSpec methodSpec
-
-
构造器详细资料
-
GeneratedMethod
GeneratedMethod(cn.taketoday.javapoet.ClassName className, String name, Consumer<cn.taketoday.javapoet.MethodSpec.Builder> method) Create a newGeneratedMethodinstance with the given name. This constructor is package-private since names should only be generated viaGeneratedMethods.- 参数:
className- the declaring class of the methodname- the generated method namemethod- consumer to generate the method
-
-
方法详细资料
-
getName
Return the generated name of the method.- 返回:
- the name of the generated method
-
toMethodReference
Return aMethodReferenceto this generated method.- 返回:
- a method reference
-
getMethodSpec
cn.taketoday.javapoet.MethodSpec getMethodSpec()Return theMethodSpecfor this generated method.- 返回:
- the method spec
- 抛出:
IllegalStateException- if one of thegenerateBy(...)methods has not been called
-
toString
-