0

I am using structure data type from C++ *.idl file and converting it to generated java class. It's generating java classed but it is not implementing equal to and hash method .. so i am not able to use them to compare.

Ex : i want to use them in a set (which should not support duplicate) as no equals and hashCode so its allowing duplicate entry.

Can any one help me on this. Any way to generate (how to support generating) java classes with equals and hasecode

  • IDL as in CORBA IDL, or are you talking about something else? – NPE Jan 21 '13 at 19:11
  • yes.. they are used by dcm corba protocol but i am not sure how they are implemented.. but if we will add any structure data it will generate *.java file for the same – Satya Shekhar Barik Jan 21 '13 at 19:13

1 Answers1

0

You may be able to simplify the code generation by generating code that uses EqualsBuilder and HashCodeBuilder. Apart from that ... its a tedious coding job.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216