Top Description Fields Constructors Methods
org.springframework.beans.factory.aot

public Class AutowiredArgumentsCodeGenerator

extends Object
Class Inheritance
Imports
java.lang.reflect.Constructor, .Executable, .Method, java.util.Arrays, java.util.function.Predicate, org.springframework.javapoet.CodeBlock, org.springframework.util.Assert, .ReflectionUtils

Code generator to apply AutowiredArguments.

Generates code in the form: args.get(0), args.get(1) or args.get(0, String.class), args.get(1, Integer.class)

The simpler form is only used if the target method or constructor is unambiguous.

Authors
Phillip Webb, Stephane Nicoll
Since
6.0

Field Summary

Modifier and TypeField and Description
private final Executable
private final Class<?>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public CodeBlock
generateCode(Class<?>[] parameterTypes)

public CodeBlock
generateCode(Class<?>[] parameterTypes, int startIndex)

public CodeBlock
generateCode(Class<?>[] parameterTypes, int startIndex, String variableName)

private boolean
private boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

executableback to summary
private final Executable executable
targetback to summary
private final Class<?> target

Constructor Detail

AutowiredArgumentsCodeGeneratorback to summary
public AutowiredArgumentsCodeGenerator(Class<?> target, Executable executable)

Method Detail

generateCodeback to summary
public CodeBlock generateCode(Class<?>[] parameterTypes)
generateCodeback to summary
public CodeBlock generateCode(Class<?>[] parameterTypes, int startIndex)
generateCodeback to summary
public CodeBlock generateCode(Class<?>[] parameterTypes, int startIndex, String variableName)
hasSameParameterCountback to summary
private boolean hasSameParameterCount(Executable executable)
isAmbiguousback to summary
private boolean isAmbiguous()