Last active
February 21, 2018 09:53
-
-
Save fcamblor/f91fb5d8640a8ca53f7feaa0a9597a0d to your computer and use it in GitHub Desktop.
RestX "raw" types list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For an upcoming RestX feature (see https://github.com/restx/restx/issues/146)), we need to identify what are the common "raw types" you are using on your projects. | |
A "raw type" has generally following properties : | |
- it allows to represent a "single" value | |
- it should be deserializable from a single string value | |
- it should be serializable to a single string value | |
- instance is generally immutable | |
Here are the current listing of identified types : | |
[Primitive type & their wrapper] | |
- byte & java.lang.Byte | |
- short & java.lang.Short | |
- int & java.lang.Integer | |
- long & java.lang.Long | |
- float & java.lang.Float | |
- double & java.lang.Double | |
- boolean & java.lang.Boolean | |
- char & java.lang.Character | |
[Common JDK value classes] | |
- java.lang.String | |
- java.lang.Class | |
- java.lang.Enum subtypes | |
- java.io.File | |
- java.math.BigDecimal | |
- java.math.BigInteger | |
- java.util.Currency | |
- java.util.Date | |
- java.util.Locale | |
- java.util.TimeZone | |
- java.util.UUID | |
- java.nio.charset.Charset | |
- java.nio.file.Path | |
- java.util.regex.Pattern | |
- java.net.URI | |
- java.net.URL | |
[Java 8 Date API] | |
- java.time.Instant | |
- java.time.DayOfWeek | |
- java.time.LocalDate | |
- java.time.LocalDateTime | |
- java.time.LocalTime | |
- java.time.Month | |
- java.time.Year | |
- java.time.ZoneId | |
[Joda date time API] | |
- org.joda.time.DateTime | |
- org.joda.time.Instant | |
- org.joda.time.LocalDate | |
- org.joda.time.LocalDateTime | |
- org.joda.time.LocalTime | |
- org.joda.time.DateTimeZone | |
[Mongo/Jongo API] | |
- org.bson.types.ObjectId | |
Some more classes I'm wondering to add : | |
- java.util.concurrent.atomic.Atomic* classes | |
- java.sql.* types |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment