cognitect / transit-java

transit-format implementation for Java
Apache License 2.0
62 stars 21 forks source link

Changes emitMap method to protected so that the emitter can be extensible for JVM languages #8

Closed yokolet closed 10 years ago

yokolet commented 10 years ago

Currently, write handlers must be in the Map<Class, WriteHandler<?, ?>> type object. However, classes defined in Ruby are all RubyClass type on Java side. This Map definition is unable to see the difference between Person and Point classes defined in Ruby code. The solution would be override the logic to find the right handler.

The emitMap method is abstract and scope is a package local, which makes unable to extend. This small pull request changes it to protected and makes it extensible.