You can replace system properties with your own subclass.
MyProperties newProps = new MyProperties(System.getProperties()); System.setProperties(newProps);
Then just write a subclass of properties that intercepts the appropriate methods.
source share