G
GiladHa
Hello,
Can AspectWerkz/any other AOP framework, be used to weave
new methods to an existing class/interface?
An example:
I have a class
class Worker implements IWork {
public void doWork(A a, B b, C c)
{
do something ....
}
}
which implements an interface:
interface IWork {
void doWork(A a, B b, C c);
}
Can I write an aspect which defines, for both interface and
class, a new method called mock_doWork, which
receives the same parameters.
class Worker implements IWork {
public void doWork(A a, B b, C c)
{ ....
}
public void mock_doWork(A a, B b, C c)
{ ....
}
}
and:
interface IWork {
void doWork(A a, B b, C c);
void mock_doWork(A a, B b, C c);
}
Thanks for your assistance,
Gilad Haimov
Can AspectWerkz/any other AOP framework, be used to weave
new methods to an existing class/interface?
An example:
I have a class
class Worker implements IWork {
public void doWork(A a, B b, C c)
{
do something ....
}
}
which implements an interface:
interface IWork {
void doWork(A a, B b, C c);
}
Can I write an aspect which defines, for both interface and
class, a new method called mock_doWork, which
receives the same parameters.
class Worker implements IWork {
public void doWork(A a, B b, C c)
{ ....
}
public void mock_doWork(A a, B b, C c)
{ ....
}
}
and:
interface IWork {
void doWork(A a, B b, C c);
void mock_doWork(A a, B b, C c);
}
Thanks for your assistance,
Gilad Haimov