[#2384] Add conditionals for classes.