39 |
|
|
40 |
package org.omg.DynamicAny; |
package org.omg.DynamicAny; |
41 |
|
|
42 |
|
import gnu.CORBA.Minor; |
43 |
|
|
44 |
import org.omg.CORBA.BAD_PARAM; |
import org.omg.CORBA.BAD_PARAM; |
45 |
import org.omg.CORBA.TypeCode; |
import org.omg.CORBA.TypeCode; |
46 |
import org.omg.CORBA.ORB; |
import org.omg.CORBA.ORB; |
82 |
+ " is not a DynAnyFactory"); |
+ " is not a DynAnyFactory"); |
83 |
} |
} |
84 |
} |
} |
85 |
|
|
86 |
|
/** |
87 |
|
* Narrow the given object to the DynAnyFactory. For the objects that are |
88 |
|
* always local, this operation does not differ from the ordinary |
89 |
|
* {@link #narrow} (ClassCastException will be thrown if narrowing something |
90 |
|
* different). |
91 |
|
* |
92 |
|
* @param obj the object to cast. |
93 |
|
* |
94 |
|
* @return the casted DynAnyFactory. |
95 |
|
* |
96 |
|
* @since 1.5 |
97 |
|
* |
98 |
|
* @see OMG issue 4158. |
99 |
|
*/ |
100 |
|
public static DynAnyFactory unchecked_narrow(org.omg.CORBA.Object obj) |
101 |
|
{ |
102 |
|
return narrow(obj); |
103 |
|
} |
104 |
|
|
105 |
/** |
/** |
106 |
* Get the final_type code of the {@link DynAnyFactory}. |
* Get the final_type code of the {@link DynAnyFactory}. |
182 |
*/ |
*/ |
183 |
static String not_applicable(String Id) |
static String not_applicable(String Id) |
184 |
{ |
{ |
185 |
try |
MARSHAL m = new MARSHAL("The read/write are not applicable for " + Id); |
186 |
{ |
m.minor = Minor.Inappropriate; |
187 |
throw new MARSHAL("The read/write are not applicable for " + Id); |
throw m; |
|
} |
|
|
catch (Exception e) |
|
|
{ |
|
|
throw new MARSHAL(); |
|
|
} |
|
188 |
} |
} |
189 |
} |
} |