org.hibernate.validator.spi.nodenameprovider.PropertyNodeNameProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-validator Show documentation
Show all versions of hibernate-validator Show documentation
JPMS Module-Info's for a few of the Jakarta Libraries. These will be removed as time goes by
/*
* Hibernate Validator, declare and validate application constraints
*
* License: Apache License, Version 2.0
* See the license.txt file in the root directory or .
*/
package org.hibernate.validator.spi.nodenameprovider;
import org.hibernate.validator.Incubating;
/**
* This interface is used to resolve the name of a property node when creating the property path.
*
* @author Damir Alibegovic
* @since 6.1.0
*/
@Incubating
public interface PropertyNodeNameProvider {
/**
* Returns the resolved name of a property.
*
* Depending on the subtype of the {@link Property},
* a different strategy for name resolution could be applied, defaulting to {@link Property#getName()}. For example:
*
*
* if (property instanceof {@link JavaBeanProperty}) {
* // for instance, generate a property name based on the annotations of the property
* } else {
* return property.getName();
* }
*
*
* @param property who's name needs to be resolved
*
* @return String representing the resolved name
*/
String getName(Property property);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy