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 definition
resolutionContext - The bean resolution context
interceptedMethods - The intercepted methods
introduction - Whether the proxy is an introduction
proxyTarget - Whether the proxy is a proxy target bean
constructorValues - The constructor values
All Implemented Interfaces:
RuntimeProxyDefinition<T>

@Internal @NullMarked public record DefaultRuntimeProxyDefinition<T>(io.micronaut.inject.BeanDefinition<T> proxyBeanDefinition, io.micronaut.context.BeanResolutionContext resolutionContext, List<RuntimeProxyDefinition.InterceptedMethod<T>> interceptedMethods, boolean introduction, boolean proxyTarget, Object[] constructorValues) extends Record implements RuntimeProxyDefinition<T>
  • Constructor Details

    • DefaultRuntimeProxyDefinition

      public DefaultRuntimeProxyDefinition(io.micronaut.inject.BeanDefinition<T> proxyBeanDefinition, io.micronaut.context.BeanResolutionContext resolutionContext, List<RuntimeProxyDefinition.InterceptedMethod<T>> interceptedMethods, boolean introduction, boolean proxyTarget, Object[] constructorValues)
      Creates an instance of a DefaultRuntimeProxyDefinition record class.
      Parameters:
      proxyBeanDefinition - the value for the proxyBeanDefinition record component
      resolutionContext - the value for the resolutionContext record component
      interceptedMethods - the value for the interceptedMethods record component
      introduction - the value for the introduction record component
      proxyTarget - the value for the proxyTarget record component
      constructorValues - the value for the constructorValues record component
  • Method Details

    • around

      public static <T> DefaultRuntimeProxyDefinition<T> around(io.micronaut.context.BeanResolutionContext resolutionContext, io.micronaut.inject.BeanDefinition<T> proxyBeanDefinition, boolean isProxyTarget, Object[] constructorValues)
      Creates a new instance for around advice.
      Type Parameters:
      T - The proxy type
      Parameters:
      resolutionContext - The resolution context
      proxyBeanDefinition - The proxy bean definition
      isProxyTarget - Is proxy target bean
      constructorValues - The constructor values
      Returns:
      The definition
    • introduction

      public static <T> DefaultRuntimeProxyDefinition<T> introduction(io.micronaut.context.BeanResolutionContext resolutionContext, io.micronaut.inject.BeanDefinition<T> proxyBeanDefinition)
      Creates a new instance for introduction advice.
      Type Parameters:
      T - The proxy type
      Parameters:
      resolutionContext - The resolution context
      proxyBeanDefinition - The proxy bean definition
      Returns:
      The definition
    • beanContext

      public io.micronaut.context.BeanContext beanContext()
      Specified by:
      beanContext in interface RuntimeProxyDefinition<T>
      Returns:
      The bean context.
    • targetBean

      public T targetBean()
      Description copied from interface: RuntimeProxyDefinition
      Get the target bean. Only if proxy target is enabled.
      Specified by:
      targetBean in interface RuntimeProxyDefinition<T>
      Returns:
      The target bean.
    • constructorArguments

      public io.micronaut.core.type.Argument<?>[] constructorArguments()
      Description copied from interface: RuntimeProxyDefinition
      The constructor arguments.
      Specified by:
      constructorArguments in interface RuntimeProxyDefinition<T>
      Returns:
      The constructor arguments
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • proxyBeanDefinition

      public io.micronaut.inject.BeanDefinition<T> proxyBeanDefinition()
      Returns the value of the proxyBeanDefinition record component.
      Specified by:
      proxyBeanDefinition in interface RuntimeProxyDefinition<T>
      Returns:
      the value of the proxyBeanDefinition record component
    • resolutionContext

      public io.micronaut.context.BeanResolutionContext resolutionContext()
      Returns the value of the resolutionContext record component.
      Returns:
      the value of the resolutionContext record component
    • interceptedMethods

      public List<RuntimeProxyDefinition.InterceptedMethod<T>> interceptedMethods()
      Returns the value of the interceptedMethods record component.
      Specified by:
      interceptedMethods in interface RuntimeProxyDefinition<T>
      Returns:
      the value of the interceptedMethods record component
    • introduction

      public boolean introduction()
      Returns the value of the introduction record component.
      Specified by:
      introduction in interface RuntimeProxyDefinition<T>
      Returns:
      the value of the introduction record component
    • proxyTarget

      public boolean proxyTarget()
      Returns the value of the proxyTarget record component.
      Specified by:
      proxyTarget in interface RuntimeProxyDefinition<T>
      Returns:
      the value of the proxyTarget record component
    • constructorValues

      public Object[] constructorValues()
      Returns the value of the constructorValues record component.
      Specified by:
      constructorValues in interface RuntimeProxyDefinition<T>
      Returns:
      the value of the constructorValues record component