on 03-15-2007 5:45 PM
Hi David,
It`s me again :-). The only way which comes to my mind for your scenario is creating custom class loader. And LOE is defenetly not like "weird C++-like statement".
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
David,
1. Java has no preprocessor, so C++ tricks are not available. Also I would not recommend such tricks even in C++ if you don't want to turn your colleagues working with same code into personal enemies.
2. The phrase "easier to create a WDJ custom class loader " makes me smile. First, it's not that simple to interfere WDJ class loading scheme. Plus custom class loaders is not trivial Java topic per se.
3. The problem "replace all A-s with B-s" is typically solved using one or another GoF creation patterns, like <a href="http://en.wikipedia.org/wiki/Abstract_factory_pattern">Abstract Factory</a> or <a href="http://en.wikipedia.org/wiki/Factory_method_pattern">Factory Method</a>. You may use them with custom class loader, if you really want to
By the way, all UI controls in WD are created using Abstract Factory (role played by view). So you may use this as good example.
Valery Silaev
SaM Solutions
Hi Valery -
Thanks for taking the time to write that thoughtful and very informative reply.
That "Factory Method" that you mention - is that more or less related to the "Factory Method" that comes up in the ABAP debugger as you step through the SAP BAdI invocation/selection code ... ?
Also, when I was doing my series of blogs on the WDA component WDY_UI_TEST_ELEMENTS, I noticed that after the developer's custom code set attributes of UI's appropriately, the UI was passed off to a canned "FactoryMethod" for actual creation ... I assume that is the same kind of thing you're talking about here ...
Thanks very much again ...
djh
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.