62 |
import org.omg.CORBA.TCKind; |
import org.omg.CORBA.TCKind; |
63 |
import org.omg.CORBA.TypeCode; |
import org.omg.CORBA.TypeCode; |
64 |
import org.omg.CORBA.TypeCodeHolder; |
import org.omg.CORBA.TypeCodeHolder; |
|
import org.omg.CORBA.TypeCodePackage.BadKind; |
|
65 |
import org.omg.CORBA.ValueBaseHolder; |
import org.omg.CORBA.ValueBaseHolder; |
66 |
import org.omg.CORBA.portable.BoxedValueHelper; |
import org.omg.CORBA.portable.BoxedValueHelper; |
67 |
import org.omg.CORBA.portable.Streamable; |
import org.omg.CORBA.portable.Streamable; |
68 |
|
|
|
import java.io.IOException; |
|
69 |
import java.io.Serializable; |
import java.io.Serializable; |
|
|
|
70 |
import java.lang.reflect.Field; |
import java.lang.reflect.Field; |
|
|
|
71 |
import java.math.BigDecimal; |
import java.math.BigDecimal; |
|
|
|
72 |
import java.util.Arrays; |
import java.util.Arrays; |
73 |
|
import java.util.zip.Adler32; |
74 |
|
|
75 |
/** |
/** |
76 |
* The implementation of {@link Any}. |
* The implementation of {@link Any}. |
203 |
|
|
204 |
return Arrays.equals(ba, bb); |
return Arrays.equals(ba, bb); |
205 |
} |
} |
206 |
|
|
207 |
|
/** |
208 |
|
* Get the content - dependent hashcode. |
209 |
|
*/ |
210 |
|
public int hashCode() |
211 |
|
{ |
212 |
|
if (has == null) |
213 |
|
return type().kind().value(); |
214 |
|
else |
215 |
|
{ |
216 |
|
Adler32 adler = new Adler32(); |
217 |
|
|
218 |
|
cdrBufOutput a = new cdrBufOutput(); |
219 |
|
a.setOrb(orb); |
220 |
|
write_value(a); |
221 |
|
|
222 |
|
adler.update(a.buffer.toByteArray()); |
223 |
|
adler.update(type().kind().value()); |
224 |
|
|
225 |
|
return (int) adler.getValue() & Integer.MAX_VALUE; |
226 |
|
} |
227 |
|
} |
228 |
|
|
229 |
/** |
/** |
230 |
* Delegates functionality to {@link #equal(Any)}. |
* Delegates functionality to {@link #equal(Any)}. |