code: public <T> T access(Class<T> clazz)
      {
          if ( configuration.getClass().equals(clazz) )
          {
              return clazz.cast(configuration);
          }
  
          try
          {
              return clazz.cast(fieldCache.get(clazz).get(configuration));
          }
          catch ( Exception e )
          {
              log.error("Could not access field for " + clazz, e);
              throw new RuntimeException(e);
          }
      }
docs: Access a custom configuration of the given type. The fields of the configuration object
  are searched for one that is of the given type.
  
  @param clazz type to look for
  @return the configuration