The following gem, that belongs into a Java programming best practices book, was found in the source of Sun’s JDK.
1 2 3 4 5 6 7 8 9 |
<span>public</span> <span>class</span> StubFactoryFactoryProxyImpl extends StubFactoryFactoryDynamicBase { <span>public</span> PresentationManager.StubFactory makeDynamicStubFactory( PresentationManager pm, PresentationManager.ClassData classData, ClassLoader classLoader ) { <span>return</span> <span>new</span> StubFactoryProxyImpl( classData, classLoader ) ; } } |
Well, I must confess this is almost better than the simple Hello World in Java [cached copy].