Top Description Fields Constructors Methods
org.hibernate.validator.internal.cfg.context

pack-priv Class ConfiguredConstraint<A extends java.lang.annotation.Annotation>

extends Object
Class Inheritance
Imports
java.lang.annotation.Annotation, java.lang.invoke.MethodHandle, .MethodHandles, java.lang.reflect.Type, .TypeVariable, java.security.AccessController, .PrivilegedAction, jakarta.validation.ValidationException, org.hibernate.validator.cfg.AnnotationDef, .ConstraintDef, org.hibernate.validator.internal.IgnoreForbiddenApisErrors, org.hibernate.validator.internal.metadata.location.ConstraintLocation, org.hibernate.validator.internal.properties.Callable, org.hibernate.validator.internal.properties.javabean.JavaBeanField, .JavaBeanGetter, org.hibernate.validator.internal.util.annotation.AnnotationDescriptor, .ConstraintAnnotationDescriptor, org.hibernate.validator.internal.util.logging.Log, .LoggerFactory, org.hibernate.validator.internal.util.privilegedactions.GetDeclaredMethodHandle

Represents a programmatically configured constraint and meta-data related to its location (bean type etc.).
Authors
Gunnar Morling, Guillaume Smet

Field Summary

Modifier and TypeField and Description
private final ConstraintDef<?, A>
private static final MethodHandle
private final ConstraintLocation
private static final Log

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public ConstraintAnnotationDescriptor<A>
public static <A extends Annotation> ConfiguredConstraint<A>
forCrossParameter(ConstraintDef<?, A> constraint, Callable callable)

public static <A extends Annotation> ConfiguredConstraint<A>
forExecutable(ConstraintDef<?, A> constraint, Callable callable)

pack-priv static <A extends Annotation> ConfiguredConstraint<A>
forField(ConstraintDef<?, A> constraint, JavaBeanField javaBeanField)

pack-priv static <A extends Annotation> ConfiguredConstraint<A>
forGetter(ConstraintDef<?, A> constraint, JavaBeanGetter javaBeanGetter)

public static <A extends Annotation> ConfiguredConstraint<A>
forParameter(ConstraintDef<?, A> constraint, Callable callable, int parameterIndex)

pack-priv static <A extends Annotation> ConfiguredConstraint<A>
forType(ConstraintDef<?, A> constraint, Class<?> beanType)

public static <A extends Annotation> ConfiguredConstraint<A>
forTypeArgument(ConstraintDef<?, A> constraint, ConstraintLocation delegate, TypeVariable<?> typeArgument, Type typeOfAnnotatedElement)

public ConstraintDef<?, A>
public ConstraintLocation
private static <V> V
run(PrivilegedAction<V> action)

Runs the given privileged action, using a privileged block if required

Note

This must never be changed into a publicly available method to avoid execution of arbitrary privileged actions within HV's protection domain.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

constraintback to summary
private final ConstraintDef<?, A> constraint
CREATE_ANNOTATION_DESCRIPTOR_METHOD_HANDLEback to summary
private static final MethodHandle CREATE_ANNOTATION_DESCRIPTOR_METHOD_HANDLE
locationback to summary
private final ConstraintLocation location
LOGback to summary
private static final Log LOG

Constructor Detail

ConfiguredConstraintback to summary
private ConfiguredConstraint(ConstraintDef<?, A> constraint, ConstraintLocation location)

Method Detail

createAnnotationDescriptorback to summary
public ConstraintAnnotationDescriptor<A> createAnnotationDescriptor()
forCrossParameterback to summary
public static <A extends Annotation> ConfiguredConstraint<A> forCrossParameter(ConstraintDef<?, A> constraint, Callable callable)
forExecutableback to summary
public static <A extends Annotation> ConfiguredConstraint<A> forExecutable(ConstraintDef<?, A> constraint, Callable callable)
forFieldback to summary
pack-priv static <A extends Annotation> ConfiguredConstraint<A> forField(ConstraintDef<?, A> constraint, JavaBeanField javaBeanField)
forGetterback to summary
pack-priv static <A extends Annotation> ConfiguredConstraint<A> forGetter(ConstraintDef<?, A> constraint, JavaBeanGetter javaBeanGetter)
forParameterback to summary
public static <A extends Annotation> ConfiguredConstraint<A> forParameter(ConstraintDef<?, A> constraint, Callable callable, int parameterIndex)
forTypeback to summary
pack-priv static <A extends Annotation> ConfiguredConstraint<A> forType(ConstraintDef<?, A> constraint, Class<?> beanType)
forTypeArgumentback to summary
public static <A extends Annotation> ConfiguredConstraint<A> forTypeArgument(ConstraintDef<?, A> constraint, ConstraintLocation delegate, TypeVariable<?> typeArgument, Type typeOfAnnotatedElement)
getConstraintback to summary
public ConstraintDef<?, A> getConstraint()
getLocationback to summary
public ConstraintLocation getLocation()
runback to summary
private static <V> V run(PrivilegedAction<V> action)

Runs the given privileged action, using a privileged block if required

Note

This must never be changed into a publicly available method to avoid execution of arbitrary privileged actions within HV's protection domain.

Annotations
@IgnoreForbiddenApisErrors
reason:SecurityManager is deprecated in JDK17
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override