Java – pass joda time objects between app layers
•
Java
I'm thinking about using joda time
Solution
At the beginning, only the most appropriate type (joda objects in this case) is returned
If you know someone has a problem (which may not happen often), you can add a converter method to the interface (so you have gettime(), now getjavatime() or gettimeinmillis())
Or add a general helper method that accepts an object (you can treat an unknown instance as anywhere in the code without importing the actual joda class) and returns a normal Java object (Java. Util. Date)
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码