Package flex2.compiler.util

Examples of flex2.compiler.util.QName


                    ManagedClassInfo classInfo = getClassOfManagedMember(varNode);

                    if (classInfo != null)
                    {
                        setPropertyMode(context, metaDataNode, classInfo,
                            new QName(NodeMagic.getUserNamespace(varNode), NodeMagic.getVariableName(varNode)));
                    }
                    else
                    {
                        context.localizedWarning2(metaDataNode.pos(), new ManagedOnNonClassError());
                    }
                }
                else if (metaDataNode.def instanceof FunctionDefinitionNode)
                {
                    FunctionDefinitionNode node = (FunctionDefinitionNode)metaDataNode.def;
                    ManagedClassInfo classInfo = getClassOfManagedMember(node);

                    if (classInfo != null)
                    {
                        setPropertyMode(context, metaDataNode, classInfo,
                            new QName(NodeMagic.getUserNamespace(node), NodeMagic.getFunctionName(node)));
                    }
                    else
                    {
                        context.localizedWarning2(metaDataNode.pos(), new ManagedOnNonClassError());
                    }
                }
                else
                {
                    context.localizedWarning2(metaDataNode.pos(), new ManagedOnNonClassError());
                }
            }
        }

        //  now prune manual mode properties
        if (managedClasses != null)
        {
             for (Iterator<ManagedClassInfo> iter = managedClasses.values().iterator(); iter.hasNext(); )
             {
                 ManagedClassInfo info = iter.next();
                 Map accessors = info.getAccessors();

                 if (accessors != null)
                 {
                     for (Iterator propIter = accessors.entrySet().iterator(); propIter.hasNext(); )
                     {
                         Map.Entry entry = (Map.Entry)propIter.next();
                         QName propQName = (QName)entry.getKey();
                         int mode = info.getPropertyMode(propQName);

                         if (mode == ManagedClassInfo.MODE_MANUAL)
                         {
                             propIter.remove();
View Full Code Here


                         Map<Object, Integer> pool,
                         OutputStream out) throws IOException
  {
    for (Iterator<QName> i = swcDefSignatureChecksums.keySet().iterator(); i.hasNext(); )
    {
      QName qName = i.next();
      Long ts = swcDefSignatureChecksums.get(qName);
      writeU32(out, addQName(pool, qName));
      writeLong(out, ts.longValue());
    }
  }
View Full Code Here

      }
      else if (value instanceof QName)
      {
        writeU8(out, 4);

        QName qName = (QName) value;
        writeU32(out, addString(pool, qName.getNamespace()));
        writeU32(out, addString(pool, qName.getLocalPart()));
      }
      else if (value instanceof MultiName)
      {
        writeU8(out, 5);
View Full Code Here

                StylesContainer rootStylesContainer = u.getStylesContainer();

                // If the backgroundColor wasn't specified inline, go looking for it in CSS.
                if ((u.swfMetaData == null) || (u.swfMetaData.getValue("backgroundColor") == null))
                {
                    QName qName = u.topLevelDefinitions.last();
                   
                    if (qName != null)
                    {
                        String def = qName.toString();
                        lookupBackgroundColor(stylesContainer, rootStylesContainer, u.styleName,
                                              NameFormatter.toDot(def), symbolTable, configuration);
                    }
                }

                if (rootStylesContainer != null)
                {
                    // Swap in root's Logger, so warnings get associated correctly.
                    Logger originalLogger = ThreadLocalToolkit.getLogger();
                    ThreadLocalToolkit.setLogger(u.getSource().getLogger());
                    rootStylesContainer.validate(symbolTable, nameMappings, u.getStandardDefs(),
                                                 compilerConfiguration.getThemeNames(), null);
                    ThreadLocalToolkit.setLogger(originalLogger);
                }

                Source source = u.getSource();

                // Now that we're done validating the StyleContainer,
                // we can disconnect the root's logger.
                source.disconnectLogger();

                // Clear the root's path resolver, so the
                // CompilationUnit doesn't hold onto the global path
                // resolver, which has strong references to things
                // like the SourcePath, which we want freed up at the
                // end of a compilation.  All the other
                // CompilationUnit's have their PathResolver cleared
                // when they reach the ABC state.  We hold onto the
                // root's path resolver until now, because of the
                // styles
                source.setPathResolver(null);

                // C: we don't need the styles container anymore
                u.setStylesContainer(null);
            }
            else if (generatedLoaderClass && !u.getSource().isInternal() && !u.getSource().isSwcScriptOwner())
            {
                // Check if the source is a module or an application. If it is and we know it
                // is not the root then generate a warning.
                if (typeAnalyzer != null)
                {
                    for (QName qName : u.topLevelDefinitions)
                    {
                        ClassInfo info = typeAnalyzer.getClassInfo(qName.toString());
                        checkForModuleOrApplication(standardDefs, typeAnalyzer, info, qName, configuration);
                    }
                }
            }
           
View Full Code Here

    writeU32(out, u.inheritanceHistory.size());

    for (MultiName multiName : u.inheritanceHistory.keySet())
    {
      QName qName = u.inheritanceHistory.get(multiName);

      writeU32(out, addMultiName(pool, multiName));
      writeU32(out, addQName(pool, qName));
    }

    writeU32(out, u.typeHistory.size());

    for (MultiName multiName : u.typeHistory.keySet())
    {
      QName qName = u.typeHistory.get(multiName);

      writeU32(out, addMultiName(pool, multiName));
      writeU32(out, addQName(pool, qName));
    }

    writeU32(out, u.namespaceHistory.size());

    for (MultiName multiName : u.namespaceHistory.keySet())
    {
      QName qName = u.namespaceHistory.get(multiName);

      writeU32(out, addMultiName(pool, multiName));
      writeU32(out, addQName(pool, qName));
    }

    writeU32(out, u.expressionHistory.size());

    for (MultiName multiName : u.expressionHistory.keySet())
    {
      QName qName = u.expressionHistory.get(multiName);

      writeU32(out, addMultiName(pool, multiName));
      writeU32(out, addQName(pool, qName));
    }
View Full Code Here

                    configuration.setRootClassName(u.loaderClass);
                }

                // set the last top level definition as the main definition.  Setting the last one allows
                // for Embed classes at the top of the file
                QName qName = u.topLevelDefinitions.last();

                if (qName != null)
                {
                    String def = qName.toString();
                    configuration.setMainDefinition(def);
                    u.getContext().setAttribute("mainDefinition", def);

          // i.e. isApplication... need loader class for styles.
          // We also need styles for an AS file that subclasses Application or Module.
View Full Code Here

        break;
      case 3: // byte[]
        pool[i] = readBytes(readU32());
        break;
      case 4: // QName
        pool[i] = new QName((String) pool[readU32()], (String) pool[readU32()]);
        break;
      case 5: // MultiName
        pool[i] = new MultiName((String[]) pool[readU32()], (String) pool[readU32()]);
        break;
      case 6: // MetaData
View Full Code Here

  {
    int size = readU32();
   
    for (int i = 0; i < size; i++)
    {
      QName qName = (QName) pool[readU32()];
      long ts = readLong();
      if (swcDefSignatureChecksums != null) swcDefSignatureChecksums.put(qName, new Long(ts));
    }

    return true;
View Full Code Here

      size = readU32(in);
      for (int i = 0; i < size; i++)
      {
        MultiName mName = (MultiName) pool[readU32(in)];
        QName qName = (QName) pool[readU32(in)];
        u.inheritanceHistory.put(mName, qName);
        u.inheritance.add(qName);
      }

      size = readU32(in);
      for (int i = 0; i < size; i++)
      {
        MultiName mName = (MultiName) pool[readU32(in)];
        QName qName = (QName) pool[readU32(in)];
        u.typeHistory.put(mName, qName);
        u.types.add(qName);
      }

      size = readU32(in);
      for (int i = 0; i < size; i++)
      {
        MultiName mName = (MultiName) pool[readU32(in)];
        QName qName = (QName) pool[readU32(in)];
        u.namespaceHistory.put(mName, qName);
        u.namespaces.add(qName);
      }

      size = readU32(in);
      for (int i = 0; i < size; i++)
      {
        MultiName mName = (MultiName) pool[readU32(in)];
        QName qName = (QName) pool[readU32(in)];
        u.expressionHistory.put(mName, qName);
        u.expressions.add(qName);
      }

      boolean hasAuxGenerateInfo = readU8(in) == 1;
View Full Code Here

    if (accessorMap == null)
    {
      accessorMap = new LinkedHashMap<QName, AccessorInfo>();
    }

    QName qName = new QName(NodeMagic.getUserNamespace(node), NodeMagic.getVariableName(node));

        VariableInfo variableInfo = new VariableInfo(qName, node, explicit);

        if ((node.attrs != null) && node.attrs.hasAttribute(NodeMagic.STATIC))
        {
View Full Code Here

TOP

Related Classes of flex2.compiler.util.QName

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.