jerkson icon indicating copy to clipboard operation
jerkson copied to clipboard

For issue #45 (Support for parameterized types)

Open gianm opened this issue 12 years ago • 0 comments

This patch lets Jerkson work with parameterized case classes by extracting type parameters using javaType.containedType, stashing them in a Map, and passing them through to typeRef2JavaType. In turn, typeRef2JavaType will return the stashed JavaTypes if it encounters one of them instead of trying to load classes using a generic name (which leads to a ClassNotFoundException). The patch series also includes a couple of test cases.

There might be a nicer way to accomplish the same thing but I am not aware of one.

gianm avatar Apr 20 '12 00:04 gianm