All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kz.greetgo.conf.hot.CannotDetectDateFormat Maven / Gradle / Ivy

There is a newer version: 2.0.5
Show newest version
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);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy