As a developer, I want to pass a Class parameter to OutputProcessor.addBefore/AfterProcessor, so that I don't have to guess the semantics of the parameter (currently Object).
OutputProcessor.addBeforeProcessor and OutputProcessor.addAfterProcessor take an Object argument.
One has to guess/know the implementation of OutputProcessorChainImpl.addProcessor to use it correctly: the Object must either be an OutputProcessor (instance) or a String denoting an output processor's class name.
- Referring to other output processor classes makes sense, that is why the only usages in practice use Strings denoting class names.
- Referring to other instances of output processors does not make much sense in practice. It would mean that when defining an output processor, you would need access to all other output processor instances in order to be able to define your own
It would more intuitive and explicit for users to use Class<? extends OutputProcessor> as parameter.
That would also eliminate the need to chain a getName() call to every getClass() call.