// All cases need to be able to create repository IDs.
//
// See bug 4391648 for more info about the tcORB in this
// case.
RepositoryIdStrings repStrs
= RepositoryIdFactory.getRepIdStringsFactory(tcORB);
// Assertion: c instanceof Serializable?
if ( c.isArray() ) {
// Arrays - may recurse for multi-dimensional arrays
Class componentClass = c.getComponentType();
TypeCode embeddedType;
if ( componentClass.isPrimitive() ) {
embeddedType = getPrimitiveTypeCodeForClass(componentClass,
tcORB);
} else {
embeddedType = createTypeCodeForClass (componentClass,
tcORB);
}
TypeCode t = tcORB.create_sequence_tc (0, embeddedType);
String id = repStrs.createForJavaType(c);
return tcORB.create_value_box_tc (id, "Sequence", t);
} else if ( c == java.lang.String.class ) {
// Strings
TypeCode t = tcORB.create_string_tc (0);
String id = repStrs.createForJavaType(c);
return tcORB.create_value_box_tc (id, "StringValue", t);
}
// Anything else