kz.greetgo.conf.hot.CannotDetectDateFormat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of greetgo.conf Show documentation
Show all versions of greetgo.conf Show documentation
Configuration library using in greetgo!
package kz.greetgo.conf.hot;
import java.lang.reflect.Method;
import java.util.List;
public class CannotDetectDateFormat extends ConvertingError {
public final String paringStr;
public final List patternFormatList;
public CannotDetectDateFormat(String paringStr, List patternFormatList) {
super(message(paringStr, patternFormatList));
this.paringStr = paringStr;
this.patternFormatList = patternFormatList;
}
private CannotDetectDateFormat(String paringStr, List patternFormatList,
Class> configInterface, Method method,
CannotDetectDateFormat cause) {
super(
message(paringStr, patternFormatList) + " ; at " + place(configInterface, method),
cause,
configInterface,
method
);
this.paringStr = paringStr;
this.patternFormatList = patternFormatList;
}
private static String message(String paringStr, List patternFormatList) {
return "paringStr = " + paringStr + ", must be one from " + String.join(", ", patternFormatList);
}
@Override
public HasConfigInterfaceAndMethod setSourcePoint(Class> configInterface, Method method) {
return new CannotDetectDateFormat(paringStr, patternFormatList, configInterface, method, this);
}
}