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 Summary
Fields Modifier and Type Field Description protected @Nullable TvalidationObjectThe object to call validation methods on.
-
Constructor Summary
Constructors Constructor Description ValidationCaller()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidcall(ViolationCollector vc)This method is intended to call a validation methods on the validation object.@Nullable TgetValidationObject()Gets the validation object.voidsetValidationObject(T obj)Sets the validation object variable.
-
-
-
Field Detail
-
validationObject
protected @Nullable T validationObject
The object to call validation methods on.
-
-
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- theViolationCollectorto collect violations
-
-