Esempio n. 1
0
 /** A variant of the insertion operation that takes a typecode argument as well. */
 public void insert_Object(org.omg.CORBA.Object o, TypeCode tc) {
   // debug.log ("insert_Object2");
   try {
     if (tc.id().equals("IDL:omg.org/CORBA/Object:1.0") || o._is_a(tc.id())) {
       typeCode = TypeCodeImpl.convertToNative(orb, tc);
       object = o;
     } else {
       throw wrapper.insertObjectIncompatible();
     }
   } catch (Exception ex) {
     throw wrapper.insertObjectFailed(ex);
   }
   isInitialized = true;
 }
Esempio n. 2
0
  // This is used by the Any type when trying to re-construct the type stored inside a
  // CORBA Any.
  public QName getIdlType(TypeCode tc) {
    String repId = null;
    try {
      repId = tc.id();
    } catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
      // No id has been set.
      return null;
    }

    if (repId == null) {
      return null;
    }

    Set<Map.Entry<String, CorbaTypeImpl>> mapSet = typeMap.entrySet();
    for (Iterator<Map.Entry<String, CorbaTypeImpl>> i = mapSet.iterator(); i.hasNext(); ) {
      Map.Entry<String, CorbaTypeImpl> entry = i.next();
      if (entry.getValue() instanceof NamedType) {
        NamedType n = (NamedType) entry.getValue();
        if (n.getRepositoryID().equals(repId)) {
          return new QName(getTargetNamespace(), entry.getKey());
        }
      }
    }

    return null;
  }
Esempio n. 3
0
 /*      */ public void insert_Object(org.omg.CORBA.Object paramObject, TypeCode paramTypeCode)
       /*      */ {
   /*      */ try
   /*      */ {
     /* 1047 */ if ((paramTypeCode.id().equals("IDL:omg.org/CORBA/Object:1.0"))
         || (paramObject._is_a(paramTypeCode.id())))
     /*      */ {
       /* 1049 */ this.typeCode = TypeCodeImpl.convertToNative(this.orb, paramTypeCode);
       /* 1050 */ this.object = paramObject;
       /*      */ }
     /*      */ else {
       /* 1053 */ throw this.wrapper.insertObjectIncompatible();
       /*      */ }
     /*      */ } catch (Exception localException) {
     /* 1056 */ throw this.wrapper.insertObjectFailed(localException);
     /*      */ }
   /* 1058 */ this.isInitialized = true;
   /*      */ }