Package macromedia.asc.util

Examples of macromedia.asc.util.Names


        }
    }

  private void FinishTraits(ObjectValue obj, ObjectList<ByteList> traits)
  {
    Names names = obj.builder.getNames();
       
        if (names != null)
        {
          if(Builder.removeBuilderNames)
          //if(false)
          {
            // addSlotTraits/addMethodTraits ignore's the value of the Qualifier so a list of
            // namespaces would suffice although even better to refactor these methods to take
            // one namespace at a time
            Qualifiers q = new Qualifiers();
            for (int i = 0; (i = names.hasNext(i)) != -1; i++)
            {
              q.clear();
              int slotId = names.getSlot(i);
             
                  String name = names.getName(i);         
                  q.put(names.getNamespace(i), 0);

              if(slotId < 1)
                continue;

              Slot s = obj.getSlot(cx, slotId);

                    if (names.getNamespace(i) == ObjectValue.loopLabelNamespace || s == null)
                        continue;
                   
              if(s.declaredBy != obj)
                continue;
             
              if(s instanceof VariableSlot && names.getType(i) != Names.SET_NAMES)
              {
                       addSlotTrait(obj, traits, name, q);
                   }            
             
             
              if(s instanceof MethodSlot)
                   {
                int methodKind = TRAIT_Method;
                if(s.isGetter())
                  methodKind = TRAIT_Getter;
                if(names.getType(i) == Names.SET_NAMES)
                  methodKind = TRAIT_Setter;           
                       addMethodTrait(methodKind, obj, traits, name, q);
                   }
            }
          }
          else
          {
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.VAR_NAMES))
              {
                  // Add trait for multiname var
                  addSlotTrait(obj,traits,n.getKey(), n.getValue());
              }
 
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.METHOD_NAMES))
              {
                  addMethodTrait(TRAIT_Method,obj,traits,n.getKey(), n.getValue());
              }
 
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.GET_NAMES))
              {
                  addMethodTrait(TRAIT_Getter,obj,traits,n.getKey(), n.getValue());
              }
 
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.SET_NAMES))
              {
                  addMethodTrait(TRAIT_Setter,obj,traits,n.getKey(), n.getValue());
              }
          }
        }
View Full Code Here


        // C: Trace.debug??
        // if( debug ) printf("ObjectValue::defineName() name = %s, kind = %s, slot_index = %d\n",name.c_str(),Token::getTokenClassName(kind).c_str(),slot_index);

        if (names == null)
        {
            names = new Names();
        }

        if (this.hasName(cx, kind, name, qualifier) )
        {
            return 0;
View Full Code Here

    }

  public Names getNamesAndCreate()
  {
    if(names == null)
      names = new Names();
    return names;
  }
View Full Code Here

    {
        // if( debug ) printf("ObjectValue::defineName() name = %s, kind = %s, slot_index = %d\n",name.c_str(),Token::getTokenClassName(kind).c_str(),slot_index);

        if (names == null)
        {
            names = new Names();
        }
 
        // for each namespace, add a qualifier with the given slot index
        for (int i = 0, size = namespaces.size(); i < size; i++)
        {
View Full Code Here

        // C: Trace.debug??
        // if( debug ) printf("ObjectValue::defineName() name = %s, kind = %s, slot_index = %d\n",name.c_str(),Token::getTokenClassName(kind).c_str(),slot_index);

        if (names == null)
        {
            names = new Names();
        }

        if (this.hasName(cx, kind, name, qualifier) )
        {
            return 0;
View Full Code Here

    }

  public Names getNamesAndCreate()
  {
    if(names == null)
      names = new Names();
    return names;
  }
View Full Code Here

    {
        // if( debug ) printf("ObjectValue::defineName() name = %s, kind = %s, slot_index = %d\n",name.c_str(),Token::getTokenClassName(kind).c_str(),slot_index);

        if (names == null)
        {
            names = new Names();
        }
 
        // for each namespace, add a qualifier with the given slot index
        for (int i = 0, size = namespaces.size(); i < size; i++)
        {
View Full Code Here

        }
    }

  private void FinishTraits(ObjectValue obj, ObjectList<ByteList> traits)
  {
    Names names = obj.builder.getNames();
       
        if (names != null)
        {
          if(Builder.removeBuilderNames)
          //if(false)
          {
            // addSlotTraits/addMethodTraits ignore's the value of the Qualifier so a list of
            // namespaces would suffice although even better to refactor these methods to take
            // one namespace at a time
            Qualifiers q = new Qualifiers();
            for (int i = 0; (i = names.hasNext(i)) != -1; i++)
            {
              q.clear();
              int slotId = names.getSlot(i);
             
                  String name = names.getName(i);         
                  q.put(names.getNamespace(i), 0);

              if(slotId < 1)
                continue;

              Slot s = obj.getSlot(cx, slotId);

                    if (names.getNamespace(i) == ObjectValue.loopLabelNamespace || s == null)
                        continue;
                   
              if(s.declaredBy != obj)
                continue;
             
              if(s instanceof VariableSlot && names.getType(i) != Names.SET_NAMES)
              {
                       addSlotTrait(obj, traits, name, q);
                   }            
             
             
              if(s instanceof MethodSlot)
                   {
                int methodKind = TRAIT_Method;
                if(s.isGetter())
                  methodKind = TRAIT_Getter;
                if(names.getType(i) == Names.SET_NAMES)
                  methodKind = TRAIT_Setter;           
                       addMethodTrait(methodKind, obj, traits, name, q);
                   }
            }
          }
          else
          {
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.VAR_NAMES))
              {
                  // Add trait for multiname var
                  addSlotTrait(obj,traits,n.getKey(), n.getValue());
              }
 
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.METHOD_NAMES))
              {
                  addMethodTrait(TRAIT_Method,obj,traits,n.getKey(), n.getValue());
              }
 
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.GET_NAMES))
              {
                  addMethodTrait(TRAIT_Getter,obj,traits,n.getKey(), n.getValue());
              }
 
              for( Map.Entry<String, Qualifiers> n : names.entrySet(Names.SET_NAMES))
              {
                  addMethodTrait(TRAIT_Setter,obj,traits,n.getKey(), n.getValue());
              }
          }
        }
View Full Code Here

TOP

Related Classes of macromedia.asc.util.Names

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.