Hi,
the nested class is not static and basically that is the problem.
The code looks something like that:
public class A {
public class B {
private String fieldB;
//getter and setter
}
}
public class C {
private String fieldC;
//getter and setter
}
public class ObjectFactory {
private static final A a = new A();
public A getA() {
return a;
}
public A.B createB() {
return
a.new B();
}
}
@Mapper(uses = { ObjectFactory.class })
public interface BMapper {
BMapper INSTANCE = Mappers.getMapper(BMapper.class);
@Mappings({ @Mapping(source = "fieldC", target = "fieldB") })
A.B mapB(C c);