Add class constraints code.