public class SimpleTypeValidator extends Object implements TypeValidator
Constructor and Description |
---|
SimpleTypeValidator()
Creates a default SimpleTypeValidator.
|
SimpleTypeValidator(TypeValidator validator)
Creates a SimpleTypeValidator using the given TypeValidator for
delegating validation.
|
Modifier and Type | Method and Description |
---|---|
void |
setMaxOccurs(int maxOccurs)
Sets the maximum number of times that the described field may occur.
|
void |
setMinOccurs(int minOccurs)
Sets the minimum number of times that the described field may occur.
|
void |
setValidator(TypeValidator validator)
Sets the TypeValidator to delegate validation to.
|
void |
validate(Object object,
ValidationContext context)
Validates the given Object.
|
public SimpleTypeValidator()
public SimpleTypeValidator(TypeValidator validator)
validator
- The TypeValidator to usepublic void setMaxOccurs(int maxOccurs)
maxOccurs
- the maximum number of times that the described field may
occur.public void setMinOccurs(int minOccurs)
minOccurs
- the minimum number of times that the described field may
occur.public void setValidator(TypeValidator validator)
validator
- the TypeValidator to delegate validation to.public void validate(Object object, ValidationContext context) throws ValidationException
validate
in interface TypeValidator
object
- the Object to validate.context
- the ValidationContext.ValidationException
- if validation fails.Copyright © 2024. All rights reserved.