code: public Optional<? extends SpecialSection> maybeLoadSpecialSection(
              DataDirectoryKey key) {
          Optional<LoadInfo> maybeLoadInfo = maybeGetLoadInfo(key);
          try {
              if (maybeLoadInfo.isPresent()) {
                  LoadInfo loadInfo = maybeLoadInfo.get();
                  SpecialSection section = null;
                  switch (key) {
                  case BOUND_IMPORT:
                  	section = BoundImportSection.newInstance(loadInfo);
                  	break;
                  case IMPORT_TABLE:
                      section = ImportSection.newInstance(loadInfo);
                      break;
                  case EXCEPTION_TABLE:
                      section = ExceptionSection.newInstance(loadInfo);
                      break;
                  case EXPORT_TABLE:
                      section = ExportSection.newInstance(loadInfo);
                      break;
                  case DEBUG:
                      section = DebugSection.newInstance(loadInfo);
                      break;
                  case RESOURCE_TABLE:
                      section = ResourceSection.newInstance(loadInfo);
                      break;
                  case BASE_RELOCATION_TABLE:
                      section = RelocationSection.newInstance(loadInfo);
                      break;
                  case DELAY_IMPORT_DESCRIPTOR:
                      section = DelayLoadSection.newInstance(loadInfo);
                      break;
                  default:
                      return Optional.absent();
                  }
                  if (section != null && section.isEmpty()) {
                      logger.warn("empty data directory: " + key);
                  }
                  return Optional.fromNullable(section);
              }
          } catch (FileFormatException e) {
              logger.warn(e);
          } 
          return Optional.absent();
      }
docs: To get rid of code repetition in the maybeLoadXSection() methods, this
  abtracts the behaviour of assembling the LoadInfo and calling the factory
  methods of the special sections based on the data directory key.
  <p>
  This results in having to cast the return value to the appropriate type,
  but correct types are well tested with unit tests.
  
  @param key
  @return the special section optional that belongs to the key. Absent if
  no special section for that key available or an error occurs.