Please refer to http://java.sun.com/developer/technicalArticles/JavaLP/Interposing/
And then the following explanation:
At class load time, the interposed class must be found before the original one...The interposed class must have the same full name as the original. For example, a class Foo may exist in package pub.foo and create an instance of class Bar from package pub.bar. Creating a file Bar.java in another directory, such as fake/pub/bar and prepending /fake to the classpath, ensures that the JVM will load our definition of class pub.bar.Bar rather than the original. In this way, we can interpose our definitions of Bar's methods over the originals.
In the example that follows Bar.java is the interface - the object of which would be interposed.
I cannot understand what use case is Sun explaining in the quote above. Specific doubts:
1. Which is the original class being mentioned?
2. In what case would I need to have my own fake/pub.bar.Bar and not use the original one (in case i have interpreted the meaning of original correctly). Please explain with example if possible.
Thanks in advane