Package io.micronaut.aop.runtime
Record Class DefaultRuntimeProxyDefinition<T>
java.lang.Object
java.lang.Record
io.micronaut.aop.runtime.DefaultRuntimeProxyDefinition<T>
- Type Parameters:
T- The proxy type- Record Components:
proxyBeanDefinition- The proxy bean definitionresolutionContext- The bean resolution contextinterceptedMethods- The intercepted methodsintroduction- Whether the proxy is an introductionproxyTarget- Whether the proxy is a proxy target beanconstructorValues- The constructor values
- All Implemented Interfaces:
RuntimeProxyDefinition<T>
@Internal
@NullMarked
public record DefaultRuntimeProxyDefinition<T>(BeanDefinition<T> proxyBeanDefinition, BeanResolutionContext resolutionContext, List<RuntimeProxyDefinition.InterceptedMethod<T>> interceptedMethods, boolean introduction, boolean proxyTarget, Object[] constructorValues)
extends Record
implements RuntimeProxyDefinition<T>
The default
RuntimeProxyDefinition.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.aop.runtime.RuntimeProxyDefinition
RuntimeProxyDefinition.InterceptedMethod<K> -
Constructor Summary
ConstructorsConstructorDescriptionDefaultRuntimeProxyDefinition(BeanDefinition<T> proxyBeanDefinition, BeanResolutionContext resolutionContext, List<RuntimeProxyDefinition.InterceptedMethod<T>> interceptedMethods, boolean introduction, boolean proxyTarget, Object[] constructorValues) Creates an instance of aDefaultRuntimeProxyDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> DefaultRuntimeProxyDefinition<T> around(BeanResolutionContext resolutionContext, BeanDefinition<T> proxyBeanDefinition, boolean isProxyTarget, Object[] constructorValues) Creates a new instance for around advice.Argument<?>[]The constructor arguments.Object[]Returns the value of theconstructorValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinterceptedMethodsrecord component.booleanReturns the value of theintroductionrecord component.static <T> DefaultRuntimeProxyDefinition<T> introduction(BeanResolutionContext resolutionContext, BeanDefinition<T> proxyBeanDefinition) Creates a new instance for introduction advice.Returns the value of theproxyBeanDefinitionrecord component.booleanReturns the value of theproxyTargetrecord component.Returns the value of theresolutionContextrecord component.Get the target bean.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DefaultRuntimeProxyDefinition
public DefaultRuntimeProxyDefinition(BeanDefinition<T> proxyBeanDefinition, BeanResolutionContext resolutionContext, List<RuntimeProxyDefinition.InterceptedMethod<T>> interceptedMethods, boolean introduction, boolean proxyTarget, Object[] constructorValues) Creates an instance of aDefaultRuntimeProxyDefinitionrecord class.- Parameters:
proxyBeanDefinition- the value for theproxyBeanDefinitionrecord componentresolutionContext- the value for theresolutionContextrecord componentinterceptedMethods- the value for theinterceptedMethodsrecord componentintroduction- the value for theintroductionrecord componentproxyTarget- the value for theproxyTargetrecord componentconstructorValues- the value for theconstructorValuesrecord component
-
-
Method Details
-
around
public static <T> DefaultRuntimeProxyDefinition<T> around(BeanResolutionContext resolutionContext, BeanDefinition<T> proxyBeanDefinition, boolean isProxyTarget, Object[] constructorValues) Creates a new instance for around advice.- Type Parameters:
T- The proxy type- Parameters:
resolutionContext- The resolution contextproxyBeanDefinition- The proxy bean definitionisProxyTarget- Is proxy target beanconstructorValues- The constructor values- Returns:
- The definition
-
introduction
public static <T> DefaultRuntimeProxyDefinition<T> introduction(BeanResolutionContext resolutionContext, BeanDefinition<T> proxyBeanDefinition) Creates a new instance for introduction advice.- Type Parameters:
T- The proxy type- Parameters:
resolutionContext- The resolution contextproxyBeanDefinition- The proxy bean definition- Returns:
- The definition
-
beanContext
- Specified by:
beanContextin interfaceRuntimeProxyDefinition<T>- Returns:
- The bean context.
-
targetBean
Description copied from interface:RuntimeProxyDefinitionGet the target bean. Only if proxy target is enabled.- Specified by:
targetBeanin interfaceRuntimeProxyDefinition<T>- Returns:
- The target bean.
-
constructorArguments
Description copied from interface:RuntimeProxyDefinitionThe constructor arguments.- Specified by:
constructorArgumentsin interfaceRuntimeProxyDefinition<T>- Returns:
- The constructor arguments
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
proxyBeanDefinition
Returns the value of theproxyBeanDefinitionrecord component.- Specified by:
proxyBeanDefinitionin interfaceRuntimeProxyDefinition<T>- Returns:
- the value of the
proxyBeanDefinitionrecord component
-
resolutionContext
Returns the value of theresolutionContextrecord component.- Returns:
- the value of the
resolutionContextrecord component
-
interceptedMethods
Returns the value of theinterceptedMethodsrecord component.- Specified by:
interceptedMethodsin interfaceRuntimeProxyDefinition<T>- Returns:
- the value of the
interceptedMethodsrecord component
-
introduction
public boolean introduction()Returns the value of theintroductionrecord component.- Specified by:
introductionin interfaceRuntimeProxyDefinition<T>- Returns:
- the value of the
introductionrecord component
-
proxyTarget
public boolean proxyTarget()Returns the value of theproxyTargetrecord component.- Specified by:
proxyTargetin interfaceRuntimeProxyDefinition<T>- Returns:
- the value of the
proxyTargetrecord component
-
constructorValues
Returns the value of theconstructorValuesrecord component.- Specified by:
constructorValuesin interfaceRuntimeProxyDefinition<T>- Returns:
- the value of the
constructorValuesrecord component
-