/**
* Return the LocalIDLType for the given TypeCode.
*/
static LocalIDLType getIDLType(TypeCode typeCode, RepositoryImpl repository) {
TCKind tcKind = typeCode.kind();
if (PrimitiveDefImpl.isPrimitiveTCKind(tcKind))
return new PrimitiveDefImpl(typeCode, repository);
if (tcKind == TCKind.tk_sequence)
return repository.getSequenceImpl(typeCode);
if (tcKind == TCKind.tk_value || tcKind == TCKind.tk_value_box ||
tcKind == TCKind.tk_alias || tcKind == TCKind.tk_struct ||
tcKind == TCKind.tk_union || tcKind == TCKind.tk_enum ||
tcKind == TCKind.tk_objref) {
try {
return (LocalIDLType) repository._lookup_id(typeCode.id());
} catch (BadKind ex) {
throw JacORBLogger.ROOT_LOGGER.badKindForTypeCode(tcKind.value());
}
}
throw JacORBLogger.ROOT_LOGGER.badKindForTypeCode(tcKind.value());
}