Package macromedia.asc.util

Examples of macromedia.asc.util.Namespaces


      if( init_only_view && kind != Tokens.SET_TOKEN )
      {
        return null;
      }
     
      Namespaces hasNamespaces = null;
      int protected_index = -1;
      boolean searched_protected = false;
      boolean matched_protected = false;
        if(names != null)
        {
          int type = Names.getTypeFromKind(kind);
 
          // fail fast for more than one namespace case
          if( !(namespaces.size() > 1 && !names.containsKey(name, type) ) )
          {
            searched_protected = true;
            // For each member of namespaces, see if there is a matching qualifier.
            for (int i = 0, size = namespaces.size(); i < size; ++i)
            {
                ObjectValue qual = namespaces.get(i);
                if (names.containsKey(name, qual, type))
                {
                    if(hasNamespaces == null) { hasNamespaces = new Namespaces(); }
                    hasNamespaces.add(qual);
                    if( qual == this.protected_ns )
                    {
                      matched_protected = true;
                    }
                     
                }
                if( qual == this.protected_ns )
                {
                  protected_index = i;
                }
            }
          }
        }
        // When in init only mode, only set slots defined in this object should be visible.
        // Any slots defined in the base class should not be visible. 
      if( !init_only_view && base_objs != null && search_base_objs)
      {
        Namespaces temp = null;
        if( !searched_protected && protected_ns != null && !matched_protected)
        {
            for (int i = 0, size = namespaces.size(); i < size; ++i)
            {
                if( protected_ns == namespaces.get(i))
View Full Code Here


            System.out.print("\n// +LiteralRegExp");
        }

        if( !node.void_result )
        {
            Namespaces namespaces = new Namespaces();
            namespaces.add(cx.publicNamespace());

            FindProperty("RegExp",namespaces,true/*is_strict*/,true/*is_qualified*/,false/*is_attr*/);
            GetProperty("RegExp",namespaces,true/*is_qualified*/,false/*is_super*/,false/*is_attr*/);
            int endIndex = node.value.lastIndexOf("/");
            int length = node.value.length();
View Full Code Here

        if (debug)
        {
            System.out.print("\n// +LiteralVector");
        }
       
        FindProperty("Vector", new Namespaces(cx.getNamespace("__AS3__.vec")), true/*is_strict*/, false /*is_qualified*/, false /*is_attribute*/);
        node.type.evaluate(cx, this);

        int n_elements = (null == node.elementlist)? 0:node.elementlist.size();
       
        PushNumber(new IntNumberConstant(n_elements), cx.intType().getTypeId());
        InvokeClosure(true /* construct */,1);
       
        if (node.elementlist != null)
        {
          Namespaces elements_nss  = new Namespaces();
          elements_nss.add(cx.publicNamespace());
         
          for (int i = 0, size = node.elementlist.items.size(); i < size; i++)
            {
              Node item = node.elementlist.items.get(i);
              //  Keep the new Vector on the stack
View Full Code Here

                if ( !node.isVoidResult() ) {
                    Dup();
                }
                GetBaseObject(cx.getScopeDepth()-frame.firstInnerScope);
                Swap();
                SetProperty(node.identifier.name, new Namespaces(cx.publicNamespace()), true, false, false, false);
                PopScope();
            }
            else
            if ( node.isVoidResult() ) {
                Pop();
View Full Code Here

        if (cframe.baseclass != null)
        {
            count = pushStaticScopesHelper(cx, cframe.baseclass);
        }

        Namespaces namespaces = new Namespaces();
        namespaces.push_back(cframe.name.ns);

        String name = cframe.name.name;
        FindProperty(name, namespaces, true/*is_strict*/, true/*is_qualified*/, false/*is_attr*/);
        GetProperty(name,namespaces, true/*is_qualified*/, false/*is_super*/, false/*is_attr*/);
        PushScope();
View Full Code Here

    public Value evaluate(Context cx, SuperStatementNode node)
    {
        int scope_depth = cx.getScopes().size();
        ObjectValue iframe = cx.scope(scope_depth-2);
        InstanceBuilder ib = iframe.builder instanceof InstanceBuilder ? (InstanceBuilder) iframe.builder : null;
        Namespaces namespaces = new Namespaces();
        namespaces.add(cx.publicNamespace());

        if( ib.basebui != null )
        {
            LoadThis();
            int size = node.call.args != null ? node.call.args.size() : 0;
View Full Code Here

            System.out.print("\n// +LiteralXML");
        }

        if (!node.void_result)
        {
            Namespaces namespaces = new Namespaces();
            namespaces.push_back(cx.publicNamespace());

            String name;

            if( node.is_xmllist )
            {
View Full Code Here

    }


    public boolean findUnqualified(Context cx, final int flags)
    {
        Namespaces hasNamespaces = null;

        // walk over each ObjectValue and look for our name
        for (ObjectValue obj = this.base; obj != null; obj = obj.proto())
        {
            hasNamespaces = obj.hasNames(cx,getKind(),name,namespaces);

            if (hasNamespaces != null)
            {

                ObjectValue localQualifier = null;
                boolean error_reported = false;

                if( getKind() == SET_TOKEN || getKind() == GET_TOKEN )
                {
                    // If this is a getter or setter verify that there are no corresponding getter/setter
                    // in another of the open namespaces, which would cause an ambiguous reference error at runtime.
                    int opposite_kind = getKind() == SET_TOKEN ? GET_TOKEN : SET_TOKEN;
                    Namespaces hasNamespaces2 = obj.hasNames(cx,opposite_kind,name,namespaces);
                    if (hasNamespaces2 != null)
                    {
                        boolean isOnlyProtected = hasNamespaces.size() == 1 ? hasNamespaces.at(0).isProtected() : false;
                        for( int i = 0; i < hasNamespaces2.size(); i++ )
                        {
                            localQualifier = hasNamespaces2.at(i);
                            // NOTE ignore protected namespaces if hasNamespaces has a protected namespace only
                            if( !error_reported && !(isOnlyProtected && localQualifier.isProtected()) && !hasNamespaces.contains(localQualifier) )
                            {
                                // this will trigger an error below
                                hasNamespaces.add(localQualifier);
View Full Code Here

                return null;
            }

        ObjectValue obj = cx.scope();
        Builder bui = obj.builder;
        Namespaces hasNamespaces = obj.hasNames(cx, GET_TOKEN, ref.name, ref.namespaces);
        if( hasNamespaces == null )
        {
                int var_id, slot_id;
                var_id  = bui.Variable(cx,obj);
                // TODO: does the type of the slot matter?
View Full Code Here

        if( !isTopLevel() )
        {
            cx.error(node.pos(), kError_InvalidConfigLocation);
            return null;
        }
        Namespaces namespaces = new Namespaces();
        ObjectList<String> namespace_ids = new ObjectList<String>();
        // can use public since the ConfigurationScopes won't exist after this evaluator.
        namespaces.push_back(cx.publicNamespace());

        // Get the current object and its builder

        ObjectValue obj = cx.scope();
        Builder     bui = obj.builder;

        int slot_id = -1;

        Namespaces hasNamespaces = obj.hasNames(cx,GET_TOKEN,node.name.name,namespaces);
        if( hasNamespaces == null )
        {
            int var_id;
            var_id  = bui.Variable(cx,obj);
            slot_id = bui.ExplicitVar(cx,obj,node.name.name,namespaces,cx.noType(),-1,-1,var_id);
View Full Code Here

TOP

Related Classes of macromedia.asc.util.Namespaces

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.