org.hibernate.validator.internal.metadata.aggregated.rule

## Class MethodConfigurationRule

- java.lang.Object
- - org.hibernate.validator.internal.metadata.aggregated.rule.MethodConfigurationRule

- Direct Known Subclasses:
    OverridingMethodMustNotAlterParameterConstraints, ParallelMethodsMustNotDefineGroupConversionForCascadedReturnValue, ParallelMethodsMustNotDefineParameterConstraints, ReturnValueMayOnlyBeMarkedOnceAsCascadedPerHierarchyLine, VoidMethodsMustNotBeReturnValueConstrained

      public abstract class MethodConfigurationRule
      extends Object

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static Log` | `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MethodConfigurationRule()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `apply(ConstrainedExecutable method, ConstrainedExecutable otherMethod)` Applies this rule.
    `protected boolean` | `isDefinedOnParallelType(ConstrainedExecutable executable, ConstrainedExecutable otherExecutable)` Whether `otherExecutable` is defined on a parallel of the declaring type of `executable` or not.
    `protected boolean` | `isDefinedOnSubType(ConstrainedExecutable executable, ConstrainedExecutable otherExecutable)` Whether `otherExecutable` is defined on a subtype of the declaring type of `executable` or not.
    `protected boolean` | `isStrictSubType(Class<?> clazz, Class<?> otherClazz)` Whether `otherClazz` is a strict subtype of `clazz` or not.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### log

          protected static final Log log

  - ### Constructor Detail

    - #### MethodConfigurationRule

          public MethodConfigurationRule()

  - ### Method Detail

    - #### apply

          public abstract void apply(ConstrainedExecutable method,
                   ConstrainedExecutable otherMethod)

      Applies this rule. Invoked for each pair of methods collected by a given executable meta data `ExecutableMetaData.Builder`.
      Parameters:
        `method` - The first method to check.
        `otherMethod` - The other method to check.
      Throws:
        `ConstraintDeclarationException` - If this rule is violated by the two given methods.

    - #### isStrictSubType

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

      Whether `otherClazz` is a strict subtype of `clazz` or not.

    - #### isDefinedOnSubType

          protected boolean isDefinedOnSubType(ConstrainedExecutable executable,
                                   ConstrainedExecutable otherExecutable)

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

    - #### isDefinedOnParallelType

          protected boolean isDefinedOnParallelType(ConstrainedExecutable executable,
                                        ConstrainedExecutable otherExecutable)

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

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved