类 DefaultMethodReference
java.lang.Object
cn.taketoday.aot.generate.DefaultMethodReference
- 所有已实现的接口:
MethodReference
Default
MethodReference implementation based on a MethodSpec.- 从以下版本开始:
- 4.0
- 作者:
- Stephane Nicoll, Phillip Webb
-
嵌套类概要
从接口继承的嵌套类/接口 cn.taketoday.aot.generate.MethodReference
MethodReference.ArgumentCodeGenerator -
字段概要
字段修饰符和类型字段说明private final cn.taketoday.javapoet.ClassNameprivate final cn.taketoday.javapoet.MethodSpec -
构造器概要
构造器构造器说明DefaultMethodReference(cn.taketoday.javapoet.MethodSpec method, cn.taketoday.javapoet.ClassName declaringClass) -
方法概要
修饰符和类型方法说明protected voidaddArguments(cn.taketoday.javapoet.CodeBlock.Builder code, MethodReference.ArgumentCodeGenerator argumentCodeGenerator) Add the code for the method arguments using the specifiedMethodReference.ArgumentCodeGeneratorif necessary.protected cn.taketoday.javapoet.CodeBlockinstantiateDeclaringClass(cn.taketoday.javapoet.ClassName declaringClass) private booleanisSameDeclaringClass(cn.taketoday.javapoet.ClassName declaringClass) private booleanisStatic()cn.taketoday.javapoet.CodeBlockReturn this method reference as aCodeBlock.cn.taketoday.javapoet.CodeBlocktoInvokeCodeBlock(MethodReference.ArgumentCodeGenerator argumentCodeGenerator, cn.taketoday.javapoet.ClassName targetClassName) Return this method reference as aCodeBlockusing the specifiedMethodReference.ArgumentCodeGenerator.toString()从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 cn.taketoday.aot.generate.MethodReference
toInvokeCodeBlock
-
字段详细资料
-
method
private final cn.taketoday.javapoet.MethodSpec method -
declaringClass
-
-
构造器详细资料
-
DefaultMethodReference
public DefaultMethodReference(cn.taketoday.javapoet.MethodSpec method, @Nullable cn.taketoday.javapoet.ClassName declaringClass)
-
-
方法详细资料
-
toCodeBlock
public cn.taketoday.javapoet.CodeBlock toCodeBlock()从接口复制的说明:MethodReferenceReturn this method reference as aCodeBlock. If the reference is to an instance method thenthis::<method name>will be returned.- 指定者:
toCodeBlock在接口中MethodReference- 返回:
- a code block for the method reference.
-
toInvokeCodeBlock
public cn.taketoday.javapoet.CodeBlock toInvokeCodeBlock(MethodReference.ArgumentCodeGenerator argumentCodeGenerator, @Nullable cn.taketoday.javapoet.ClassName targetClassName) 从接口复制的说明:MethodReferenceReturn this method reference as aCodeBlockusing the specifiedMethodReference.ArgumentCodeGenerator. ThetargetClassNamedefines the context in which the method invocation is added.If the caller has an instance of the type in which this method is defined, it can hint that by specifying the type as a target class.
- 指定者:
toInvokeCodeBlock在接口中MethodReference- 参数:
argumentCodeGenerator- the argument code generator to usetargetClassName- the target class name- 返回:
- a code block to invoke the method
-
addArguments
protected void addArguments(cn.taketoday.javapoet.CodeBlock.Builder code, MethodReference.ArgumentCodeGenerator argumentCodeGenerator) Add the code for the method arguments using the specifiedMethodReference.ArgumentCodeGeneratorif necessary.- 参数:
code- the code builder to use to add method argumentsargumentCodeGenerator- the code generator to use
-
instantiateDeclaringClass
protected cn.taketoday.javapoet.CodeBlock instantiateDeclaringClass(cn.taketoday.javapoet.ClassName declaringClass) -
isStatic
private boolean isStatic() -
isSameDeclaringClass
private boolean isSameDeclaringClass(cn.taketoday.javapoet.ClassName declaringClass) -
toString
-