All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.hibernate.validator.runtime.ArcProxyBeanMetaDataClassNormalizer Maven / Gradle / Ivy

Go to download

Validate object properties (field, getter) and method parameters for your beans (REST, CDI, Jakarta Persistence)

There is a newer version: 3.17.5
Show newest version
package io.quarkus.hibernate.validator.runtime;

import org.hibernate.validator.metadata.BeanMetaDataClassNormalizer;

import io.quarkus.arc.Subclass;

/**
 * In the case of a proxy generated by Arc, return the parent class.
 * 
* This can have more than one level of hierarchy, in example: *
    *
  • When using @{@link io.quarkus.test.junit.mockito.InjectMock} or @{@link io.quarkus.test.junit.mockito.InjectSpy}
  • *
*/ public class ArcProxyBeanMetaDataClassNormalizer implements BeanMetaDataClassNormalizer { @Override public Class normalize(Class beanClass) { Class targetClass = beanClass; while (Subclass.class.isAssignableFrom(targetClass)) { targetClass = targetClass.getSuperclass(); } return targetClass; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy