Top Description Fields Constructors Methods
org.hibernate.validator.internal.metadata.aggregated.rule

public abstract Class MethodConfigurationRule

extends Object
Class Inheritance
Known Direct Subclasses
org.hibernate.validator.internal.metadata.aggregated.rule.OverridingMethodMustNotAlterParameterConstraints, org.hibernate.validator.internal.metadata.aggregated.rule.ParallelMethodsMustNotDefineGroupConversionForCascadedReturnValue, org.hibernate.validator.internal.metadata.aggregated.rule.ParallelMethodsMustNotDefineParameterConstraints, org.hibernate.validator.internal.metadata.aggregated.rule.ReturnValueMayOnlyBeMarkedOnceAsCascadedPerHierarchyLine, org.hibernate.validator.internal.metadata.aggregated.rule.VoidMethodsMustNotBeReturnValueConstrained
Imports
java.lang.invoke.MethodHandles, org.hibernate.validator.internal.metadata.raw.ConstrainedExecutable, org.hibernate.validator.internal.util.logging.Log, .LoggerFactory

A rule applying to the overriding methods of an inheritance hierarchy.
Author
Gunnar Morling

Field Summary

Modifier and TypeField and Description
protected static final Log

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract void
apply(ConstrainedExecutable
The first method to check.
method
,
ConstrainedExecutable
The other method to check.
otherMethod
)

Applies this rule.

protected boolean

Returns:

true if otherExecutable is defined on a parallel of the declaring type of otherExecutable, false otherwise
isDefinedOnParallelType
(ConstrainedExecutable
the executable to check against
executable
,
ConstrainedExecutable
the executable to check
otherExecutable
)

Whether otherExecutable is defined on a parallel of the declaring type of executable or not.

protected boolean

Returns:

true if otherExecutable is defined on a subtype of the declaring type of otherExecutable, false otherwise
isDefinedOnSubType
(ConstrainedExecutable
the executable to check against
executable
,
ConstrainedExecutable
the executable to check
otherExecutable
)

Whether otherExecutable is defined on a subtype of the declaring type of executable or not.

protected boolean

Returns:

true if otherClazz is a strict subtype of clazz, false otherwise
isStrictSubType
(Class<?>
the super type to check against
clazz
,
Class<?>
the subtype to check
otherClazz
)

Whether otherClazz is a strict subtype of clazz or not.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
protected static final Log LOG

Constructor Detail

MethodConfigurationRuleback to summary
public MethodConfigurationRule()

Method Detail

applyback to summary
public abstract void apply(ConstrainedExecutable method, ConstrainedExecutable otherMethod)

Applies this rule. Invoked for each pair of methods collected by a given executable meta data org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData.Builder.

Parameters
method:ConstrainedExecutable

The first method to check.

otherMethod:ConstrainedExecutable

The other method to check.

Exceptions
ConstraintDeclarationException:
If this rule is violated by the two given methods.
isDefinedOnParallelTypeback to summary
protected boolean isDefinedOnParallelType(ConstrainedExecutable executable, ConstrainedExecutable otherExecutable)

Whether otherExecutable is defined on a parallel of the declaring type of executable or not.

Parameters
executable:ConstrainedExecutable

the executable to check against

otherExecutable:ConstrainedExecutable

the executable to check

Returns:boolean

true if otherExecutable is defined on a parallel of the declaring type of otherExecutable, false otherwise

isDefinedOnSubTypeback to summary
protected boolean isDefinedOnSubType(ConstrainedExecutable executable, ConstrainedExecutable otherExecutable)

Whether otherExecutable is defined on a subtype of the declaring type of executable or not.

Parameters
executable:ConstrainedExecutable

the executable to check against

otherExecutable:ConstrainedExecutable

the executable to check

Returns:boolean

true if otherExecutable is defined on a subtype of the declaring type of otherExecutable, false otherwise

isStrictSubTypeback to summary
protected boolean isStrictSubType(Class<?> clazz, Class<?> otherClazz)

Whether otherClazz is a strict subtype of clazz or not.

Parameters
clazz:Class<?>

the super type to check against

otherClazz:Class<?>

the subtype to check

Returns:boolean

true if otherClazz is a strict subtype of clazz, false otherwise