I have have written a post processor and I which to register it so Slice can use it.
How do I do this?
I looked at the MapperModule class. The getMapper(...) method calls mapperBuilder.addDefaultSliceProcessors().build() which adds all the processors and post processor and then built the Mapper.
Would it be fine to create my own MapperModule that would retrieve the current MapperBuilder, add additional processors/post processor and call build again?
Yes, it will be fine to create your own mapper module. The MapperModule (or CQMapperModule from CQ/AEM addon) is a very simple module providing only one type of objects - Mapper. You need to remember to install the module you'll create instead of CQMapperModule. In order to do this, you'd need to go to your activator and replace the:
I know that this is not particularly handy method of extending mapper, therefor we're going to change this approach in Slice 4.3 - mapper will allow you to use multibindings to register your own processors (https://cognifide.atlassian.net/browse/SLICE-122). The release is planned in Q4 2015.
Yes, it's supported. But if it works or not depends on how you create the postprocessor object. In your MapperModule's getMapper method you can't instantiate the postprocessor by "new MyPostProcessor()". Instead, you need to inject it to the method. Your method should look like this: