this.writer = writer;
fragmentFeatures = new ArrayList<PsFragmentFeature>(exportFeatures.size());
for (ExportFeature exportFeature : exportFeatures) {
if (exportFeature instanceof PsFragmentFeature) {
PsFragmentFeature fragmentFeature = (PsFragmentFeature) exportFeature;
fragmentFeatures.add(fragmentFeature);
} else {
throw new IllegalArgumentException("Impossible to export " + exportFeature.getClass().getName() + " as fragment feature.");
}
}