code: @SuppressWarnings("unchecked")
    private SessionStrategy setSessionStrategy(EmailConfiguration config,
        Dictionary<String, Object> props, EmailSetup newSetup)
        throws ClassNotFoundException, InstantiationException,
        IllegalAccessException, EmailException, IllegalAccessException {
      SessionStrategy strategy;
      Class<?> ssc = Class.forName(config.getSessionStrategy());
      
      if(SessionStrategy.class.isAssignableFrom(ssc)) {
        strategy = ((Class<SessionStrategy>)ssc).newInstance();
        strategy.configure(props);
        newSetup.sessionStrategy = strategy;
      } else {
        throw new IllegalArgumentException(config.getSessionStrategy() + " is not an instance of " + SessionStrategy.class.getName());
      }
      return strategy;
    }
docs: Instantiates and sets up a new {@link SessionStrategy} instance and assigns a reference to it in the new setup object passed in.
  
  @param config The configuration to pull the class name for the class to instantiate.
  @param props The properties to configure the new {@link SessionStrategy} with.
  @param newSetup The {@link EmailSetup} reference to assign the new instance to.
  @return The new instance of the {@link SessionStrategy} class requested.
  @throws ClassNotFoundException
  @throws InstantiationException
  @throws IllegalAccessException
  @throws EmailException
  @throws IllegalAccessException