public class FileValidator extends Validator
| Modifier and Type | Field and Description |
|---|---|
static String |
validConstraints
The valid constraint set.
|
| Constructor and Description |
|---|
FileValidator(String name,
String constraints)
Constructs a new FileValidator object.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getConstraints() |
String |
setConstraints(String constraints)
Sets the current constraint set to the given set if it is a valid
constriant set.
|
void |
validate(Object str)
Validates the given File.
|
public static final String validConstraints
public FileValidator(String name, String constraints)
name - The name of the entity that will be validated. This name is
used in the error message.constraints - The constaint set that will be checked for any given
file during validation.public String getConstraints()
public String setConstraints(String constraints)
public void validate(Object str) throws InvalidConfigException
validate in class Validatorstr - Must be the absolute path of the File that will be validated.InvalidConfigExceptionCopyright © 2018 Eclipse Foundation. All rights reserved.