lundi 8 août 2016

Null object pattern for a third party library

I am using a third party library for measuring performance metrics. Java Metrics Library

This library doesn't provide any mechanisms to disable it when not needed to measure performance. Therefore I thought of using the null object pattern and provide empty implementations for the method so that I can disable it. I need to use all the features from this library. Therefore I don't want to create a wrapper library. How can I address this scenario? I need to use the null object pattern to disable the library but I do not want to wrap all the methods in it. Any solutions would be much appreciated.

Aucun commentaire:

Enregistrer un commentaire