类 GeneratedMethod

java.lang.Object
cn.taketoday.aot.generate.GeneratedMethod

public final class GeneratedMethod extends Object
A generated method.
从以下版本开始:
4.0
作者:
Phillip Webb, Stephane Nicoll
另请参阅:
  • 字段详细资料

    • className

      private final cn.taketoday.javapoet.ClassName className
    • name

      private final String 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 new GeneratedMethod instance with the given name. This constructor is package-private since names should only be generated via GeneratedMethods.
      参数:
      className - the declaring class of the method
      name - the generated method name
      method - consumer to generate the method
  • 方法详细资料

    • getName

      public String getName()
      Return the generated name of the method.
      返回:
      the name of the generated method
    • toMethodReference

      public MethodReference toMethodReference()
      Return a MethodReference to this generated method.
      返回:
      a method reference
    • getMethodSpec

      cn.taketoday.javapoet.MethodSpec getMethodSpec()
      Return the MethodSpec for this generated method.
      返回:
      the method spec
      抛出:
      IllegalStateException - if one of the generateBy(...) methods has not been called
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object