Package nexj.core.meta

Examples of nexj.core.meta.Selector


            if (isLazy() && sym != Symbol._OID)
            {
               load();
            }

            Selector sel = m_metaclass.findSelector(sym.toString());
            Member member = (sel == null) ? null : sel.findMember(nArgCount - 1);

            if (member == null)
            {
               Object value = Undefined.VALUE;
View Full Code Here


            m_context.setTransient(bTransient);

            Object[] arguments = invocation.getArguments();
            Metaclass metaclass = metadata.getMetaclass(tobj.getClassName());
            Selector selector = metaclass.getSelector(sEventName);
            Member member;
            int nArgCount;

            if (arguments != null)
            {
               nArgCount = arguments.length;
               member = selector.getMember(nArgCount);

               if (member.isStatic() && tobj.getValueCount() != 0)
               {
                  throw new RequestException("err.rpc.requestTO");
               }
            }
            else
            {
               nArgCount = tobj.getValueCount();
               member = selector.findMember(0);

               if (member == null || member.isStatic())
               {
                  member = selector.getMember(nArgCount);

                  if (!member.isStatic())
                  {
                     throw new RequestException("err.rpc.argCount",
                        new Object[]{member.getName(), metaclass.getName()});
View Full Code Here

    * @param bStatic The event being searched for must be static (false == must be non-static).
    * @return The best matching event or null if no valid match.
    */
   protected Event findEvent(Metaclass meta, String sEvent, boolean bStatic)
   {
      Selector selector = meta.getSelector(sEvent);

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

      for (int i = selector.getMaxArgCount(); i >= 0; --i)
      {
         Member member = selector.findMember(i);

         if (!(member instanceof Event) || member.isStatic() != bStatic)
         {
            continue;
         }
View Full Code Here

      assert meta != null;

      for (Iterator/*<Selector>*/ selItr = meta.getSelectorIterator(); selItr.hasNext();)
      {
         boolean bStarted = false;
         Selector selector = (Selector)selItr.next();

         for (Iterator/*<Member>*/ memItr = selector.getMemberIterator(); memItr.hasNext();)
         {
            Member member = (Member)memItr.next();

            if (!(member instanceof Event) ||
                bStatic != member.isStatic() ||
View Full Code Here

   {
      int nCount = 0;

      for (Iterator/*<Selector>*/ selItr = meta.getSelectorIterator(); selItr.hasNext();)
      {
         Selector selector = (Selector)selItr.next();
         Node resource = null;
         int nChildCount = 1;

         for (Iterator/*<Member>*/ memItr = selector.getMemberIterator(); memItr.hasNext();)
         {
            Member member = (Member)memItr.next();

            if (!(member instanceof Event) || bStatic != member.isStatic())
            {
View Full Code Here

TOP

Related Classes of nexj.core.meta.Selector

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.