There are two classes of sources A and B
class A {
public Double x;
public Double y;
}
class B {
public Double x;
public Double y;
}
and another target class C
class C {
public Double x;
public Double y;
}
It is clear how to match AC or B from C.
Is it possible to map some function, for example, adding or a pool of source objects to the target, so that the generated code looks like this:
C.x = A.x + B.x
C.y = A.y + B.y
or
C.x = Math.pow(A.x, B.x)
C.y = Math.pow(A.y, B.y)
source
share