class EntryCurrentDirectoryChangedListener implements CurrentDirectoryChangedListener {

  @Override
  public void directoryChanged( Object origin, String oldCurrentDir, String newCurrentDir ) {
    for ( PathReference ref : references ) {
      ObjectLocationSpecificationMethod specMethod = ref.getSpecification();
      String path = ref.getPath();
      if ( ( specMethod == ObjectLocationSpecificationMethod.REPOSITORY_BY_NAME
          || specMethod == ObjectLocationSpecificationMethod.FILENAME )
        && StringUtils.contains( path, Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY )
        && !Objects.equal( oldCurrentDir, newCurrentDir ) ) {
        path = reapplyCurrentDir( oldCurrentDir, newCurrentDir, path );
        ref.setPath( path );
      }
    }
  }

  public  EntryCurrentDirectoryChangedListener( PathReference... refs );
  public  EntryCurrentDirectoryChangedListener(
      Supplier<ObjectLocationSpecificationMethod> specMethodGetter,
      Supplier<String> pathGetter,
      Consumer<String> pathSetter );

}