if (generatorSwap instanceof GeneratorSwapFixedIbor) {
final GeneratorSwapFixedIbor fixedIborGenerator = (GeneratorSwapFixedIbor) generatorSwap;
calendar = fixedIborGenerator.getCalendar();
dayCountModification = fixedIborGenerator.getFixedLegDayCount();
} else if (generatorSwap instanceof GeneratorSwapFixedON) {
final GeneratorSwapFixedON fixedONGenerator = (GeneratorSwapFixedON) generatorSwap;
calendar = fixedONGenerator.getOvernightCalendar();
dayCountModification = fixedONGenerator.getFixedLegDayCount();
} else if (generatorSwap instanceof GeneratorSwapFixedCompoundedONCompounded) {
final GeneratorSwapFixedCompoundedONCompounded fixedCompoundedON = (GeneratorSwapFixedCompoundedONCompounded) generatorSwap;
calendar = fixedCompoundedON.getOvernightCalendar();
dayCountModification = fixedCompoundedON.getFixedLegDayCount();
} else {