38 |
|
|
39 |
package org.omg.CORBA; |
package org.omg.CORBA; |
40 |
|
|
41 |
import gnu.CORBA.Restricted_ORB; |
import gnu.CORBA.Minor; |
42 |
import gnu.CORBA.gnuAny; |
import gnu.CORBA.OrbRestricted; |
43 |
|
|
|
import org.omg.CORBA.TypeCodePackage.BadKind; |
|
44 |
import org.omg.CORBA.portable.BoxedValueHelper; |
import org.omg.CORBA.portable.BoxedValueHelper; |
45 |
import org.omg.CORBA.portable.InputStream; |
import org.omg.CORBA.portable.InputStream; |
46 |
import org.omg.CORBA.portable.OutputStream; |
import org.omg.CORBA.portable.OutputStream; |
74 |
* The String typecode. |
* The String typecode. |
75 |
*/ |
*/ |
76 |
private static final TypeCode tString = |
private static final TypeCode tString = |
77 |
Restricted_ORB.Singleton.create_string_tc(0); |
OrbRestricted.Singleton.create_string_tc(0); |
78 |
|
|
79 |
/** |
/** |
80 |
* Returns the String Value repository Id. |
* Returns the String Value repository Id. |
120 |
} |
} |
121 |
catch (ClassCastException ex) |
catch (ClassCastException ex) |
122 |
{ |
{ |
123 |
throw new MARSHAL("String expected"); |
MARSHAL m = new MARSHAL("String expected"); |
124 |
|
m.minor = Minor.ClassCast; |
125 |
|
throw m; |
126 |
} |
} |
127 |
} |
} |
128 |
|
|
142 |
return an_any.extract_string(); |
return an_any.extract_string(); |
143 |
} |
} |
144 |
else |
else |
145 |
throw new BAD_OPERATION("Contains not a string value type"); |
{ |
146 |
|
BAD_OPERATION bad = new BAD_OPERATION("String value type expected"); |
147 |
|
bad.minor = Minor.Any; |
148 |
|
throw bad; |
149 |
|
} |
150 |
} |
} |
151 |
|
|
152 |
/** |
/** |
182 |
{ |
{ |
183 |
if (typecode == null) |
if (typecode == null) |
184 |
{ |
{ |
185 |
ORB orb = Restricted_ORB.Singleton; |
ORB orb = OrbRestricted.Singleton; |
186 |
typecode = |
typecode = |
187 |
orb.create_value_box_tc(id(), "StringValue", tString); |
orb.create_value_box_tc(id(), "StringValue", tString); |
188 |
} |
} |