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

org.hibernate.validator.testutil.DummyTraversableResolver Maven / Gradle / Ivy

There is a newer version: 5.4.3.Final
Show newest version
/*
 * 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.testutil;

import java.lang.annotation.ElementType;
import javax.validation.Path;
import javax.validation.TraversableResolver;

/**
 * A dummy traversable resolver which returns always {@code true}. This resolver is used by default by all test cases.
 *
 * @author Hardy Ferentschik
 */
public class DummyTraversableResolver implements TraversableResolver {
	@Override
	public boolean isReachable(Object traversableObject, Path.Node traversableProperty, Class rootBeanType, Path pathToTraversableObject, ElementType elementType) {
		return true;
	}

	@Override
	public boolean isCascadable(Object traversableObject, Path.Node traversableProperty, Class rootBeanType, Path pathToTraversableObject, ElementType elementType) {
		return true;
	}
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy