View Javadoc

1   package net.sf.twip.internal;
2   
3   import net.sf.twip.util.Parameter;
4   
5   public class TwipConfigurationErrorInvalidParameterType extends TwipConfigurationError {
6   	private static final long serialVersionUID = -7530965110214226835L;
7   
8   	private final Parameter parameter;
9   	private final Object parameterValue;
10  
11  	public TwipConfigurationErrorInvalidParameterType(Parameter parameter, Object parameterValue) {
12  		super((String) null);
13  		this.parameter = parameter;
14  		this.parameterValue = parameterValue;
15  	}
16  
17  	@Override
18  	public String getMessage() {
19  		return "parameter #" + parameter.getIndex() + " is of type "
20  				+ parameter.getType().getSimpleName() + ", so you can't assign it a "
21  				+ parameterValue.getClass().getSimpleName();
22  	}
23  }