@Internal public class BeanDefinitionWriter extends AbstractClassFileWriter implements BeanDefinitionVisitor
Responsible for building BeanDefinition instances at compile time. Uses ASM build the class definition.
Should be used from AST frameworks to build bean definitions from source code data.
For example:
BeanDefinitionWriter writer = new BeanDefinitionWriter("my.package", "MyClass", "javax.inject.Singleton", true)
writer.visitBeanDefinitionConstructor()
writer.visitFieldInjectionPoint("my.Qualifier", false, "my.package.MyDependency", "myfield" )
writer.visitBeanDefinitionEnd()
writer.writeTo(new File(..))
BeanDefinition| Modifier and Type | Class and Description |
|---|---|
static class |
BeanDefinitionWriter.MethodVisitData
Data used when visiting method.
|
CONSTRUCTOR_NAME, DEFAULT_MAX_STACK, DESCRIPTOR_DEFAULT_CONSTRUCTOR, METHOD_DEFAULT_CONSTRUCTOR, NAME_TO_TYPE_MAP, TYPE_ARGUMENT, TYPE_ARGUMENT_ARRAY, TYPE_CLASS, TYPE_OBJECT, ZERO_ARGUMENTS_CONSTANTPROXY_SUFFIXAALOAD, AASTORE, ACC_ABSTRACT, ACC_ANNOTATION, ACC_BRIDGE, ACC_DEPRECATED, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_MANDATED, ACC_MODULE, ACC_NATIVE, ACC_OPEN, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STATIC_PHASE, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_TRANSITIVE, ACC_VARARGS, ACC_VOLATILE, ACONST_NULL, ALOAD, ANEWARRAY, ARETURN, ARRAYLENGTH, ASM4, ASM5, ASM6, ASM7, ASTORE, ATHROW, BALOAD, BASTORE, BIPUSH, CALOAD, CASTORE, CHECKCAST, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DLOAD, DMUL, DNEG, DOUBLE, DREM, DRETURN, DSTORE, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F_APPEND, F_CHOP, F_FULL, F_NEW, F_SAME, F_SAME1, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FLOAD, FLOAT, FMUL, FNEG, FREM, FRETURN, FSTORE, FSUB, GETFIELD, GETSTATIC, GOTO, H_GETFIELD, H_GETSTATIC, H_INVOKEINTERFACE, H_INVOKESPECIAL, H_INVOKESTATIC, H_INVOKEVIRTUAL, H_NEWINVOKESPECIAL, H_PUTFIELD, H_PUTSTATIC, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IINC, ILOAD, IMUL, INEG, INSTANCEOF, INTEGER, INVOKEDYNAMIC, INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE, ISUB, IUSHR, IXOR, JSR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDC, LDIV, LLOAD, LMUL, LNEG, LONG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, LSTORE, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, MULTIANEWARRAY, NEW, NEWARRAY, NOP, NULL, POP, POP2, PUTFIELD, PUTSTATIC, RET, RETURN, SALOAD, SASTORE, SIPUSH, SWAP, T_BOOLEAN, T_BYTE, T_CHAR, T_DOUBLE, T_FLOAT, T_INT, T_LONG, T_SHORT, TABLESWITCH, TOP, UNINITIALIZED_THIS, V_PREVIEW, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, V1_8, V10, V11, V12, V9| Constructor and Description |
|---|
BeanDefinitionWriter(String packageName,
String className,
AnnotationMetadata annotationMetadata)
Creates a bean definition writer.
|
BeanDefinitionWriter(String packageName,
String className,
boolean isInterface,
AnnotationMetadata annotationMetadata)
Creates a bean definition writer.
|
BeanDefinitionWriter(String packageName,
String className,
String providedClassName,
boolean isInterface,
AnnotationMetadata annotationMetadata)
Creates a bean definition writer.
|
BeanDefinitionWriter(String packageName,
String className,
String beanDefinitionName,
String providedClassName,
boolean isInterface,
AnnotationMetadata annotationMetadata)
Creates a bean definition writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ClassWriterOutputVisitor visitor)
Accept a ClassWriterOutputVisitor to write this writer to disk.
|
AnnotationMetadata |
getAnnotationMetadata() |
String |
getBeanDefinitionClassFile() |
String |
getBeanDefinitionName() |
String |
getBeanSimpleName() |
String |
getBeanTypeName() |
org.objectweb.asm.ClassVisitor |
getClassWriter() |
String |
getPackageName() |
List<BeanDefinitionWriter.MethodVisitData> |
getPostConstructMethodVisits() |
List<BeanDefinitionWriter.MethodVisitData> |
getPreDestroyMethodVisits() |
org.objectweb.asm.Type |
getProvidedType()
The provided type of the bean.
|
boolean |
isInterface() |
boolean |
isSingleton() |
boolean |
isValidated() |
boolean |
requiresMethodProcessing()
By default, when the
BeanContext is started, the
BeanDefinition.getExecutableMethods() are not processed by registered
ExecutableMethodProcessor instances unless this method returns true. |
void |
setRequiresMethodProcessing(boolean shouldPreProcess)
Sets whether the
BeanType.requiresMethodProcessing() returns true. |
void |
setValidated(boolean validated)
Make the bean definition as validated by javax.validation.
|
byte[] |
toByteArray() |
String |
toString() |
void |
visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata,
boolean requiresReflection)
Visits a no-args constructor used to create the bean definition.
|
void |
visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata,
boolean requiresReflection,
Map<String,Object> argumentTypes,
Map<String,AnnotationMetadata> argumentAnnotationMetadata,
Map<String,Map<String,Object>> genericTypes)
Visits the constructor used to create the bean definition.
|
void |
visitBeanDefinitionEnd()
Finalize the bean definition to the given output stream.
|
void |
visitBeanDefinitionInterface(Class<? extends BeanDefinition> interfaceType)
Visit a marker interface on the generated bean definition.
|
void |
visitBeanFactoryMethod(Object factoryClass,
Object producedType,
String methodName,
AnnotationMetadata methodAnnotationMetadata,
Map<String,Object> argumentTypes,
Map<String,AnnotationMetadata> argumentAnnotationMetadata,
Map<String,Map<String,Object>> genericTypes)
In the case where the produced class is produced by a factory method annotated with
Bean this method should be called. |
void |
visitConfigBuilderDurationMethod(String prefix,
Object returnType,
String methodName,
String path)
Visit a configuration builder method that accepts a long and a TimeUnit.
|
void |
visitConfigBuilderEnd()
Finalize a configuration builder field.
|
void |
visitConfigBuilderField(Object type,
String field,
AnnotationMetadata annotationMetadata,
ConfigurationMetadataBuilder metadataBuilder)
Begin defining a configuration builder.
|
void |
visitConfigBuilderMethod(Object type,
String methodName,
AnnotationMetadata annotationMetadata,
ConfigurationMetadataBuilder metadataBuilder)
Begin defining a configuration builder.
|
void |
visitConfigBuilderMethod(String prefix,
Object returnType,
String methodName,
Object paramType,
Map<String,Object> generics,
String path)
Visit a configuration builder method.
|
ExecutableMethodWriter |
visitExecutableMethod(Object declaringType,
Object returnType,
Object genericReturnType,
Map<String,Object> returnTypeGenericTypes,
String methodName,
Map<String,Object> argumentTypes,
Map<String,Object> genericArgumentTypes,
Map<String,AnnotationMetadata> argumentAnnotationMetadata,
Map<String,Map<String,Object>> genericTypes,
AnnotationMetadata annotationMetadata)
Visit a method that is to be made executable allow invocation of said method without reflection.
|
void |
visitFieldInjectionPoint(Object declaringType,
Object fieldType,
String fieldName,
boolean requiresReflection,
AnnotationMetadata annotationMetadata,
Map<String,Object> typeArguments)
Visits a field injection point.
|
void |
visitFieldValue(Object declaringType,
Object fieldType,
String fieldName,
boolean requiresReflection,
AnnotationMetadata annotationMetadata,
Map<String,Object> typeArguments,
boolean isOptional)
Visits a field injection point.
|
void |
visitMethodInjectionPoint(Object declaringType,
boolean requiresReflection,
Object returnType,
String methodName,
Map<String,Object> argumentTypes,
Map<String,AnnotationMetadata> argumentAnnotationMetadata,
Map<String,Map<String,Object>> genericTypes,
AnnotationMetadata annotationMetadata)
Visits a method injection point.
|
void |
visitPostConstructMethod(Object declaringType,
boolean requiresReflection,
Object returnType,
String methodName,
Map<String,Object> argumentTypes,
Map<String,AnnotationMetadata> argumentAnnotationMetadata,
Map<String,Map<String,Object>> genericTypes,
AnnotationMetadata annotationMetadata)
Visits a method injection point.
|
void |
visitPreDestroyMethod(Object declaringType,
boolean requiresReflection,
Object returnType,
String methodName,
Map<String,Object> argumentTypes,
Map<String,AnnotationMetadata> argumentAnnotationMetadata,
Map<String,Map<String,Object>> genericTypes,
AnnotationMetadata annotationMetadata)
Visits a method injection point.
|
void |
visitPreDestroyMethod(Object declaringType,
Object returnType,
String methodName)
Visits a pre-destroy method injection point.
|
void |
visitPreDestroyMethod(Object declaringType,
String methodName)
Visits a pre-destroy method injection point.
|
void |
visitSetterValue(Object declaringType,
AnnotationMetadata annotationMetadata,
boolean requiresReflection,
Object valueType,
String setterName,
Map<String,Object> genericTypes,
AnnotationMetadata setterArgumentMetadata,
boolean isOptional)
Visits an injection point for a setter.
|
void |
visitSetterValue(Object declaringType,
AnnotationMetadata annotationMetadata,
boolean requiresReflection,
Object fieldType,
String fieldName,
String setterName,
Map<String,Object> genericTypes,
boolean isOptional)
Visits an injection point for a field and setter pairing.
|
void |
visitSuperBeanDefinition(String name)
Alter the super class of this bean definition.
|
void |
visitSuperBeanDefinitionFactory(String beanName)
Alter the super class of this bean definition to use another factory bean.
|
void |
visitTypeArguments(Map<String,Map<String,Object>> typeArguments)
Visits the type arguments for the bean.
|
buildArgument, generateServiceDescriptor, getClassFileName, getConstructorDescriptor, getConstructorDescriptor, getInternalName, getInternalNameForCast, getMethodDescriptor, getMethodDescriptor, getMethodSignature, getObjectType, getObjectTypes, getTypeDescriptor, getTypeDescriptor, getTypeForElement, getTypeReference, getTypeReferenceForName, getWrapperType, invokeConstructor, invokeInterfaceStaticMethod, isPrimitive, newClassWriterOutputVisitor, pushBoxPrimitiveIfNecessary, pushBuildArgumentsForMethod, pushCastToType, pushMethodNameAndTypesArguments, pushNewArray, pushNewInstance, pushReturnValue, pushStoreInArray, pushStoreStringInArray, pushStoreTypeInArray, pushTypeArgumentElements, pushTypeArguments, returnVoid, startClass, startClass, startConstructor, startConstructor, startFinalClass, startProtectedMethod, startPublicClass, startPublicFinalClass, startPublicMethod, startPublicMethodZeroArgs, toParameterTypes, toTypeArguments, toTypeArguments, visitStaticInitializer, writeClassToDisk, writeClassToDisk, writeToclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitwriteTopublic BeanDefinitionWriter(String packageName, String className, AnnotationMetadata annotationMetadata)
packageName - The package name of the beanclassName - The class name, without the package, of the beanannotationMetadata - The annotation metadatapublic BeanDefinitionWriter(String packageName, String className, boolean isInterface, AnnotationMetadata annotationMetadata)
packageName - The package name of the beanclassName - The class name, without the package, of the beanisInterface - Whether the writer is for an interface.annotationMetadata - The annotation metadatapublic BeanDefinitionWriter(String packageName, String className, String providedClassName, boolean isInterface, AnnotationMetadata annotationMetadata)
packageName - The package name of the beanclassName - The class name, without the package, of the beanprovidedClassName - The type this bean definition provides, in this case where the bean implements ProviderisInterface - Is the type an interfaceannotationMetadata - The annotation metadatapublic BeanDefinitionWriter(String packageName, String className, String beanDefinitionName, String providedClassName, boolean isInterface, AnnotationMetadata annotationMetadata)
packageName - The package name of the beanclassName - The class name, without the package, of the beanbeanDefinitionName - The name of the bean definitionprovidedClassName - The type this bean definition provides, which differs from the class name in the case of factory beansisInterface - Whether the provided type is an interfaceannotationMetadata - The annotation metadatapublic final List<BeanDefinitionWriter.MethodVisitData> getPostConstructMethodVisits()
public List<BeanDefinitionWriter.MethodVisitData> getPreDestroyMethodVisits()
public org.objectweb.asm.ClassVisitor getClassWriter()
public boolean isInterface()
isInterface in interface BeanDefinitionVisitorpublic boolean isSingleton()
isSingleton in interface BeanDefinitionVisitorpublic void visitBeanDefinitionInterface(Class<? extends BeanDefinition> interfaceType)
BeanDefinitionVisitorvisitBeanDefinitionInterface in interface BeanDefinitionVisitorinterfaceType - The interface typepublic void visitSuperBeanDefinition(String name)
BeanDefinitionVisitorAbstractBeanDefinition.visitSuperBeanDefinition in interface BeanDefinitionVisitorname - The super typepublic void visitSuperBeanDefinitionFactory(String beanName)
BeanDefinitionVisitorvisitSuperBeanDefinitionFactory in interface BeanDefinitionVisitorbeanName - The bean namepublic String getBeanTypeName()
getBeanTypeName in interface BeanDefinitionVisitorpublic org.objectweb.asm.Type getProvidedType()
BeanDefinitionVisitorBeanDefinitionVisitor.getBeanTypeName(), except in the case of
factory beans which produce a different type.getProvidedType in interface BeanDefinitionVisitorpublic void setValidated(boolean validated)
BeanDefinitionVisitorsetValidated in interface BeanDefinitionVisitorvalidated - Whether the bean definition is validatedpublic boolean isValidated()
isValidated in interface BeanDefinitionVisitorpublic String getBeanDefinitionName()
getBeanDefinitionName in interface BeanDefinitionVisitorpublic String getBeanDefinitionClassFile()
public void visitBeanFactoryMethod(Object factoryClass, Object producedType, String methodName, AnnotationMetadata methodAnnotationMetadata, Map<String,Object> argumentTypes, Map<String,AnnotationMetadata> argumentAnnotationMetadata, Map<String,Map<String,Object>> genericTypes)
In the case where the produced class is produced by a factory method annotated with
Bean this method should be called.
factoryClass - The factory classproducedType - The produced typemethodName - The method namemethodAnnotationMetadata - The method annotation metadataargumentTypes - The arguments to the methodargumentAnnotationMetadata - The argument annotation metadatagenericTypes - The generic types for the method parameterspublic void visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata, boolean requiresReflection, Map<String,Object> argumentTypes, Map<String,AnnotationMetadata> argumentAnnotationMetadata, Map<String,Map<String,Object>> genericTypes)
visitBeanDefinitionConstructor in interface BeanDefinitionVisitorannotationMetadata - The annotation metadata for the constructorrequiresReflection - Whether invoking the constructor requires reflectionargumentTypes - The argument type names for each parameterargumentAnnotationMetadata - The qualifier type names for each parametergenericTypes - The generic types for each parameterpublic void visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata, boolean requiresReflection)
visitBeanDefinitionConstructor in interface BeanDefinitionVisitorannotationMetadata - The annotation metadata for the constructor.requiresReflection - Whether invoking the constructor requires reflection.public void visitBeanDefinitionEnd()
visitBeanDefinitionEnd in interface BeanDefinitionVisitorpublic byte[] toByteArray()
public void accept(ClassWriterOutputVisitor visitor) throws IOException
AbstractClassFileWriteraccept in interface BeanDefinitionVisitoraccept in class AbstractClassFileWritervisitor - The ClassWriterOutputVisitorIOException - if there is an error writing to diskpublic void visitSetterValue(Object declaringType, AnnotationMetadata annotationMetadata, boolean requiresReflection, Object fieldType, String fieldName, String setterName, Map<String,Object> genericTypes, boolean isOptional)
BeanDefinitionVisitorvisitSetterValue in interface BeanDefinitionVisitordeclaringType - The declaring typeannotationMetadata - The annotation metadatarequiresReflection - Whether the setter requires reflectionfieldType - The field typefieldName - The field namesetterName - The setter namegenericTypes - The generic typesisOptional - Whether the setter is optionalpublic void visitSetterValue(Object declaringType, AnnotationMetadata annotationMetadata, boolean requiresReflection, Object valueType, String setterName, Map<String,Object> genericTypes, AnnotationMetadata setterArgumentMetadata, boolean isOptional)
BeanDefinitionVisitorvisitSetterValue in interface BeanDefinitionVisitordeclaringType - The declaring typeannotationMetadata - The annotation metadatarequiresReflection - Whether the setter requires reflectionvalueType - The field typesetterName - The setter namegenericTypes - The generic typessetterArgumentMetadata - The setter argument metadataisOptional - Whether the setter is optionalpublic void visitPostConstructMethod(Object declaringType, boolean requiresReflection, Object returnType, String methodName, Map<String,Object> argumentTypes, Map<String,AnnotationMetadata> argumentAnnotationMetadata, Map<String,Map<String,Object>> genericTypes, AnnotationMetadata annotationMetadata)
BeanDefinitionVisitorvisitPostConstructMethod in interface BeanDefinitionVisitordeclaringType - The declaring type of the method. Either a Class or a string representing
the name of the typerequiresReflection - Whether the method requires reflectionreturnType - The return type of the method. Either a Class or a string representing the
name of the typemethodName - The method nameargumentTypes - The argument types. Note: an ordered map should be used such as LinkedHashMap.
Can be null or empty.argumentAnnotationMetadata - The argument annotation metadatagenericTypes - The generic types of each argument. Can be null.annotationMetadata - The annotation metadatapublic void visitPreDestroyMethod(Object declaringType, String methodName)
declaringType - The declaring type of the method. Either a Class or a string representing the name of the typemethodName - The method namepublic void visitPreDestroyMethod(Object declaringType, Object returnType, String methodName)
declaringType - The declaring type of the method. Either a Class or a string representing the name of the typereturnType - The return type of the methodmethodName - The method namepublic void visitPreDestroyMethod(Object declaringType, boolean requiresReflection, Object returnType, String methodName, Map<String,Object> argumentTypes, Map<String,AnnotationMetadata> argumentAnnotationMetadata, Map<String,Map<String,Object>> genericTypes, AnnotationMetadata annotationMetadata)
BeanDefinitionVisitorvisitPreDestroyMethod in interface BeanDefinitionVisitordeclaringType - The declaring type of the method. Either a Class or a string representing the
name of the typerequiresReflection - Whether the method requires reflectionreturnType - The return type of the method. Either a Class or a string representing the name
of the typemethodName - The method nameargumentTypes - The argument types. Note: an ordered map should be used such as LinkedHashMap.
Can be null or empty.argumentAnnotationMetadata - The argument annotation metadatagenericTypes - The generic types of each argument. Can be null.annotationMetadata - The annotation metadatapublic void visitMethodInjectionPoint(Object declaringType, boolean requiresReflection, Object returnType, String methodName, Map<String,Object> argumentTypes, Map<String,AnnotationMetadata> argumentAnnotationMetadata, Map<String,Map<String,Object>> genericTypes, AnnotationMetadata annotationMetadata)
BeanDefinitionVisitorvisitMethodInjectionPoint in interface BeanDefinitionVisitordeclaringType - The declaring type of the method. Either a Class or a string representing the
name of the typerequiresReflection - Whether the method requires reflectionreturnType - The return type of the method. Either a Class or a string representing the name
of the typemethodName - The method nameargumentTypes - The argument types. Note: an ordered map should be used such as LinkedHashMap.
Can be null or empty.argumentAnnotationMetadata - The argument annotation metadatagenericTypes - The generic types of each argument. Can be null.annotationMetadata - The annotation metadatapublic ExecutableMethodWriter visitExecutableMethod(Object declaringType, Object returnType, Object genericReturnType, Map<String,Object> returnTypeGenericTypes, String methodName, Map<String,Object> argumentTypes, Map<String,Object> genericArgumentTypes, Map<String,AnnotationMetadata> argumentAnnotationMetadata, Map<String,Map<String,Object>> genericTypes, AnnotationMetadata annotationMetadata)
BeanDefinitionVisitorvisitExecutableMethod in interface BeanDefinitionVisitordeclaringType - The declaring type of the method. Either a Class or a string representing the
name of the typereturnType - The return type of the method. Either a Class or a string representing the name
of the typegenericReturnType - The generic return typereturnTypeGenericTypes - The return type for generic typesmethodName - The method nameargumentTypes - The argument types. Note: an ordered map should be used such as LinkedHashMap.
Can be null or empty.genericArgumentTypes - The generic argument types. Note: an ordered map should be used such as LinkedHashMap.
Can be null or empty.argumentAnnotationMetadata - The argument annotation metadatagenericTypes - The generic types of each argument. Can be null.annotationMetadata - The annotation metadata for the methodExecutableMethodWriter.public String getPackageName()
getPackageName in interface BeanDefinitionVisitorpublic String getBeanSimpleName()
getBeanSimpleName in interface BeanDefinitionVisitorpublic AnnotationMetadata getAnnotationMetadata()
getAnnotationMetadata in interface BeanDefinitionVisitorpublic void visitConfigBuilderField(Object type, String field, AnnotationMetadata annotationMetadata, ConfigurationMetadataBuilder metadataBuilder)
BeanDefinitionVisitorvisitConfigBuilderField in interface BeanDefinitionVisitortype - The type of the builderfield - The name of the field that represents the builderannotationMetadata - The annotation metadata associated with the fieldmetadataBuilder - The ConfigurationMetadataBuilderConfigurationBuilderpublic void visitConfigBuilderMethod(Object type, String methodName, AnnotationMetadata annotationMetadata, ConfigurationMetadataBuilder metadataBuilder)
BeanDefinitionVisitorvisitConfigBuilderMethod in interface BeanDefinitionVisitortype - The type of the buildermethodName - The name of the method that returns the builderannotationMetadata - The annotation metadata associated with the fieldmetadataBuilder - The ConfigurationMetadataBuilderConfigurationBuilderpublic void visitConfigBuilderDurationMethod(String prefix, Object returnType, String methodName, String path)
BeanDefinitionVisitorvisitConfigBuilderDurationMethod in interface BeanDefinitionVisitorprefix - The prefix used for the methodreturnType - The return typemethodName - The method namepath - The property pathConfigurationBuilderpublic void visitConfigBuilderMethod(String prefix, Object returnType, String methodName, Object paramType, Map<String,Object> generics, String path)
BeanDefinitionVisitorvisitConfigBuilderMethod in interface BeanDefinitionVisitorprefix - The prefix used for the methodreturnType - The return typemethodName - The method nameparamType - The method typegenerics - The generic types of the methodpath - The property pathConfigurationBuilderpublic void visitConfigBuilderEnd()
BeanDefinitionVisitorvisitConfigBuilderEnd in interface BeanDefinitionVisitorConfigurationBuilderpublic void setRequiresMethodProcessing(boolean shouldPreProcess)
BeanDefinitionVisitorBeanType.requiresMethodProcessing() returns true.setRequiresMethodProcessing in interface BeanDefinitionVisitorshouldPreProcess - True if they should be pre-processedpublic void visitTypeArguments(Map<String,Map<String,Object>> typeArguments)
BeanDefinitionVisitorvisitTypeArguments in interface BeanDefinitionVisitortypeArguments - The type argumentspublic boolean requiresMethodProcessing()
BeanDefinitionVisitorBeanContext is started, the
BeanDefinition.getExecutableMethods() are not processed by registered
ExecutableMethodProcessor instances unless this method returns true.requiresMethodProcessing in interface BeanDefinitionVisitorExecutable.processOnStartup()public void visitFieldInjectionPoint(Object declaringType, Object fieldType, String fieldName, boolean requiresReflection, AnnotationMetadata annotationMetadata, @Nullable Map<String,Object> typeArguments)
BeanDefinitionVisitorvisitFieldInjectionPoint in interface BeanDefinitionVisitordeclaringType - The declaring type. Either a Class or a string representing the name of the typefieldType - The type of the fieldfieldName - The name of the fieldrequiresReflection - Whether accessing the field requires reflectionannotationMetadata - The annotation metadata for the fieldtypeArguments - The generic type argumentspublic void visitFieldValue(Object declaringType, Object fieldType, String fieldName, boolean requiresReflection, AnnotationMetadata annotationMetadata, @Nullable Map<String,Object> typeArguments, boolean isOptional)
BeanDefinitionVisitorvisitFieldValue in interface BeanDefinitionVisitordeclaringType - The declaring type. Either a Class or a string representing the name of the typefieldType - The type of the fieldfieldName - The name of the fieldrequiresReflection - Whether accessing the field requires reflectionannotationMetadata - The annotation metadata for the fieldtypeArguments - The generic type argumentsisOptional - Is the value optional