We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues happens when creating mapper with API and attribute has custom accessor annotation. Here is minimal Test class
import com.googlecode.jmapper.JMapper; import com.googlecode.jmapper.annotations.JMapAccessor; import com.googlecode.jmapper.api.JMapperAPI; import org.junit.Assert; import org.junit.Test; import static com.googlecode.jmapper.api.JMapperAPI.*; public class MinimalTest { public static class Source { String srcText; public String getSrcText() { return srcText; } public void setSrcText(String srcText) { this.srcText = srcText; } } public static class Destination { @JMapAccessor(set = "customSet") String dstText; public void customSet(String text) { this.dstText = text + " custom"; } public String getDstText() { return dstText; } public void setDstText(String dstText) { this.dstText = dstText; } } @Test public void minimal_test() { JMapperAPI api = new JMapperAPI(); api.add(mappedClass(Source.class) .add(attribute("srcText").value("dstText"))); JMapper<Destination, Source> mapper = new JMapper<>(Destination.class, Source.class, api); Source src = new Source(); src.setSrcText("A"); Destination dst = mapper.getDestination(src); Assert.assertEquals("A custom", dst.getDstText()); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issues happens when creating mapper with API and attribute has custom accessor annotation.
Here is minimal Test class
The text was updated successfully, but these errors were encountered: