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

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


    if (init != null)
    {
      stream.println ();
      for (int i = 0; i < init.size (); i++)
      {
        MethodEntry element = (MethodEntry) init.elementAt (i);
        element.valueMethod (true);
        ((MethodGen) element.generator ()). interfaceMethod (symbolTable, element, stream);
        if (element.parameters ().isEmpty ()) // <d57067-klr>
          explicitDefaultInit = true;
      }
    }
  } // writeInitializers
View Full Code Here


    while (e.hasMoreElements ())
    {
      SymtabEntry contained = (SymtabEntry)e.nextElement ();
      if (contained instanceof MethodEntry)
      {
        MethodEntry element = (MethodEntry)contained;
        ((MethodGen)element.generator ()).interfaceMethod (symbolTable, element, stream);
      }
      else
      {
        // Generate the type referenced by the typedef.
        if (contained instanceof TypedefEntry)
          contained.type ().generate (symbolTable, stream);

        // Note that we also need to generate the typedef itself if
        // contained is a typedef.
        contained.generate (symbolTable, stream);
      }
    }

    // Abstract values are mapped to interfaces. There is no need to generate
    // the bindings for inheriting methods in case of inheritance from other
    // abstract values or supporting interface
    if (v.isAbstract ())
        return;

    // workaround: if the value type doesnot support any interfaces, a null
    // 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);
        //((MethodGen)m.generator ()).interfaceMethod (symbolTable, m, stream);
        MethodEntry mClone = (MethodEntry)m.clone ();
        mClone.container (v);
        ((MethodGen)mClone.generator ()).interfaceMethod (symbolTable, mClone, stream);
      }
    }

    // if inheriting from abstract values, generating bindings for all
    // inheriting methods
    for (int i = 0; i < v.derivedFrom ().size (); i++) {
      ValueEntry parentValue = (ValueEntry) v.derivedFrom ().elementAt (i);
      if (parentValue.isAbstract ())
      {
        Enumeration el = parentValue.allMethods ().elements ();
        while (el.hasMoreElements ())
        {
           MethodEntry m = (MethodEntry) el.nextElement ();
          // <d59071> Don't alter the symbol table/emit list elements!
          //m.container (v);
          //((MethodGen)m.generator ()).interfaceMethod (symbolTable, m, stream);
          MethodEntry mClone = (MethodEntry)m.clone ();
          mClone.container (v);
          ((MethodGen)mClone.generator ()).interfaceMethod (symbolTable, mClone, stream);
        }
      }
    }

  //writeStreamableMethods ();
View Full Code Here

      }
      // Look through methods vector
      e = i.methods ().elements ();
      while (e.hasMoreElements ())
      {
        MethodEntry m = (MethodEntry)e.nextElement ();

        // Look at method type
        SymtabEntry mtype = typeOf (m.type ());
        if (mtype != null && importTypes.contains (mtype))
          if (type == TypeFile || type == StubFile)
          {
            addTo (importList, mtype.name ());
            addTo (importList, mtype.name () + "Holder");
            if (type == StubFile)
              addTo (importList, mtype.name () + "Helper");
          }
        checkForArrays (mtype, importTypes, importList);
        // <d42256> Print import lines for globals constants and constants
        // within global interfaces.
        if (type == StubFile)
          checkForBounds (mtype, importTypes, importList);

        // Look through exceptions
        Enumeration exEnum = m.exceptions ().elements ();
        while (exEnum.hasMoreElements ())
        {
          ExceptionEntry ex = (ExceptionEntry)exEnum.nextElement ();
          if (importTypes.contains (ex))
          {
            addTo (importList, ex.name ());
            addTo (importList, ex.name () + "Helper"); // <d59063>
          }
        }

        // Look through parameters
        Enumeration parms = m.parameters ().elements ();
        while (parms.hasMoreElements ())
        {
          ParameterEntry parm = (ParameterEntry)parms.nextElement ();
          SymtabEntry parmType = typeOf (parm.type ());
          if (importTypes.contains (parmType))
View Full Code Here

    Vector init = ((ValueEntry)entry).initializers ();
    if (init != null)
    {
      for (int i = 0; i < init.size (); i++)
      {
        MethodEntry element = (MethodEntry) init.elementAt (i);
        element.valueMethod (true); //tag value method if not tagged previously
        ((MethodGen24) element.generator ()).defaultFactoryMethod (symbolTable, element, stream);
      }
    }
  } // writeFactoryMethods
View Full Code Here

    // Write the methods
    int realI = 0;
    for (int i = 0; i < methodList.size (); ++i)
    {
      MethodEntry method = (MethodEntry)methodList.elementAt (i);
      if (!localStub) {
      ((MethodGen)method.generator ()).stub (this.i.name(), isAbstract, symbolTable, method, stream, realI);
      } else {
      ((MethodGen)method.generator ()).localstub (symbolTable, method, stream, realI, this.i);
      }
      if (method instanceof AttributeEntry && !((AttributeEntry)method).readOnly ())
        realI += 2;
      else
        ++realI;
View Full Code Here

        AttributeEntry element = (AttributeEntry)contained;
        ((AttributeGen24)element.generator ()).abstractMethod (symbolTable, element, stream);
      }
      else if (contained instanceof MethodEntry)
      {
        MethodEntry element = (MethodEntry)contained;
        ((MethodGen24)element.generator ()).abstractMethod (symbolTable, element, stream);
      }
      else
      {
        // Generate the type referenced by the typedef.
        if (contained instanceof TypedefEntry)
View Full Code Here

          // Write the method case statements
          int realI = 0;
          for (int i = 0; i < methodList.size (); ++i)
          {
            MethodEntry method = (MethodEntry)methodList.elementAt (i);
            ((MethodGen)method.generator ()).dispatchSkeleton (symbolTable, method, stream, realI);
            if (method instanceof AttributeEntry && !((AttributeEntry)method).readOnly ())
              realI += 2;
            else
              ++realI;
          }
View Full Code Here

    int count = -1;
    Enumeration e = methodList.elements ();
    while (e.hasMoreElements ())
    {
      MethodEntry method = (MethodEntry)e.nextElement ();
      if (method instanceof AttributeEntry)
      {
        stream.println ("    _methods.put (\"_get_" + Util.stripLeadingUnderscores (method.name ()) + "\", new java.lang.Integer (" + (++count) + "));");
        if (!((AttributeEntry)method).readOnly ())
          stream.println ("    _methods.put (\"_set_" + Util.stripLeadingUnderscores (method.name ()) + "\", new java.lang.Integer (" + (++count) + "));");
      }
      else
        stream.println ("    _methods.put (\"" + Util.stripLeadingUnderscores (method.name ()) + "\", new java.lang.Integer (" + (++count) + "));");
    }
    stream.println ("  }");
    stream.println ();
  } // writeMethodTable
View Full Code Here

  protected void writeMethods ()
  {
      int realI = 0;
      for (int i = 0; i < methodList.size (); ++i)
          {
              MethodEntry method = (MethodEntry)methodList.elementAt (i);
              ((MethodGen)method.generator ()).skeleton
                  (symbolTable, method, stream, realI);
              if (method instanceof AttributeEntry &&
                  !((AttributeEntry)method).readOnly ())
                  realI += 2;
              else
View Full Code Here

    while (e.hasMoreElements ())
    {
      SymtabEntry contained = (SymtabEntry)e.nextElement ();
      if (contained instanceof MethodEntry)
      {
        MethodEntry element = (MethodEntry)contained;
        ((MethodGen)element.generator ()).interfaceMethod (symbolTable, element, stream);
      }
      else
        if ( !(contained instanceof ConstEntry))
          contained.generate (symbolTable, stream);
    }
View Full Code Here

TOP

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

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.