They abandoned the spirit of the constitution and treaties when they started building aircraft carriers, pardon helicopter destroyers (one is named Kaga). Now they are buying F-35s for them.
Mostly because China is erking back to the 'good old Imperial days' as a whole. The Opium Wars
really damaged the Chinese collective psyche in that regard. While China knows that it can't try to make China grow larger
now, they're preparing for it because the CCP is beholden to Chinese history, its people's collective desires, and the Mandate of Heaven concept...
... and
that's the problem overall.
The thing is, to get a military effective enough to carry out those collective desires, they'll need three things: logistical capacity, money, and time.
For logistical capacity, that is comparatively
easy of the bunch, as it pertains to things like bullets, spare parts, spare barrels, fuel, and the like... but the problem lies in that they've mostly been a 'green water' navy for quite some time and switching over to a 'blue water' navy is fraught with problems, as the USN learned when it kept trying to modernize on a (practically) literal shoestring budget that Congress loved to give the Navy until the Cold War became a thing.
Money is actually quite a problem in the long run, as that lovely outsourcing money is drying up as companies withdraw and go back home only to automate the
shit out of them because at this point the human being is
far too expensive to keep hiring anymore in the eyes of the stockholders who actually run a good portion of the companies these days. Since this is divided by all sorts of domestic and trade demands
alongside the military, there is going to be a budget crunch pretty darn quick.
Time is the wildcard here and can be rather unpredictable...