Class AbstractClassCheck

java.lang.Object
org.hibernate.validator.ap.internal.classchecks.AbstractClassCheck
All Implemented Interfaces:
ClassCheck
Direct Known Subclasses:
AbstractMethodOverrideCheck

public abstract class AbstractClassCheck extends Object implements ClassCheck

Abstract base class for ClassCheck implementations. Concrete checks should only override those check methods applicable for their supported element types.

All check methods not overridden will return an empty set.

Author:
Marko Bekhta
  • Constructor Details

    • AbstractClassCheck

      public AbstractClassCheck()
  • Method Details

    • checkMethod

      public Set<ConstraintCheckIssue> checkMethod(ExecutableElement element)
      Description copied from interface: ClassCheck
      Checks whether the given method is written correctly.
      Specified by:
      checkMethod in interface ClassCheck
      Parameters:
      element - the method under investigation
      Returns:
      a collection with errors that describe why the given method is not correctly implemented. In case no errors occur (the method is written correctly), an empty set must be returned
    • execute

      public final Collection<ConstraintCheckIssue> execute(Element element)
      Description copied from interface: ClassCheck
      Run all checks on the element.
      Specified by:
      execute in interface ClassCheck
      Parameters:
      element - the element under investigation
      Returns:
      a collection with errors that describe why the given element does not pass the checks. In case no errors occur (all checks completed successfully), an empty set must be returned