title: What is the best pattern for a package whose modifications are done in outside of it?
body: <p>I am looking for a design pattern where it fits these specs:</p>
  
  <p>1- Say you have a package animal including 'Animal', 'Cat' and 'Dog'.</p>
  
  <p>2- You have to modify a method behaviour in 'Animal' (also overridden in 'Cat' and 'Dog' as in the package) without doing any modification in the package animal source code.</p>
  
  <p>I did find Visitor Pattern for this kind of purpose, but the problem with that you have to modify package animal source code with 'implement'ing a Visitable interface including accept method. However, this is not allowed.</p>
  
  <p>What do you suggest?</p>