Class 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 Detail

      • validationObject

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

      • ValidationCaller

        public ValidationCaller()
    • Method Detail

      • 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