public ReflectingInstantiator()

in chill-java/src/main/java/com/twitter/chill/config/ReflectingInstantiator.java [42:65]


  public ReflectingInstantiator(Config conf) throws ConfigurationException {
    regRequired = conf.getBoolean(REGISTRATION_REQUIRED, REGISTRATION_REQUIRED_DEFAULT);
    skipMissing = conf.getBoolean(SKIP_MISSING, SKIP_MISSING_DEFAULT);

    try {
      kryoClass = (Class<? extends Kryo>)Class.forName(
          conf.getOrElse(KRYO_CLASS, KRYO_CLASS_DEFAULT),
          true,
          Thread.currentThread().getContextClassLoader());
      instStratClass =
        (Class<? extends InstantiatorStrategy>)Class.forName(
            conf.getOrElse(INSTANTIATOR_STRATEGY_CLASS, INSTANTIATOR_STRATEGY_CLASS_DEFAULT),
          true,
          Thread.currentThread().getContextClassLoader());

      registrations = (List<IKryoRegistrar>)buildRegistrars(conf.get(REGISTRATIONS), false);
      defaultRegistrations = (List<ReflectingDefaultRegistrar>)buildRegistrars(conf.get(DEFAULT_REGISTRATIONS), true);
      // Make sure we can make a newKryo, this throws a runtime exception if not.
      newKryoWithEx();
    }
    catch(ClassNotFoundException x) { throw new ConfigurationException(x); }
    catch(InstantiationException x) { throw new ConfigurationException(x); }
    catch(IllegalAccessException x) { throw new ConfigurationException(x); }
  }