Exemplo n.º 1
0
  private void checkExtractBadOperation(int expected) {
    if (!isInitialized) throw wrapper.extractNotInitialized();

    int tc = realType().kind().value();
    if (tc != expected) {
      String tcName = getTCKindName(tc);
      String expectedName = getTCKindName(expected);
      throw wrapper.extractWrongType(expectedName, tcName);
    }
  }
Exemplo n.º 2
0
  private void checkExtractBadOperationList(int[] expected) {
    if (!isInitialized) throw wrapper.extractNotInitialized();

    int tc = realType().kind().value();
    for (int ctr = 0; ctr < expected.length; ctr++) if (tc == expected[ctr]) return;

    List list = new ArrayList();
    for (int ctr = 0; ctr < expected.length; ctr++) list.add(getTCKindName(expected[ctr]));

    String tcName = getTCKindName(tc);
    throw wrapper.extractWrongTypeList(list, tcName);
  }
Exemplo n.º 3
0
  /** See the description of the <a href="#anyOps">general Any operations.</a> */
  public org.omg.CORBA.Object extract_Object() {
    // debug.log ("extract_Object");
    if (!isInitialized) throw wrapper.extractNotInitialized();

    // Check if the object contained here is of the type in typeCode
    org.omg.CORBA.Object obj = null;
    try {
      obj = (org.omg.CORBA.Object) object;
      if (typeCode.id().equals("IDL:omg.org/CORBA/Object:1.0") || obj._is_a(typeCode.id())) {
        return obj;
      } else {
        throw wrapper.extractObjectIncompatible();
      }
    } catch (Exception ex) {
      throw wrapper.extractObjectFailed(ex);
    }
  }