}
phaseBinding.convertedBy(converter);
if (parameter instanceof ParameterConfiguration)
((ParameterConfiguration<?>) parameter).convertedBy(new DeferredConverter(converter));
else
throw new RewriteException("Cannot specify @" + Deferred.class.getSimpleName() + " to ["
+ field + "] of class [" + field.getDeclaringClass() + "] because the parameter ["
+ parameter.getName() + "] is not writable.");
}
Validator<?> validator = parameter.getValidator();
if (validator != null)
{
if (validator instanceof DeferredValidator)
{
validator = ((DeferredValidator) validator).getDeferred();
}
phaseBinding.validatedBy(validator);
if (parameter instanceof ParameterConfiguration)
((ParameterConfiguration<?>) parameter).validatedBy(new DeferredValidator(validator));
else
throw new RewriteException("Cannot specify @" + Deferred.class.getSimpleName() + " to ["
+ field + "] of class [" + field.getDeclaringClass() + "] because the parameter ["
+ parameter.getName() + "] is not writable.");
}
// configure the target phase