I have a situation where some objects come from an external Jar. There is an object X used from other objects like this:
object X {
def foo() = ....
... more methods to follow
}
object A {
def bar() = X.foo()
...few more methods using X
}
object B {
def baz() = X.baz()
...few more methods using X
}
...other objects using X...
All that objects belong to the same Jar package and I need to use the classes A,B,etc but with a different reference than X (would be my local X).
Is there a way to replace somehow X inside my project that is using a jar defined in that way?