class DefaultContractsGenerator implements ContractsGenerator {

  @SuppressWarnings("unchecked")
  @Override
  public void configure(Map<String, Object> config) {
    this.config = config;

    if (config == null) {
      return;
    }

    Object classpathUrlsObj = config.get("classpathUrls");
    if (classpathUrlsObj instanceof List) {
      classpathUrls = (List<String>) classpathUrlsObj;
    }

    Object outputDirObj = config.get("outputDir");
    if (outputDirObj instanceof String) {
      outputDir = (String) outputDirObj;
    }

    Object contractFileTypeObj = config.get("contractFileType");
    if (contractFileTypeObj instanceof String) {
      contractfileType = ContractFileType.getValue((String) contractFileTypeObj);
    }
  }

}