Created
July 9, 2022 14:24
-
-
Save aleksandarzekovic/5981a8ffcafe38ad71a3b5efff13813f to your computer and use it in GitHub Desktop.
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
val vehicleFactory = PolymorphicJsonAdapterFactory.of(Vehicle::class.java, "type") | |
.withSubtype(Truck::class.java, VehicleType.TRUCK.name) | |
.withSubtype(Plane::class.java, VehicleType.PLANE.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment