(Class<T> type)
| 89 | /// Looks up the mapper for `type` (by `type.getName()`) or null when |
| 90 | /// none is registered. |
| 91 | @SuppressWarnings("unchecked") |
| 92 | public static <T> Mapper<T> get(Class<T> type) { |
| 93 | if (type == null) { |
| 94 | return null; |
| 95 | } |
| 96 | return (Mapper<T>) BY_NAME.get(type.getName()); |
| 97 | } |
| 98 | |
| 99 | /// Serializes `instance` to JSON. Throws `IllegalStateException` when |
| 100 | /// no mapper is registered for its concrete class; that always points |