name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hibernate-validator_NodeImpl_createPropertyNode_rdh | // TODO It would be nicer if we could return PropertyNode
public static NodeImpl createPropertyNode(String name, NodeImpl parent) {
return new NodeImpl(name,
parent, false, null, null, ElementKind.PROPERTY, EMPTY_CLASS_ARRAY, null, null, null, null);
} | 3.26 |
hibernate-validator_NodeImpl_includeTypeParameterInformation_rdh | // TODO: this is used to reduce the number of differences until we agree on the string representation
// it introduces some inconsistent behavior e.g. you get '<V>' for a Multimap but not for a Map
private static boolean includeTypeParameterInformation(Class<?> containerClass, Integer typeArgumentIndex) {
if ((containe... | 3.26 |
hibernate-validator_MethodConfigurationRule_isStrictSubType_rdh | /**
* Whether {@code otherClazz} is a strict subtype of {@code clazz} or not.
*
* @param clazz
* the super type to check against
* @param otherClazz
* the subtype to check
* @return {@code true} if {@code otherClazz} is a strict subtype of {@code clazz}, {@code false} otherwise
*/
protected boolean isStrict... | 3.26 |
hibernate-validator_Configuration_m0_rdh | /**
* Whether method constraints are allowed at any method ({@code true}) or only
* getter methods ({@code false}).
*
* @return {@code true} if method constraints are allowed on any method, {code false} if only on getter methods
*/
public boolean m0() {
return methodConstraintsSupported;
} | 3.26 |
hibernate-validator_Configuration_getMethodConstraintsSupportedOption_rdh | /**
* Retrieves the value for the "methodConstraintsSupported" property from the options.
*/
private boolean getMethodConstraintsSupportedOption(Map<String, String> options) {
String methodConstraintsSupported = options.get(f0);
// allow method constraints by default
if (methodConstraintsSupported == null) {
return t... | 3.26 |
hibernate-validator_Configuration_getVerboseOption_rdh | /**
* Retrieves the value for the "verbose" property from the options.
*/
private boolean getVerboseOption(Map<String, String> options, Messager messager) {
boolean theValue = Boolean.parseBoolean(options.get(VERBOSE_PROCESSOR_OPTION));
if (theValue) {
messager.printMessage(Kind.NOTE, StringHelper.format("Verbose rep... | 3.26 |
hibernate-validator_Configuration_isVerbose_rdh | /**
* Whether logging information shall be put out in a verbose way or not.
*
* @return {@code true} if logging information shall be put out in a verbose, {@code false} otherwise
*/
public boolean isVerbose() {
return verbose;
} | 3.26 |
hibernate-validator_Configuration_getDiagnosticKind_rdh | /**
* Returns the diagnosticKind to be used when reporting failing constraint checks.
*
* @return the diagnosticKind to be used when reporting failing constraint checks
*/
public Kind getDiagnosticKind() {
return diagnosticKind;
} | 3.26 |
hibernate-validator_Configuration_getDiagnosticKindOption_rdh | /**
* Retrieves the diagnostic kind to be used for error messages. If given in
* processor options, it will be taken from there, otherwise the default
* value {@link Kind#ERROR} will be returned.
*/
private Kind getDiagnosticKindOption(Map<String, String> options,
Messager messager) {
... | 3.26 |
hibernate-validator_StringHelper_toShortString_rdh | /**
* Creates a compact string representation of the given type, useful for debugging or toString() methods. Package
* names are shortened, e.g. "org.hibernate.validator.internal.engine" becomes "o.h.v.i.e". Not to be used for
* user-visible log messages.
*/public static String toShortString(Type type) {
if (ty... | 3.26 |
hibernate-validator_DefaultScriptEvaluatorFactory_run_rdh | /**
* Runs the given privileged action, using a privileged block if required.
* <p>
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in... | 3.26 |
hibernate-validator_ConstraintViolationImpl_getExpressionVariables_rdh | /**
*
* @return the expression variables added using {@link HibernateConstraintValidatorContext#addExpressionVariable(String, Object)}
*/
public Map<String, Object> getExpressionVariables() {
return expressionVariables;
} | 3.26 |
hibernate-validator_ConstraintViolationImpl_getMessageParameters_rdh | /**
*
* @return the message parameters added using {@link HibernateConstraintValidatorContext#addMessageParameter(String, Object)}
*/
public Map<String, Object> getMessageParameters() {
return messageParameters;
} | 3.26 |
hibernate-validator_ConstraintViolationImpl_createHashCode_rdh | /**
*
* @see #equals(Object) on which fields are taken into account
*/
private int createHashCode() {
int result = (interpolatedMessage != null) ? interpolatedMessage.hashCode() : 0;
result = (31 * result) +
(propertyPath != null ? propertyPath.hashCode() : 0);
result = (31 * result) + System.identit... | 3.26 |
hibernate-validator_ConstraintViolationImpl_equals_rdh | /**
* IMPORTANT - some behaviour of Validator depends on the correct implementation of this equals method! (HF)
* <p>
* {@code messageParameters}, {@code expressionVariables} and {@code dynamicPayload} are not taken into account for
* equality. These variables solely enrich the actual Constraint Violation with addi... | 3.26 |
hibernate-validator_ProgrammaticMetaDataProvider_mergeAnnotationProcessingOptions_rdh | /**
* Creates a single merged {@code AnnotationProcessingOptions} in case multiple programmatic mappings are provided.
* <p>
* Note that it is made sure at this point that no element (type, property, method etc.) is configured more than once within
* all the given contexts. So the "merge" pulls together the informa... | 3.26 |
hibernate-validator_AnnotationTypeMemberCheck_getMethod_rdh | /**
* Returns the method of the given type with the given name.
*
* @param element
* The type of interest.
* @param name
* The name of the method which should be returned.
* @return The method of the given type with the given name or null if no such method exists.
*/
private ExecutableElement getMethod(Type... | 3.26 |
hibernate-validator_AnnotationTypeMemberCheck_isEmptyArray_rdh | /**
* Checks whether the given annotation value is an empty array or not.
*
* @param annotationValue
* The annotation value of interest.
* @return True, if the given annotation value is an empty array, false otherwise.
*/
private boolean
isEmptyArray(AnnotationValue annotationValue)
{
return (annotationValu... | 3.26 |
hibernate-validator_AnnotationTypeMemberCheck_m0_rdh | /**
* Checks that the given type element
* <p/>
* <ul>
* <li>has a method with name "message",</li>
* <li>the return type of this method is {@link String}.</li>
* </ul>
*
* @param element
* The element of interest.
* @return A possibly non-empty set of constraint check errors, never null.
*/private Set<Con... | 3.26 |
hibernate-validator_AnnotationTypeMemberCheck_checkGroupsAttribute_rdh | /**
* Checks that the given type element
* <p/>
* <ul>
* <li>has a method with name "groups",</li>
* <li>the return type of this method is {@code Class<?>[]},</li>
* <li>the default value of this method is {@code {}}.</li>
* </ul>
*
* @param element
* The element of interest.
* @return A possibly non... | 3.26 |
hibernate-validator_AnnotationTypeMemberCheck_validateWildcardBounds_rdh | /**
* Returns true, if the given type mirror is a wildcard type with the given extends and super bounds, false otherwise.
*
* @param type
* The type to check.
* @param expectedExtendsBound
* A mirror representing the expected extends bound.
* @param expectedSuperBound
* A mirror representing the expected ... | 3.26 |
hibernate-validator_AnnotationTypeMemberCheck_checkPayloadAttribute_rdh | /**
* Checks that the given type element
* <p/>
* <ul>
* <li>has a method with name "payload",</li>
* <li>the return type of this method is {@code Class<? extends Payload>[]},</li>
* <li>the default value of this method is {@code {}}.</li>
* </ul>
*
* @param element
* The element of interest.
* @retu... | 3.26 |
hibernate-validator_ConstrainedParameter_merge_rdh | /**
* Creates a new constrained parameter object by merging this and the given
* other parameter.
*
* @param other
* The parameter to merge.
* @return A merged parameter.
*/
public ConstrainedParameter merge(ConstrainedParameter other) {
ConfigurationSource mergedSource
= ConfigurationSource.max(source, other... | 3.26 |
hibernate-validator_ConstraintHelper_isConstraintAnnotation_rdh | /**
* Checks whether the specified annotation is a valid constraint annotation. A constraint annotation has to
* fulfill the following conditions:
* <ul>
* <li>Must be annotated with {@link Constraint}
* <li>Define a message parameter</li>
* <li>Define a group parameter</li>
* <li>Define a payload parameter</li>... | 3.26 |
hibernate-validator_ConstraintHelper_getAllValidatorDescriptors_rdh | /**
* Returns the constraint validator classes for the given constraint
* annotation type, as retrieved from
*
* <ul>
* <li>{@link Constraint#validatedBy()},
* <li>internally registered validators for built-in constraints</li>
* <li>XML configuration and</li>
* <li>programmatically registered validators (see
*... | 3.26 |
hibernate-validator_ConstraintHelper_findValidatorDescriptors_rdh | /**
* Returns those validator descriptors for the given constraint annotation
* matching the given target.
*
* @param annotationType
* The annotation of interest.
* @param validationTarget
* The target, either annotated element or parameters.
* @param <A>
* the type of the annotation
* @return A list wi... | 3.26 |
hibernate-validator_ConstraintHelper_putValidatorDescriptors_rdh | /**
* Registers the given validator descriptors with the given constraint
* annotation type.
*
* @param annotationType
* The constraint annotation type
* @param validatorDescriptors
* The validator descriptors to register
* @param keepExistingClasses
* Whether already-registered validators should be kept... | 3.26 |
hibernate-validator_ConstraintHelper_getConstraintsFromMultiValueConstraint_rdh | /**
* Returns the constraints which are part of the given multi-value constraint.
* <p>
* Invoke {@link #isMultiValueConstraint(Class)} prior to calling this method to check whether a given constraint
* actually is a multi-value constraint.
*
* @param multiValueConstraint
* the multi-value constraint annotatio... | 3.26 |
hibernate-validator_ConstraintHelper_run_rdh | /**
* Runs the given privileged action, using a privileged block if required.
* <p>
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in... | 3.26 |
hibernate-validator_ParametersMethodOverrideCheck_getEnclosingTypeElementQualifiedNames_rdh | /**
* Provides a formatted string containing qualified names of enclosing types of provided methods.
*
* @param methods
* a collection of methods to convert to string of qualified names of enclosing types
* @return string of qualified names of enclosing types
*/ private String getEnclosingTypeElementQualifiedNa... | 3.26 |
hibernate-validator_DomainNameUtil_isValidEmailDomainAddress_rdh | /**
* Checks the validity of the domain name used in an email. To be valid it should be either a valid host name, or an
* IP address wrapped in [].
*
* @param domain
* domain to check for validity
* @return {@code true} if the provided string is a valid domain, {@code false} otherwise
*/
public static boolean ... | 3.26 |
hibernate-validator_DomainNameUtil_isValidDomainAddress_rdh | /**
* Checks validity of a domain name.
*
* @param domain
* the domain to check for validity
* @return {@code true} if the provided string is a valid domain, {@code false} otherwise
*/
public static boolean isValidDomainAddress(String domain) {
return isValidDomainAddress(domain, DOMAIN_PATTERN);
} | 3.26 |
hibernate-validator_ValidatorBean_isNullable_rdh | // TODO to be removed once using CDI API 4.x
public boolean isNullable() {
return false;
} | 3.26 |
hibernate-validator_NotEmptyValidatorForArraysOfByte_isValid_rdh | /**
* Checks the array is not {@code null} and not empty.
*
* @param array
* the array to validate
* @param constraintValidatorContext
* context in which the constraint is evaluated
* @return returns {@code true} if the array is not {@code null} and the array is not empty
*/
@Override
public boolean isValid... | 3.26 |
hibernate-validator_AnnotationDescriptor_run_rdh | /**
* Runs the given privileged action, using a privileged block if required.
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in JDK17")... | 3.26 |
hibernate-validator_AnnotationDescriptor_hashCode_rdh | /**
* Calculates the hash code of this annotation descriptor as described in
* {@link Annotation#hashCode()}.
*
* @return The hash code of this descriptor.
* @see Annotation#hashCode()
*/
@Override
public int hashCode() {
return hashCode;
} | 3.26 |
hibernate-validator_ClassCheckFactory_getClassChecks_rdh | /**
* Provides a collections of checks to be performed on a given element.
*
* @param element
* an element you'd like to check
* @return The checks to be performed to validate the given
*/
public Collection<ClassCheck> getClassChecks(Element element) {
switch (element.ge... | 3.26 |
hibernate-validator_AnnotationMetaDataProvider_m0_rdh | /**
* Finds all constraint annotations defined for the given constrainable and returns them in a list of
* constraint descriptors.
*
* @param constrainable
* The constrainable to check for constraint annotations.
* @param kind
* The constraint location kind.
* @return A list of constraint descriptors for al... | 3.26 |
hibernate-validator_AnnotationMetaDataProvider_m1_rdh | /**
* Finds all constraint annotations defined for the given constrainable and returns them in a list of constraint
* descriptors.
*
* @param constrainable
* The constrainable element (will be the executable for a method parameter).
* @param annotatedElement
* The annotated element. Usually the same as the c... | 3.26 |
hibernate-validator_AnnotationMetaDataProvider_getParameterMetaData_rdh | /**
* Retrieves constraint related meta data for the parameters of the given
* executable.
*
* @param javaBeanExecutable
* The executable of interest.
* @return A list with parameter meta data for the given executable.
*/
private List<ConstrainedParameter> getParameterMetaData(JavaBeanExecutable<?> javaBeanExe... | 3.26 |
hibernate-validator_AnnotationMetaDataProvider_findTypeAnnotationConstraintsForExecutableParameter_rdh | /**
* Finds type arguments constraints for parameters.
*
* @param javaBeanParameter
* the parameter
* @return a set of type arguments constraints, or an empty set if no constrained type arguments are found
*/
protected Set<MetaConstraint<?>> findTypeAnnotationConstraintsForExecutableParameter(JavaBeanExecutable... | 3.26 |
hibernate-validator_AnnotationMetaDataProvider_run_rdh | /**
* Runs the given privileged action, using a privileged block if required.
* <p>
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated ... | 3.26 |
hibernate-validator_AnnotationMetaDataProvider_findTypeUseConstraints_rdh | /**
* Finds type use annotation constraints defined on the type argument.
*/
private Set<MetaConstraint<?>> findTypeUseConstraints(Constrainable constrainable, AnnotatedType typeArgument, TypeVariable<?> typeVariable, TypeArgumentLocation location, Type type) {
List<ConstraintDescriptorImpl<?>> constraintDescript... | 3.26 |
hibernate-validator_AnnotationMetaDataProvider_findConstraints_rdh | /**
* Finds all constraint annotations defined for the given constrainable and returns them in a list of constraint
* descriptors.
*
* @param constrainable
* The constrainable element (will be the executable for a method parameter).
* @param annotations
* The annotations.
* @param kind
* The constraint l... | 3.26 |
hibernate-validator_AnnotationMetaDataProvider_findTypeAnnotationConstraints_rdh | /**
* Finds type arguments constraints for method return values.
*/
protected Set<MetaConstraint<?>> findTypeAnnotationConstraints(JavaBeanExecutable<?> javaBeanExecutable) {return findTypeArgumentsConstraints(javaBeanExecutable, new TypeArgumentReturnValueLocation(javaBeanExecutable), javaBeanExecutable.getAnnotated... | 3.26 |
hibernate-validator_AnnotationMetaDataProvider_retrieveBeanConfiguration_rdh | /**
*
* @param beanClass
* The bean class for which to retrieve the meta data
* @return Retrieves constraint related meta data from the annotations of the given type.
*/
private <T> BeanConfiguration<T>
retrieveBeanConfiguration(Class<T> beanClass) {
Set<ConstrainedElement> constrainedElements =
getFiel... | 3.26 |
hibernate-validator_NotEmptyValidatorForArraysOfDouble_isValid_rdh | /**
* Checks the array is not {@code null} and not empty.
*
* @param array
* the array to validate
* @param constraintValidatorContext
* context in which the constraint is evaluated
* @return returns {@code true} if the array is not {@code null} and the array is not empty
*/
@Override
public boolean isValid... | 3.26 |
hibernate-validator_MappingXmlParser_parse_rdh | /**
* Parses the given set of input stream representing XML constraint
* mappings.
*
* @param mappingStreams
* The streams to parse. Must support the mark/reset contract.
*/
public final void parse(Set<InputStream> mappingStreams) {
ClassLoader previousTccl
= run(GetClassLoader.fromContext());
try {
run(Set... | 3.26 |
hibernate-validator_MappingXmlParser_run_rdh | /**
* Runs the given privileged action, using a privileged block if required.
* <p>
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in... | 3.26 |
hibernate-validator_LoadClass_loadClassInValidatorNameSpace_rdh | // HV-363 - library internal classes are loaded via Class.forName first
private Class<?> loadClassInValidatorNameSpace() {
final ClassLoader v0 = HibernateValidator.class.getClassLoader();
Exception exception;
try {
return Class.forName(className, true, HibernateValidator.class.getClassLoader());
... | 3.26 |
hibernate-validator_LoadClass_action_rdh | /**
* in some cases, the TCCL has been overridden so we need to pass it explicitly.
*/
public static LoadClass action(String className, ClassLoader classLoader, ClassLoader initialThreadContextClassLoader)
{
return new LoadClass(className, classLoader,
initialThreadContextClassLoader, true);
} | 3.26 |
hibernate-validator_PastOrPresentValidatorForYearMonth_getReferenceValue_rdh | /**
* Check that the {@code java.time.YearMonth} passed is in the past.
*
* @author Guillaume Smet
*/public class PastOrPresentValidatorForYearMonth extends AbstractPastOrPresentJavaTimeValidator<YearMonth> {
@Override
protected YearMonth getReferenceValue(Clock reference) {
return YearMonth.now(ref... | 3.26 |
hibernate-validator_JavaBeanGetter_run_rdh | /**
* Runs the given privileged action, using a privileged block if required.
* <p>
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in... | 3.26 |
hibernate-validator_JavaBeanGetter_getAccessible_rdh | /**
* Returns an accessible copy of the given method.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in JDK17")
private static Method getAccessible(Method original) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(HibernateValidatorPermiss... | 3.26 |
hibernate-validator_TypeHelper_getErasedType_rdh | /**
* Gets the erased type of the specified type.
*
* @param type
* the type to perform erasure on
* @return the erased type, never a parameterized type nor a type variable
* @see <a href="http://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html#jls-4.6">4.6 Type Erasure</a>
*/
public static Type getErasedT... | 3.26 |
hibernate-validator_TypeHelper_parameterizedType_rdh | /**
* Creates a parameterized type for the specified raw type and actual type arguments.
*
* @param rawType
* the raw type
* @param actualTypeArguments
* the actual type arguments
* @return the parameterized type
* @throws MalformedParameterizedTypeException
* if the number of actual type arguments diffe... | 3.26 |
hibernate-validator_TypeHelper_genericArrayType_rdh | /**
* Creates a generic array type for the specified component type.
*
* @param componentType
* the component type
* @return the generic array type
*/
public static GenericArrayType genericArrayType(final Type componentType) {
return new GenericArrayType() {
@Override
public Type getGenericC... | 3.26 |
hibernate-validator_ClassBasedValidatorDescriptor_m0_rdh | /**
* Constraint checking is relaxed for built-in constraints as they have been carefully crafted so we are sure types
* are right.
*/public static <T extends Annotation> ClassBasedValidatorDescriptor<T> m0(Class<? extends ConstraintValidator<T, ?>> validatorClass, Class<? extends Annotation> registeredConstraintAnn... | 3.26 |
hibernate-validator_PropertyMetaData_getCascadables_rdh | /**
* Returns the cascadables of this property, if any. Often, there will be just a single element returned. Several
* elements may be returned in the following cases:
* <ul>
* <li>a property's field has been marked with {@code @Valid} but type-level constraints have been given on the
* getter</li>
* <li>one type... | 3.26 |
hibernate-validator_MethodInheritanceTree_hasParallelDefinitions_rdh | /**
* Checks if there are any parallel definitions of the method in the hierarchy.
*
* @return {@code true} if there are any parallel definitions of the method in the hierarchy, {@code false} otherwise
*/
public boolean hasParallelDefinitions() {
return topLevelMethods.size() > 1;
} | 3.26 |
hibernate-validator_MethodInheritanceTree_getOverriddenMethods_rdh | /**
* Returns a set containing all the overridden methods.
*
* @return a set containing all the overridden methods
*/
public Set<ExecutableElement> getOverriddenMethods() {
return overriddenMethods;
} | 3.26 |
hibernate-validator_MethodInheritanceTree_getTopLevelMethods_rdh | /**
* Returns a set containing all the top level overridden methods.
*
* @return a set containing all the top level overridden methods
*/public Set<ExecutableElement> getTopLevelMethods() {
return topLevelMethods;
} | 3.26 |
hibernate-validator_MethodInheritanceTree_getAllMethods_rdh | /**
* Returns a set containing all the methods of the hierarchy.
*
* @return a set containing all the methods of the hierarchy
*/
public Set<ExecutableElement> getAllMethods() {
return Collections.unmodifiableSet(methodNodeMapping.keySet());
} | 3.26 |
hibernate-validator_MethodInheritanceTree_hasOverriddenMethods_rdh | /**
* Checks if there are any overridden methods in the hierarchy.
*
* @return {@code true} if there are any overridden methods found, {@code false} otherwise
*/
public boolean hasOverriddenMethods() {
return overriddenMethods.size() > 0;
} | 3.26 |
hibernate-validator_ValueExtractorResolver_getValueExtractorCandidatesForCascadedValidation_rdh | /**
* Used to determine the value extractor candidates valid for a declared type and type variable.
* <p>
* The effective value extractor will be narrowed from these candidates using the runtime type.
* <p>
* Used to optimize the choice of the value extractor in the case of cascading valida... | 3.26 |
hibernate-validator_ValueExtractorResolver_getMaximallySpecificValueExtractors_rdh | /**
* Used to find all the maximally specific value extractors based on a declared type in the case of value unwrapping.
* <p>
* There might be several of them as there might be several type parameters.
* <p>
* Used for container element constraints.
*/
public Set<ValueExtractorDescriptor> getMaximallySpecificVal... | 3.26 |
hibernate-validator_ValueExtractorResolver_getMaximallySpecificValueExtractorForAllContainerElements_rdh | /**
* Used to determine if the passed runtime type is a container and if so return a corresponding maximally specific
* value extractor.
* <p>
* Obviously, it only works if there's only one value extractor corresponding to the runtime type as we don't
* precise any type parameter.
* <p>
* There is a special case... | 3.26 |
hibernate-validator_ValueExtractorResolver_getMaximallySpecificAndContainerElementCompliantValueExtractor_rdh | /**
* Used to find the maximally specific and container element compliant value extractor based on the declared type
* and the type parameter.
* <p>
* Used for container element constraints.
*
* @throws ConstraintDeclarationException
* if more than 2 maximally specific container-element-compliant value extract... | 3.26 |
hibernate-validator_ValueExtractorResolver_getValueExtractorCandidatesForContainerDetectionOfGlobalCascadedValidation_rdh | /**
* Used to determine the possible value extractors that can be applied to a declared type.
* <p>
* Used when building cascading metadata in {@link CascadingMetaDataBuilder} to decide if it should be promoted to
* {@link ContainerCascadingMetaData} with cascaded constrained type arguments.
* <p>
* An example co... | 3.26 |
hibernate-validator_ValueExtractorResolver_getPotentiallyRuntimeTypeCompliantAndContainerElementCompliantValueExtractors_rdh | /**
* Returns the set of potentially type-compliant and container-element-compliant value extractors or an empty set if none was found.
* <p>
* A value extractor is potentially runtime type compliant if it might be compliant for any runtime type that matches the declared type.
*/
private Set<ValueExtractorDescripto... | 3.26 |
hibernate-validator_GetDeclaredMethod_m0_rdh | /**
* Before using this method, you need to check the {@code HibernateValidatorPermission.ACCESS_PRIVATE_MEMBERS}
* permission against the security manager.
*/
public static GetDeclaredMethod m0(Class<?> clazz, String methodName, Class<?>... parameterTypes) {
return new GetDeclaredMethod(clazz, methodName, tru... | 3.26 |
hibernate-validator_ResourceBundleMessageInterpolator_buildExpressionFactory_rdh | /**
* The jakarta.el FactoryFinder uses the TCCL to load the {@link ExpressionFactory} implementation so we need to be
* extra careful when initializing it.
*
* @return the {@link ExpressionFactory}
*/
private static ExpressionFactory buildExpressionFactory() {
// First, we try to load the instance from the or... | 3.26 |
hibernate-validator_ResourceBundleMessageInterpolator_canLoadExpressionFactory_rdh | /**
* Instead of testing the different class loaders via {@link ELManager}, we directly access the
* {@link ExpressionFactory}. This avoids issues with loading the {@code ELUtil} class (used by {@code ELManager})
* after a failed attempt.
*/
private static boolean canLoadExpressionFactory() {
try {
Expr... | 3.26 |
hibernate-validator_ResourceBundleMessageInterpolator_run_rdh | /**
* Runs the given privileged action, using a privileged block if required.
* <p>
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in... | 3.26 |
hibernate-validator_NotEmptyValidatorForArraysOfBoolean_isValid_rdh | /**
* Checks the array is not {@code null} and not empty.
*
* @param array
* the array to validate
* @param constraintValidatorContext
* context in which the constraint is evaluated
* @return returns {@code true} if the array is not {@code null} and the array is not empty
*/
@Override
public boolean isValid... | 3.26 |
hibernate-validator_BeanMetaDataManagerImpl_m0_rdh | /**
* Creates a {@link org.hibernate.validator.internal.metadata.aggregated.BeanMetaData} containing the meta data from all meta
* data providers for the given type and its hierarchy.
*
* @param <T>
* The type of interest.
* @param clazz
* The type's class.
* @return A bean meta data object for the given ty... | 3.26 |
hibernate-validator_BeanMetaDataManagerImpl_getAnnotationProcessingOptionsFromNonDefaultProviders_rdh | /**
*
* @return returns the annotation ignores from the non annotation based meta data providers
*/
private AnnotationProcessingOptions getAnnotationProcessingOptionsFromNonDefaultProviders(List<MetaDataProvider>
optionalMetaDataProviders) {
AnnotationProcessingOptions options = new AnnotationProcessingOptions... | 3.26 |
hibernate-validator_BeanMetaDataManagerImpl_getBeanMetaData_rdh | // TODO Some of these casts from BeanMetadata<? super T> to BeanMetadata<T> may not be safe.
// Maybe we should return a wrapper around the BeanMetadata if the normalized class is different from beanClass?
@Override
@SuppressWarnings("unchecked")
public <T> BeanMetaData<T> getBeanMetaData(Class<T> b... | 3.26 |
hibernate-validator_ValidatorFactoryBean_isNullable_rdh | // TODO to be removed once using CDI API 4.x
public boolean isNullable() {
return false;
} | 3.26 |
hibernate-validator_ValidatorFactoryBean_run_rdh | /**
* Runs the given privileged action, using a privileged block if required.
* <p>
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in... | 3.26 |
hibernate-validator_AbstractConfigurationImpl_run_rdh | /**
* Runs the given privileged action, using a privileged block if required.
* <p>
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in... | 3.26 |
hibernate-validator_AbstractConfigurationImpl_getDefaultMessageInterpolatorConfiguredWithClassLoader_rdh | /**
* Returns the default message interpolator, configured with the given user class loader, if present.
*/
private MessageInterpolator getDefaultMessageInterpolatorConfiguredWithClassLoader() {
if (f0 != null) {
PlatformResourceBundleLocator userResourceBundleLocator = new PlatformResourceBundleLocator(ResourceBundl... | 3.26 |
hibernate-validator_AbstractConfigurationImpl_parseValidationXml_rdh | /**
* Tries to check whether a validation.xml file exists and parses it
*/
private void
parseValidationXml() {if (ignoreXmlConfiguration) {
LOG.ignoringXmlConfiguration();
if (validationBootstrapParameters.getTraversableResolver() == null) {
validationBootstrapParameters.setTraversableResolver(getDefaultTraversableRe... | 3.26 |
hibernate-validator_NotEmptyValidatorForArraysOfShort_isValid_rdh | /**
* Checks the array is not {@code null} and not empty.
*
* @param array
* the array to validate
* @param constraintValidatorContext
* context in which the constraint is evaluated
* @return returns {@code true} if the array is not {@code null} and the array is not empty
*/
@Override
public boolean isValid... | 3.26 |
hibernate-validator_ValidationOrderGenerator_insertInheritedGroups_rdh | /**
* Recursively add inherited groups into the group chain.
*
* @param clazz
* the group interface
* @param chain
* the group chain we are currently building
*/
private void insertInheritedGroups(Class<?> clazz, DefaultValidationOrder chain) {
for (Class<?> inheritedGroup : clazz.getInterfaces()) {
... | 3.26 |
hibernate-validator_ValidationOrderGenerator_getValidationOrder_rdh | /**
* Generates a order of groups and sequences for the specified validation groups.
*
* @param groups
* the groups specified at the validation call
* @return an instance of {@code ValidationOrder} defining the order in which validation has to occur
*/
public ValidationOrder
getValidationOrder(Collection<Class<... | 3.26 |
hibernate-validator_AnnotationApiHelper_isClass_rdh | /**
* Test if the given {@link TypeMirror} represents a class or not.
*/
public boolean isClass(TypeMirror typeMirror)
{
return TypeKind.DECLARED.equals(typeMirror.getKind()) && ((DeclaredType) (typeMirror)).asElement().getKind().isClass();
} | 3.26 |
hibernate-validator_AnnotationApiHelper_getMirrorForType_rdh | /**
* Returns a TypeMirror for the given class.
*
* @param clazz
* The class of interest.
* @return A TypeMirror for the given class.
*/
public TypeMirror getMirrorForType(Class<?>
clazz) {
if (clazz.isArray()) {
return typeUtils.getArrayType(getMirrorForNonArrayType(clazz.getComponentType()));
... | 3.26 |
hibernate-validator_AnnotationApiHelper_determineUnwrapMode_rdh | /**
* Checks the annotation's payload for unwrapping option ({@code jakarta.validation.valueextraction.Unwrapping.Unwrap},
* {@code jakarta.validation.valueextraction.Unwrapping.Skip}) of constraint.
*
* @param annotationMirror
* constraint annotation mirror under check
* @return unwrapping option, if one is pr... | 3.26 |
hibernate-validator_AnnotationApiHelper_isInterface_rdh | /**
* Test if the given {@link TypeMirror} represents an interface or not.
*/
public boolean isInterface(TypeMirror typeMirror) {
return TypeKind.DECLARED.equals(typeMirror.getKind()) && ((DeclaredType) (typeMirror)).asElement().getKind().isInterface();
} | 3.26 |
hibernate-validator_Mod11CheckValidator_isCheckDigitValid_rdh | /**
* Validate check digit using Mod11 checksum
*
* @param digits
* The digits over which to calculate the checksum
* @param checkDigit
* the check digit
* @return {@code true} if the mod11 result matches the check digit, {@code false} otherwise
*/@Override
public boolean isCheckDigitValid(List<Integer> dig... | 3.26 |
hibernate-validator_XmlParserHelper_run_rdh | /**
* Runs the given privileged action, using a privileged block if required.
* <p>
* <b>NOTE:</b> This must never be changed into a publicly available method to avoid execution of arbitrary
* privileged actions within HV's protection domain.
*/
@IgnoreForbiddenApisErrors(reason = "SecurityManager is deprecated in... | 3.26 |
hibernate-validator_PESELValidator_year_rdh | /**
* 1800–1899 - 80
* 1900–1999 - 00
* 2000–2099 - 20
* 2100–2199 - 40
* 2200–2299 - 60
*/
private int year(int year, int centuryCode) {
switch (centuryCode) {
case
4 :
return 1800 + year;
case 0 : return 1900 + year;
... | 3.26 |
hibernate-validator_TokenIterator_nextInterpolationTerm_rdh | /**
*
* @return Returns the next interpolation term
*/
public String nextInterpolationTerm() {
if (!currentTokenAvailable) {
throw new IllegalStateException("Trying to call #nextInterpolationTerm without calling #hasMoreInterpolationTerms");
}
currentTokenAvailable = false;
return currentTo... | 3.26 |
hibernate-validator_TokenIterator_hasMoreInterpolationTerms_rdh | /**
* Called to advance the next interpolation term of the message descriptor. This message can be called multiple times.
* Once it returns {@code false} all interpolation terms have been processed and {@link #getInterpolatedMessage()}
* can be called.
*
* @return Returns {@code true} in case there are more messag... | 3.26 |
hibernate-validator_TokenIterator_replaceCurrentInterpolationTerm_rdh | /**
* Replaces the current interpolation term with the given string.
*
* @param replacement
* The string to replace the current term with.
*/
public void replaceCurrentInterpolationTerm(String replacement) {
Token v0 = new Token(replacement);
v0.terminate();
tokenList.set(currentPosition - 1, v0);
} | 3.26 |
hibernate-validator_ConstraintViolationAssert_pathsAreEqual_rdh | /**
* Checks that two property paths are equal.
*
* @param p1
* The first property path.
* @param p2
* The second property path.
* @return {@code true} if the given paths are equal, {@code false} otherwise.
*/
public static boolean pathsAreEqual(Path p1, Path p2) {
Iterator<Path.Node> p1Iterator = p1.it... | 3.26 |
hibernate-validator_ConstraintViolationAssert_m0_rdh | /**
* Asserts that the given violation list has no violations (is empty).
*
* @param violations
* The violation list to verify.
*/
public static void m0(Set<? extends ConstraintViolation<?>> violations,
String message) {
Assertions.assertThat(violations).describedAs(message).isEmpty();
} | 3.26 |
hibernate-validator_ConstraintViolationAssert_assertCorrectConstraintTypes_rdh | /**
* <p>
* Asserts that the two given collections contain the same constraint types.
* </p>
* <p>
* Multiset semantics is used for the comparison, i.e. the same constraint
* type can be contained several times in the compared collections, but the
* order doesn't matter. The comparison is done using the class na... | 3.26 |
hibernate-validator_ConstraintViolationAssert_assertNoViolations_rdh | /**
* Asserts that the given violation list has no violations (is empty).
*
* @param violations
* The violation list to verify.
*/
public static void assertNoViolations(Set<? extends ConstraintViolation<?>> violations) {
Assertions.assertThat(violations).isEmpty();
} | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.