public class AopProxyWriter extends AbstractClassFileWriter implements ProxyingBeanDefinitionVisitor
Modifier and Type | Field and Description |
---|---|
static String |
FIELD_READ_LOCK |
static String |
FIELD_READ_WRITE_LOCK |
static String |
FIELD_TARGET |
static org.objectweb.asm.Type |
FIELD_TYPE_INTERCEPTORS |
static String |
FIELD_WRITE_LOCK |
static int |
HASHCODE |
static int |
MAX_LOCALS |
static org.objectweb.asm.commons.Method |
METHOD_GET_PROXY_TARGET |
static org.objectweb.asm.commons.Method |
METHOD_GET_PROXY_TARGET_BEAN |
static String |
METHOD_RESOLVE_TARGET |
static org.objectweb.asm.Type |
TYPE_BEAN_LOCATOR |
static org.objectweb.asm.Type |
TYPE_INTERCEPTOR_CHAIN |
static org.objectweb.asm.Type |
TYPE_LOCK |
static org.objectweb.asm.Type |
TYPE_METHOD_INTERCEPTOR_CHAIN |
static org.objectweb.asm.Type |
TYPE_READ_WRITE_LOCK |
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_CONSTANT
PROXY_SUFFIX
AALOAD, 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 |
---|
AopProxyWriter(BeanDefinitionWriter parent,
Object... interceptorTypes)
Constructs a new
AopProxyWriter for the given parent BeanDefinitionWriter and starting interceptors types. |
AopProxyWriter(BeanDefinitionWriter parent,
OptionalValues<Boolean> settings,
Object... interceptorTypes)
Constructs a new
AopProxyWriter for the given parent BeanDefinitionWriter and starting interceptors types. |
AopProxyWriter(String packageName,
String className,
boolean isInterface,
AnnotationMetadata annotationMetadata,
Object[] interfaceTypes,
Object... interceptorTypes)
Constructs a new
AopProxyWriter for the purposes of writing Introduction advise. |
AopProxyWriter(String packageName,
String className,
boolean isInterface,
boolean implementInterface,
AnnotationMetadata annotationMetadata,
Object[] interfaceTypes,
Object... interceptorTypes)
Constructs a new
AopProxyWriter for the purposes of writing Introduction advise. |
Modifier and Type | Method and Description |
---|---|
void |
accept(ClassWriterOutputVisitor visitor)
Write the class to output via a visitor that manages output destination.
|
AnnotationMetadata |
getAnnotationMetadata() |
String |
getBeanDefinitionName() |
String |
getBeanSimpleName() |
String |
getBeanTypeName() |
String |
getPackageName() |
org.objectweb.asm.Type |
getProvidedType()
The provided type of the bean.
|
String |
getProxiedBeanDefinitionName() |
String |
getProxiedTypeName() |
boolean |
isInterface() |
boolean |
isProxyTarget()
Is the target bean being proxied.
|
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.
|
protected void |
startClass(org.objectweb.asm.ClassVisitor classWriter,
String className,
org.objectweb.asm.Type superType) |
void |
visitAroundMethod(Object declaringType,
Object returnType,
Object genericReturnType,
Map<String,Object> returnTypeGenericTypes,
String methodName,
Map<String,Object> argumentTypes,
Map<String,Object> genericParameters,
Map<String,AnnotationMetadata> argumentAnnotationMetadata,
Map<String,Map<String,Object>> genericTypes,
AnnotationMetadata annotationMetadata)
Visit a method that is to be proxied.
|
void |
visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata,
boolean requiresReflection)
Visits a no arguments constructor.
|
void |
visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata,
boolean requiresReflection,
Map<String,Object> argumentTypes,
Map<String,AnnotationMetadata> argumentAnnotationMetadata,
Map<String,Map<String,Object>> genericTypes)
Visits a constructor with arguments.
|
void |
visitBeanDefinitionEnd()
Finalizes the proxy.
|
void |
visitBeanDefinitionInterface(Class<? extends BeanDefinition> interfaceType)
Visit a marker interface on the generated bean definition.
|
void |
visitConfigBuilderDurationMethod(String prefix,
String configurationPrefix,
Object returnType,
String methodName)
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,
String configurationPrefix,
Object returnType,
String methodName,
Object paramType,
Map<String,Object> generics)
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 |
visitInterceptorTypes(Object... interceptorTypes)
visitInterceptorTypes.
|
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 |
visitSetterValue(Object declaringType,
AnnotationMetadata setterMetadata,
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.
|
void |
writeTo(File compilationDir)
Write the proxy to the given compilation directory.
|
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, startConstructor, startConstructor, startFinalClass, startProtectedMethod, startPublicClass, startPublicFinalClass, startPublicMethod, startPublicMethodZeroArgs, toParameterTypes, toTypeArguments, toTypeArguments, visitStaticInitializer, writeClassToDisk, writeClassToDisk
public static final int HASHCODE
public static final int MAX_LOCALS
public static final org.objectweb.asm.commons.Method METHOD_GET_PROXY_TARGET
public static final org.objectweb.asm.commons.Method METHOD_GET_PROXY_TARGET_BEAN
public static final org.objectweb.asm.Type FIELD_TYPE_INTERCEPTORS
public static final org.objectweb.asm.Type TYPE_INTERCEPTOR_CHAIN
public static final org.objectweb.asm.Type TYPE_METHOD_INTERCEPTOR_CHAIN
public static final String FIELD_TARGET
public static final String FIELD_READ_WRITE_LOCK
public static final org.objectweb.asm.Type TYPE_READ_WRITE_LOCK
public static final String FIELD_READ_LOCK
public static final String FIELD_WRITE_LOCK
public static final org.objectweb.asm.Type TYPE_LOCK
public static final org.objectweb.asm.Type TYPE_BEAN_LOCATOR
public static final String METHOD_RESOLVE_TARGET
public AopProxyWriter(BeanDefinitionWriter parent, Object... interceptorTypes)
Constructs a new AopProxyWriter
for the given parent BeanDefinitionWriter
and starting interceptors types.
Additional Interceptor
types can be added downstream with visitInterceptorTypes(Object...)
.
parent
- The parent BeanDefinitionWriter
interceptorTypes
- The annotation types of the Interceptor
instances to be injectedpublic AopProxyWriter(BeanDefinitionWriter parent, OptionalValues<Boolean> settings, Object... interceptorTypes)
Constructs a new AopProxyWriter
for the given parent BeanDefinitionWriter
and starting interceptors types.
Additional Interceptor
types can be added downstream with visitInterceptorTypes(Object...)
.
parent
- The parent BeanDefinitionWriter
settings
- optional settinginterceptorTypes
- The annotation types of the Interceptor
instances to be injectedpublic AopProxyWriter(String packageName, String className, boolean isInterface, AnnotationMetadata annotationMetadata, Object[] interfaceTypes, Object... interceptorTypes)
AopProxyWriter
for the purposes of writing Introduction
advise.packageName
- The package nameclassName
- The class nameisInterface
- Is the target of the advise an interfaceannotationMetadata
- The annotation metadatainterfaceTypes
- The additional interfaces to implementinterceptorTypes
- The interceptor typespublic AopProxyWriter(String packageName, String className, boolean isInterface, boolean implementInterface, AnnotationMetadata annotationMetadata, Object[] interfaceTypes, Object... interceptorTypes)
AopProxyWriter
for the purposes of writing Introduction
advise.packageName
- The package nameclassName
- The class nameisInterface
- Is the target of the advise an interfaceimplementInterface
- Whether the interface should be implemented. If false the interfaceTypes
argument should contain at least one entryannotationMetadata
- The annotation metadatainterfaceTypes
- The additional interfaces to implementinterceptorTypes
- The interceptor typespublic boolean isProxyTarget()
protected void startClass(org.objectweb.asm.ClassVisitor classWriter, String className, org.objectweb.asm.Type superType)
startClass
in class AbstractClassFileWriter
classWriter
- The current class writerclassName
- The class namesuperType
- The super typepublic void visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata, boolean requiresReflection)
BeanDefinitionVisitor
BeanDefinitionVisitor.visitBeanDefinitionConstructor(AnnotationMetadata, boolean, Map, Map, Map)
should be called at least
once.visitBeanDefinitionConstructor
in interface BeanDefinitionVisitor
annotationMetadata
- The annotation metadata for the constructor.requiresReflection
- Whether invoking the constructor requires reflection.public boolean isSingleton()
isSingleton
in interface BeanDefinitionVisitor
public boolean isInterface()
isInterface
in interface BeanDefinitionVisitor
public void visitBeanDefinitionInterface(Class<? extends BeanDefinition> interfaceType)
BeanDefinitionVisitor
visitBeanDefinitionInterface
in interface BeanDefinitionVisitor
interfaceType
- The interface typepublic String getBeanTypeName()
getBeanTypeName
in interface BeanDefinitionVisitor
public org.objectweb.asm.Type getProvidedType()
BeanDefinitionVisitor
BeanDefinitionVisitor.getBeanTypeName()
, except in the case of
factory beans which produce a different type.getProvidedType
in interface BeanDefinitionVisitor
public void setValidated(boolean validated)
BeanDefinitionVisitor
setValidated
in interface BeanDefinitionVisitor
validated
- Whether the bean definition is validatedpublic boolean isValidated()
isValidated
in interface BeanDefinitionVisitor
public String getBeanDefinitionName()
getBeanDefinitionName
in interface BeanDefinitionVisitor
public void visitBeanDefinitionConstructor(AnnotationMetadata annotationMetadata, boolean requiresReflection, Map<String,Object> argumentTypes, Map<String,AnnotationMetadata> argumentAnnotationMetadata, Map<String,Map<String,Object>> genericTypes)
visitBeanDefinitionConstructor(AnnotationMetadata, boolean)
should be called at least oncevisitBeanDefinitionConstructor
in interface BeanDefinitionVisitor
argumentTypes
- The argument names and types. Should be an ordered map should as LinkedHashMap
argumentAnnotationMetadata
- The argument names and metadatagenericTypes
- The argument names and generic types. Should be an ordered map should as LinkedHashMap
annotationMetadata
- The annotation metadata for the constructorrequiresReflection
- Whether invoking the constructor requires reflectionpublic void visitAroundMethod(Object declaringType, Object returnType, Object genericReturnType, Map<String,Object> returnTypeGenericTypes, String methodName, Map<String,Object> argumentTypes, Map<String,Object> genericParameters, Map<String,AnnotationMetadata> argumentAnnotationMetadata, Map<String,Map<String,Object>> genericTypes, AnnotationMetadata annotationMetadata)
declaringType
- 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
- Map containing the return generic typesmethodName
- The method nameargumentTypes
- The argument types. Note: an ordered map should be used such as LinkedHashMap. Can be null or empty.genericParameters
- The generic argument typesargumentAnnotationMetadata
- The argument annotation metadatagenericTypes
- The generic types of each argument. Can be null.annotationMetadata
- metadatapublic void visitBeanDefinitionEnd()
writeTo(File)
visitBeanDefinitionEnd
in interface BeanDefinitionVisitor
public void writeTo(File compilationDir) throws IOException
writeTo
in interface BeanDefinitionVisitor
writeTo
in class AbstractClassFileWriter
compilationDir
- The target compilation directoryIOException
public void accept(ClassWriterOutputVisitor visitor) throws IOException
accept
in interface BeanDefinitionVisitor
accept
in class AbstractClassFileWriter
visitor
- the writer output visitorIOException
- If an error occurspublic void visitSuperBeanDefinition(String name)
BeanDefinitionVisitor
AbstractBeanDefinition
.visitSuperBeanDefinition
in interface BeanDefinitionVisitor
name
- The super typepublic void visitSuperBeanDefinitionFactory(String beanName)
BeanDefinitionVisitor
visitSuperBeanDefinitionFactory
in interface BeanDefinitionVisitor
beanName
- The bean namepublic void visitSetterValue(Object declaringType, AnnotationMetadata annotationMetadata, boolean requiresReflection, Object fieldType, String fieldName, String setterName, Map<String,Object> genericTypes, boolean isOptional)
BeanDefinitionVisitor
visitSetterValue
in interface BeanDefinitionVisitor
declaringType
- 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 setterMetadata, boolean requiresReflection, Object valueType, String setterName, Map<String,Object> genericTypes, AnnotationMetadata setterArgumentMetadata, boolean isOptional)
BeanDefinitionVisitor
visitSetterValue
in interface BeanDefinitionVisitor
declaringType
- The declaring typesetterMetadata
- 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)
BeanDefinitionVisitor
visitPostConstructMethod
in interface BeanDefinitionVisitor
declaringType
- 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, boolean requiresReflection, Object returnType, String methodName, Map<String,Object> argumentTypes, Map<String,AnnotationMetadata> argumentAnnotationMetadata, Map<String,Map<String,Object>> genericTypes, AnnotationMetadata annotationMetadata)
BeanDefinitionVisitor
visitPreDestroyMethod
in interface BeanDefinitionVisitor
declaringType
- 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)
BeanDefinitionVisitor
visitMethodInjectionPoint
in interface BeanDefinitionVisitor
declaringType
- 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)
BeanDefinitionVisitor
visitExecutableMethod
in interface BeanDefinitionVisitor
declaringType
- 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 void visitFieldInjectionPoint(Object declaringType, Object fieldType, String fieldName, boolean requiresReflection, AnnotationMetadata annotationMetadata, @Nullable Map<String,Object> typeArguments)
BeanDefinitionVisitor
visitFieldInjectionPoint
in interface BeanDefinitionVisitor
declaringType
- 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)
BeanDefinitionVisitor
visitFieldValue
in interface BeanDefinitionVisitor
declaringType
- 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 optionalpublic String getPackageName()
getPackageName
in interface BeanDefinitionVisitor
public String getBeanSimpleName()
getBeanSimpleName
in interface BeanDefinitionVisitor
public AnnotationMetadata getAnnotationMetadata()
getAnnotationMetadata
in interface BeanDefinitionVisitor
public void visitConfigBuilderField(Object type, String field, AnnotationMetadata annotationMetadata, ConfigurationMetadataBuilder metadataBuilder)
BeanDefinitionVisitor
visitConfigBuilderField
in interface BeanDefinitionVisitor
type
- The type of the builderfield
- The name of the field that represents the builderannotationMetadata
- The annotation metadata associated with the fieldmetadataBuilder
- The ConfigurationMetadataBuilder
ConfigurationBuilder
public void visitConfigBuilderMethod(Object type, String methodName, AnnotationMetadata annotationMetadata, ConfigurationMetadataBuilder metadataBuilder)
BeanDefinitionVisitor
visitConfigBuilderMethod
in interface BeanDefinitionVisitor
type
- The type of the buildermethodName
- The name of the method that returns the builderannotationMetadata
- The annotation metadata associated with the fieldmetadataBuilder
- The ConfigurationMetadataBuilder
ConfigurationBuilder
public void visitConfigBuilderMethod(String prefix, String configurationPrefix, Object returnType, String methodName, Object paramType, Map<String,Object> generics)
BeanDefinitionVisitor
visitConfigBuilderMethod
in interface BeanDefinitionVisitor
prefix
- The prefix used for the methodconfigurationPrefix
- The prefix used to retrieve the configuration valuereturnType
- The return typemethodName
- The method nameparamType
- The method typegenerics
- The generic types of the methodConfigurationBuilder
public void visitConfigBuilderDurationMethod(String prefix, String configurationPrefix, Object returnType, String methodName)
BeanDefinitionVisitor
visitConfigBuilderDurationMethod
in interface BeanDefinitionVisitor
prefix
- The prefix used for the methodconfigurationPrefix
- The prefix used to retrieve the configuration valuereturnType
- The return typemethodName
- The method nameConfigurationBuilder
public void visitConfigBuilderEnd()
BeanDefinitionVisitor
visitConfigBuilderEnd
in interface BeanDefinitionVisitor
ConfigurationBuilder
public void setRequiresMethodProcessing(boolean shouldPreProcess)
BeanDefinitionVisitor
BeanType.requiresMethodProcessing()
returns true.setRequiresMethodProcessing
in interface BeanDefinitionVisitor
shouldPreProcess
- True if they should be pre-processedpublic void visitTypeArguments(Map<String,Map<String,Object>> typeArguments)
BeanDefinitionVisitor
visitTypeArguments
in interface BeanDefinitionVisitor
typeArguments
- The type argumentspublic boolean requiresMethodProcessing()
BeanDefinitionVisitor
BeanContext
is started, the
BeanDefinition.getExecutableMethods()
are not processed by registered
ExecutableMethodProcessor
instances unless this method returns true.requiresMethodProcessing
in interface BeanDefinitionVisitor
Executable.processOnStartup()
public String getProxiedTypeName()
getProxiedTypeName
in interface ProxyingBeanDefinitionVisitor
public String getProxiedBeanDefinitionName()
getProxiedBeanDefinitionName
in interface ProxyingBeanDefinitionVisitor
public void visitInterceptorTypes(Object... interceptorTypes)
interceptorTypes
- types