Exemplo n.º 1
0
 public IRObject getReference() {
   if (ref == null) {
     ref =
         org.omg.CORBA.InterfaceDefHelper.narrow(servantToReference(new InterfaceDefPOATie(this)));
   }
   return ref;
 }
Exemplo n.º 2
0
  /**
   * print the IDL definition for a contained objec
   *
   * @param c the contained object
   * @param indentation how many spaces to use for indentation
   */
  public void printContained(org.omg.CORBA.Contained c, int indentation) {
    org.omg.CORBA.ContainedPackage.Description descr = c.describe();

    switch (descr.kind.value()) {
      case org.omg.CORBA.DefinitionKind._dk_Module:
        {
          printModule(org.omg.CORBA.ModuleDescriptionHelper.extract(descr.value), indentation + 3);
          break;
        }
      case org.omg.CORBA.DefinitionKind._dk_Interface:
        {
          org.omg.CORBA.InterfaceDef idef =
              org.omg.CORBA.InterfaceDefHelper.narrow(
                  ir.lookup_id(org.omg.CORBA.InterfaceDescriptionHelper.extract(descr.value).id));
          printInterface(idef, indentation + 3);
          break;
        }
      case org.omg.CORBA.DefinitionKind._dk_Attribute:
        {
          printAttribute(
              org.omg.CORBA.AttributeDescriptionHelper.extract(descr.value), indentation + 3);
          break;
        }
      case org.omg.CORBA.DefinitionKind._dk_Operation:
        {
          printOperation(
              org.omg.CORBA.OperationDescriptionHelper.extract(descr.value), indentation + 3);
          break;
        }
      case org.omg.CORBA.DefinitionKind._dk_Exception:
        {
          printException(
              org.omg.CORBA.ExceptionDescriptionHelper.extract(descr.value), indentation + 3);
          break;
        }
      case org.omg.CORBA.DefinitionKind._dk_Constant:
        {
          printConstant(
              org.omg.CORBA.ConstantDescriptionHelper.extract(descr.value), indentation + 3);
          break;
        }
      case org.omg.CORBA.DefinitionKind._dk_Struct:
        {
          printStruct(org.omg.CORBA.TypeDescriptionHelper.extract(descr.value), indentation + 3);
          break;
        }
      case org.omg.CORBA.DefinitionKind._dk_Enum:
        {
          printEnum(org.omg.CORBA.TypeDescriptionHelper.extract(descr.value), indentation + 3);
          break;
        }
      case org.omg.CORBA.DefinitionKind._dk_Union:
        {
          printUnion(org.omg.CORBA.TypeDescriptionHelper.extract(descr.value), indentation + 3);
          break;
        }
      case org.omg.CORBA.DefinitionKind._dk_Alias:
        {
          printAlias(org.omg.CORBA.TypeDescriptionHelper.extract(descr.value), indentation + 3);
          break;
        }
    }
  }