True. Neither are 'ways of calling library functions" copyrightable.
But in the case of Java API what was copied was the actual Java-code in which the APIs are expressed.
Because the APIs are "fed" to the compiler as Java source-code, it is clear what was copied was not just the "way library-functions are called".
What was copied was Java SOURCE-CODE which allows a Java compiler to ENFORCE and INTERPRET such calling conventions.
Even if the API was rewritten in another programming language it would be a copyright violation if large parts of the structure of the API meaning how the methods are organized into classes and interfaces and how they refer to each other, was copied. That would clearly be a work of art that deserves copyright protection, in my view.