Interface ValidatedBeanDefinition<T>

Type Parameters:
T - The bean definition type
All Superinterfaces:
AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, ArgumentCoercible<T>, BeanContextConditional, BeanDefinition<T>, BeanInfo<T>, BeanType<T>, Named, QualifiedBeanType<T>

public interface ValidatedBeanDefinition<T> extends BeanDefinition<T>
A bean definition that is validated with jakarta.validation.
Since:
1.0
Author:
Graeme Rocher
  • Method Details

    • validate

      default T validate(BeanResolutionContext resolutionContext, T instance)
      Validates the bean with the validator factory if present.
      Parameters:
      resolutionContext - The resolution context
      instance - The instance
      Returns:
      The instance
    • validateBeanArgument

      default <V> void validateBeanArgument(@NonNull BeanResolutionContext resolutionContext, @NonNull InjectionPoint injectionPoint, @NonNull Argument<V> argument, int index, @Nullable V value) throws BeanInstantiationException
      Validates the given bean after it has been constructor.
      Type Parameters:
      V - The value type
      Parameters:
      resolutionContext - The resolution context
      injectionPoint - The injection point
      argument - The argument
      index - The argument index
      value - The value
      Throws:
      BeanInstantiationException - if the bean is invalid