クラス ValidationStrategyContext

java.lang.Object
org.thinkit.framework.envali.strategy.ValidationStrategyContext

public final class ValidationStrategyContext
extends Object
Context class to execute the validation strategy.

create an instance of the class using the of(ValidationStrategy) and validate it according to the annotations using the validate() method.

導入されたバージョン:
1.0.0
  • メソッドの詳細

    • of

      public static ValidationStrategyContext of​(@NonNull @NonNull org.thinkit.framework.envali.strategy.ValidationStrategy<? extends Annotation> validationStrategy)
      Returns the new instance of ValidationStrategyContext class.
      パラメータ:
      validationStrategy - The validation strategy for field
      戻り値:
      The new instance of ValidationStrategyContext class
      例外:
      NullPointerException - If null is passed as an argument
    • validate

      public BusinessError validate()
      Execute a validation strategy.
      戻り値:
      The business error detected in the validate process
      例外:
      org.thinkit.common.base.precondition.exception.PreconditionFailedException - If the validation process detects an invalid value
    • toString

      public String toString()
      オーバーライド:
      toString クラス内 Object
    • equals

      public boolean equals​(Object o)
      オーバーライド:
      equals クラス内 Object
    • hashCode

      public int hashCode()
      オーバーライド:
      hashCode クラス内 Object