Package com.sun.tools.corba.se.idl

Examples of com.sun.tools.corba.se.idl.InterfaceEntry


        impl = true;
      }
      else
        stream.print (", ");

      InterfaceEntry s =(InterfaceEntry)((ValueEntry)v).supports().elementAt(0);
      // abstract supported classes don't have "Operations"
      if (s.isAbstract ())
         stream.print (Util.javaName (s));
      else
          stream.print (Util.javaName (s) + "Operations");
      }
View Full Code Here


    // return is expected instead of an empty vector

    // if supporting an interfaces, generate bindings for inheriting methods
    if (v.supports ().size () > 0)
    {
      InterfaceEntry intf = (InterfaceEntry) v.supports ().elementAt (0);
      Enumeration el = intf.allMethods ().elements ();
      while (el.hasMoreElements ())
      {
        MethodEntry m = (MethodEntry) el.nextElement ();
        // <d59071> Don't alter the symbol table/emit list elements!
        //m.container (v);
View Full Code Here

    boolean inStruct = false;
    if (entry.container () instanceof StructEntry || entry.container () instanceof UnionEntry)
      inStruct = true;
    else if (entry.container () instanceof InterfaceEntry)
    {
      InterfaceEntry i = (InterfaceEntry)entry.container ();
      if (i.state () != null)
      {
        Enumeration e = i.state ().elements ();
        while (e.hasMoreElements ())
          if (((InterfaceState)e.nextElement ()).entry == entry)
          {
            inStruct = true;
            break;
View Full Code Here

            addTo (importList, baseName + "Helper");
      }
    }
    else if (entry instanceof InterfaceEntry && (type == TypeFile || type == StubFile))
    {
      InterfaceEntry i = (InterfaceEntry)entry;

      if (i instanceof ValueEntry) // <d59512>
      {
        // Examine interface parents in supports vector.
        Enumeration e = ((ValueEntry)i).supports ().elements ();
        while (e.hasMoreElements ())
        {
          SymtabEntry parent = (SymtabEntry)e.nextElement ();
          if (importTypes.contains (parent))
          {
            addTo (importList, parent.name () + "Operations");
          }
          // If this is a stub, then recurse to the parents
          if (type == StubFile)
          {
            if (importTypes.contains (parent))
              addTo (importList, parent.name ());
            Vector subImportList = addImportLines (parent, importTypes, StubFile);
            Enumeration en = subImportList.elements ();
            while (en.hasMoreElements ())
            {
              addTo (importList, (String)en.nextElement ());
            }
          }
        }
      }
      // Interface or valuetype -- Examine interface and valuetype parents,
      // Look through derivedFrom vector
      Enumeration e = i.derivedFrom ().elements ();
      while (e.hasMoreElements ())
      {
        SymtabEntry parent = (SymtabEntry)e.nextElement ();
        if (importTypes.contains (parent))
        {
          addTo (importList, parent.name ());
          // <d59512> Always add both imports, even though superfluous.  Cannot
          // tell when writing Operations or Signature interface!
          if (!(parent instanceof ValueEntry)) // && parent.name ().equals ("ValueBase")))
            addTo (importList, parent.name () + "Operations");
        }
        // If this is a stub, then recurse to the parents
        if (type == StubFile)
        {
          Vector subImportList = addImportLines (parent, importTypes, StubFile);
          Enumeration en = subImportList.elements ();
          while (en.hasMoreElements ())
          {
            addTo (importList, (String)en.nextElement ());
          }
        }
      }
      // Look through methods vector
      e = i.methods ().elements ();
      while (e.hasMoreElements ())
      {
        MethodEntry m = (MethodEntry)e.nextElement ();

        // Look at method type
View Full Code Here

    }

    // Write out the supported interfaces
    Enumeration enumeration = v.supports().elements();
    while (enumeration.hasMoreElements())  {
        InterfaceEntry ie = (InterfaceEntry)(enumeration.nextElement()) ;
        String cname = Util.javaName(ie) ;
        if (!ie.isAbstract())
            cname += "Operations" ;
        isw.writeClassName( cname ) ;
    }

    // for when a custom valuetype inherits from a non-custom valuetype
View Full Code Here

    // Add the inherited methods
    Enumeration parents = entry.derivedFrom ().elements ();
    while (parents.hasMoreElements ())
    {
      InterfaceEntry parent = (InterfaceEntry)parents.nextElement ();
      if (!parent.name ().equals ("Object"))
        buildMethodList (parent);
    }
  } // buildMethodList
View Full Code Here

    intfName = Util.javaName (i);
    // for valuetype, get the name of the interface the valuetype supports
    if (i instanceof ValueEntry)
    {
      ValueEntry v = (ValueEntry) i;
      InterfaceEntry intf = (InterfaceEntry) v.supports ().elementAt (0);
      intfName = Util.javaName (intf);
    }
  } // init
View Full Code Here

    // Add the inherited methods
    Enumeration parents = entry.derivedFrom ().elements ();
    while (parents.hasMoreElements ())
    {
      InterfaceEntry parent = (InterfaceEntry)parents.nextElement ();
      if (!parent.name ().equals ("Object"))
        buildMethodList (parent);
    }
  } // buildMethodList
View Full Code Here

    {
      if (firstTime)
        firstTime = false;
      else
        stream.print (", ");
      InterfaceEntry parent = (InterfaceEntry)i.derivedFrom ().elementAt (k);
      stream.print (Util.javaName (parent));
      if (! parent.isAbstract ()) // <d62310-klr>
        hasNonAbstractParent = true; // <d62310-klr>
    }
    // <d62310-klr> - begin
    // If this interface extends only abstract interfaces,
    // it should extend both org.omg.CORBA.Object and IDLEntity.
View Full Code Here

    }

    boolean firstTime = true;
    for (int k = 0; k < i.derivedFrom ().size (); ++k)
    {
      InterfaceEntry parent = (InterfaceEntry) i.derivedFrom ().elementAt (k);
      String parentName = Util.javaName (parent);

      // ignore the default parent - CORBA.Object
      if (parentName.equals ("org.omg.CORBA.Object"))
          continue;

      if (firstTime)
      {
        firstTime = false;
        stream.print (" extends ");
      }
      else
        stream.print (", ");

      // Don't append suffix Operations to the parents of abstract interface
      // or to the abstract parents of regular interface
      if (parent.isAbstract () || i.isAbstract ())
        stream.print (parentName);
      else
        stream.print (parentName + "Operations");
    }
  } // writeOperationsHeading
View Full Code Here

TOP

Related Classes of com.sun.tools.corba.se.idl.InterfaceEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.