I think Cbina whould supply weapons to Iran for oil or investment on Iranian oil. If there is a hot war between Iran and one of the Western states that has an carrier, China should use the opportunity to find out whether anti-ship ballistic missiles work or not.
If the DF-21D, etc prove to be effective, China would have defeated the US carrier groups "without battle". If not, China should start looking for alternatives early.