Hello
I have a external jar library that has many classes and methods. My question is, how can I rewrite a existing method without changing the library?
Ex:
(External jar)
Class Original{
public int doit(a){
return a+1;
}
}
So normally using
Original object = new Original();
System.out.print(object(2));
The output is 3.
Now i want to alter the method to
public int doit(a){
return a+2;
}
I want the output be 4.
Now, i cannot alter the Original class or any the coded used for object creation so creating an extension of class Original is not viable.
Any thoughts?


LinkBack URL
About LinkBacks
Reply With Quote