Class ValidationCaller<T>

java.lang.Object
io.dropwizard.validation.selfvalidating.ValidationCaller<T>
Type Parameters:
T - the object type that contains the validation method

public abstract class ValidationCaller<T> extends Object
This class represents a wrapper for calling validation methods annotated with @SelfValidation. It is used as a base class for the code generation.
  • Field Details

    • validationObject

      protected @Nullable T validationObject
      The object to call validation methods on.
  • Constructor Details

    • ValidationCaller

      public ValidationCaller()
  • Method Details

    • setValidationObject

      public void setValidationObject(T obj)
      Sets the validation object variable.
      Parameters:
      obj - the new validation object
    • getValidationObject

      public @Nullable T getValidationObject()
      Gets the validation object.
      Returns:
      the validation object
    • call

      public abstract void call(ViolationCollector vc)
      This method is intended to call a validation methods on the validation object.
      Parameters:
      vc - the ViolationCollector to collect violations