/** * Validate a string for conformance to the target type, without actually performing * the conversion * * @param input the string to be validated * @return null if validation is successful, or a ValidationFailure indicating the reasons for failure * if unsuccessful */ @Override public ValidationFailure validate(CharSequence input) { try { input = phaseTwo.getTargetType().preprocess(input); } catch (ValidationException err) { return err.getValidationFailure(); } ConversionResult temp = phaseOne.convertString(input); if (temp instanceof ValidationFailure) { return (ValidationFailure) temp; } return phaseTwo.validate((AtomicValue) temp, input); } }
/** * Validate a string for conformance to the target type, without actually performing * the conversion * * @param input the string to be validated * @return null if validation is successful, or a ValidationFailure indicating the reasons for failure * if unsuccessful */ @Override public ValidationFailure validate(CharSequence input) { try { input = phaseTwo.getTargetType().preprocess(input); } catch (ValidationException err) { return err.getValidationFailure(); } ConversionResult temp = phaseOne.convertString(input); if (temp instanceof ValidationFailure) { return (ValidationFailure) temp; } return phaseTwo.validate((AtomicValue) temp, input); } }
public ConversionResult convert(StringValue input) { CharSequence in = input.getStringValueCS(); try { in = phaseTwo.getTargetType().preprocess(in); } catch (ValidationException err) { return err.getValidationFailure(); } ConversionResult temp = phaseOne.convertString(in); if (temp instanceof ValidationFailure) { return temp; } return phaseTwo.convert((AtomicValue) temp, in); }
public ConversionResult convert(StringValue input) { CharSequence in = input.getStringValueCS(); try { in = phaseTwo.getTargetType().preprocess(in); } catch (ValidationException err) { return err.getValidationFailure(); } ConversionResult temp = phaseOne.convertString(in); if (temp instanceof ValidationFailure) { return temp; } return phaseTwo.convert((AtomicValue) temp, in); }
public ConversionResult convertString( CharSequence input) { try { input = phaseTwo.getTargetType().preprocess(input); } catch (ValidationException err) { return err.getValidationFailure(); } ConversionResult temp = phaseOne.convertString(input); if (temp instanceof ValidationFailure) { return temp; } return phaseTwo.convert((AtomicValue) temp, input); }
public ConversionResult convertString( CharSequence input) { try { input = phaseTwo.getTargetType().preprocess(input); } catch (ValidationException err) { return err.getValidationFailure(); } ConversionResult temp = phaseOne.convertString(input); if (temp instanceof ValidationFailure) { return temp; } return phaseTwo.convert((AtomicValue) temp, input); }