Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7171151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:21:23+00:00 2026-05-28T15:21:23+00:00

I am trying to write a code generator do to Mapping between any two

  • 0

I am trying to write a code generator do to Mapping between any two classes using Eclipse. The idea is to present a Wizard where users selects two classes whose properties need to be mapped. Then display all the potential matches and if user is okay then create a ClassMapper class where we will have only one method map which will do the required Class1.setXXX(Class2.getXXX());

Any pointers on how can we do this?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:21:24+00:00Added an answer on May 28, 2026 at 3:21 pm

    This what you’re going to do offers similar functionality as Dozer, but static code has this superiority, that it is faster, it contains logic only in code, and it is easier to find field usage via call hierarchy in IDE.

    Generally the Eclipse plugin would be the best way to start, because you can only project GUI and the displaying is done by Eclipse itself, and also you hava access to its great tools to work with java code.

    I think, however, the worse part would be the configuration one. Dozer has its primitive mapper (primitive in the way it converts between primitive and native java types 😉 which handles most typical conversions between standard types, however there is ofted need to configure it. For example, the strings representing booleans can be either ‘t’ and ‘f’, or ‘true’ and ‘false’ or ‘1’ and ‘0’, or words from other language. Dates can have various formats etc. So you would need to configure in this plugin various mappers, propably by the means of defining own code snippets to handle specific conversion.

    However, if you do this, you will be greatly appreciated.
    I was recently searching for something, that would do even more, I mean it could both create mapping AND the dto’s to which code will be matched, with possibility to merge class hierarchy for design, when object subtypes are represented by various classes, to flat single class, better for json transport, however, without result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a code generator using a c# console application. Now
I am trying to code a flowchart generator for a language using Ruby. I
I am trying to write a custom code generator that can parse stored procedures.
In trying to write more testable Java code, I have been using the Model-View-Presenter
I'm trying to write code to convert a WCF wsHttpBinding to customBinding, using the
I've been trying to write a code for two point crossover operation in a
I am trying to write simple Visual Studio Add-In for code generation. In my
I'm trying to write a unit test for a piece of code that generates
I'm trying to write some LINQ To SQL code that would generate SQL like
I was trying to write code that would auto-close a Toplevel Tk window in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.