I see a way to add some tracing diagnostics to some legacy Java code. By this legacy I mean that I can not change any way. If we consider the following items:
public class classIOwnAndCanChange {public static zero main (string [] args) // // Store my object here that i // should be legacyclassa and b I want to make available my method ("FU", 100); }} Public class LegacyClassA I can not change the public zero myMethod (string name, int timer) {/}} I want to get my 'injection' object here so that I, for example, // this method Method CallThatTakesTimeTime ("Some Ultimate"); I myself and I would like to make the object available in B and C. What is the correct way to change this method in Java, which calls to B and calls to C call B?
You can play all kinds of games with other forms of AOP () and / or bytecok manipulation .
Whether or not you wants changes wildly It depends on your precise requirements, and you will get "injection "Need to use the object. As I did before I matured like tools, I thought AOP and threadlocal could be needed.
No comments:
Post a Comment