Examples of SwcLibrary


Examples of flex2.compiler.swc.SwcLibrary

                        // to the list of metadata we will preserve in postlink.
                        Source source = l.getUnit().getSource();
                        if (source.isSwcScriptOwner() && !source.isInternal())
                        {
                            SwcScript script = (SwcScript)source.getOwner();
                            SwcLibrary library = script.getLibrary();
                
                            // lots of scripts, but not many swcs, so avoid adding the same metadata
                            // over and over.
                            if (!librariesProcessed.contains(library))
                            {
                                librariesProcessed.add(library);
                                metadata.addAll(library.getMetadata());
                            }
                        }
                    }
                });
                frames.add( f );
View Full Code Here

Examples of flex2.compiler.swc.SwcLibrary

            // for all the libraries in a swc to find external scripts
            for (Iterator<SwcLibrary> swcLibraryIter = swcEntry.getValue().getLibraryIterator();
                 swcLibraryIter.hasNext();)
            {
                SwcLibrary swcLibrary = (SwcLibrary)swcLibraryIter.next();
               
                // loop thru the script in a library and build the list of definitions
                for (Iterator<SwcScript> scriptIter = swcLibrary.getScriptIterator();
                     scriptIter.hasNext();)
                {
                    SwcScript swcScript = (SwcScript)scriptIter.next();

                    for (Iterator<String> defIter = swcScript.getDefinitionIterator(); defIter.hasNext();)
                    {
                        String definition = (String)defIter.next();
                        defMap.put(definition, swcScript);
                    }
                }

                // loop thru the script in a library again and look for external definitions
                for (Iterator<SwcScript> scriptIter = swcLibrary.getScriptIterator();
                     scriptIter.hasNext();)
                {
                    SwcScript swcScript = (SwcScript)scriptIter.next();

                    for (Iterator<String> typeIter = swcScript.getDependencySet().getTypeIterator();
View Full Code Here

Examples of flex2.compiler.swc.SwcLibrary

        }

        // If all the script mod times are equal then apply rules 2 & 3.
        if (allScriptTimesEqual)
        {
          SwcLibrary library = script.getLibrary();
        if (allScriptTimesEqual &&
            library.getDigest(Digest.SHA_256, true) != null)
                {
                    originalScript = script;
                }
                else if (originalScript == null &&
                         library.getSwcCreationTime() < oldestSwcCreationTime)
                {
                    oldestSwcCreationTime = library.getSwcCreationTime();
                    originalScript = script;
                }
        }
      }
     
View Full Code Here

Examples of flex2.compiler.swc.SwcLibrary

       
        // for all the libraries in a swc to find external scripts
        for (Iterator<SwcLibrary> swcLibraryIter = swc.getLibraryIterator();
             swcLibraryIter.hasNext();)
        {
            SwcLibrary swcLibrary = (SwcLibrary)swcLibraryIter.next();
           
            // loop thru the script in a library and build the list of definitions
            for (Iterator<SwcScript> scriptIter = swcLibrary.getScriptIterator();
                 scriptIter.hasNext();)
            {
                SwcScript swcScript = (SwcScript)scriptIter.next();

                for (Iterator<String> defIter = swcScript.getDefinitionIterator(); defIter.hasNext();)
View Full Code Here

Examples of flex2.compiler.swc.SwcLibrary

        Set<String> dependencies = new HashSet<String>(64);
       
        for (Iterator<SwcLibrary> swcLibraryIter = swc.getLibraryIterator();
             swcLibraryIter.hasNext();)
        {
            SwcLibrary swcLibrary = (SwcLibrary)swcLibraryIter.next();
           
            // loop thru the script in a library and build the list of definitions
            for (Iterator<SwcScript> scriptIter = swcLibrary.getScriptIterator();
                 scriptIter.hasNext();)
            {
                SwcScript swcScript = (SwcScript)scriptIter.next();

                for (String dependencyType : dependencyTypes)
View Full Code Here

Examples of org.apache.flex.swc.SWCLibrary

                final String tagName = reader.getName().getLocalPart();
                if (tagName.equals(TAG_LIBRARY))
                {
                    final String path = reader.getAttributeValue(null, ATTR_PATH);
                    currentLibrary = new SWCLibrary(path);
                    swc.addLibrary(currentLibrary);
                }
                else if (tagName.equals(TAG_COMPONENT))
                {
                    String className = reader.getAttributeValue(null, ATTR_CLASS_NAME);
View Full Code Here

Examples of org.apache.flex.swc.SWCLibrary

        ((Target)librarySWFTarget).setLinkageChecker(externalLinkageChecker);
        setLinkageChecker(externalLinkageChecker);
        final ISWF defaultLibrarySWF = librarySWFTarget.build(problems);
       
        // make default library model
        final ISWCLibrary defaultLibrary = new SWCLibrary(LIBRARY_SWF, defaultLibrarySWF);
        swc.addLibrary(defaultLibrary);
   
        // Deal with all the cu's that don't need to be added via addScript
        // save all the add script ones in cuToWrite for the next phase.
        Set<ICompilationUnit> cuToWrite = new HashSet<ICompilationUnit>();
        for (final ICompilationUnit cu : librarySWFTarget.getCompilationUnits())
        {
            if (isLinkageExternal(cu, targetSettings))
            {
                    // don't do anything with these
            }
            //Resource bundles processed uniquely
            else if (cu instanceof ResourceBundleCompilationUnit)
            {
                assert project instanceof FlexProject;
                processResourceBundle((FlexProject)project, (ResourceBundleCompilationUnit)cu,
                            swc, problems);
            }
            else
            {
                // everyone else goes in this list for next step            
                cuToWrite.add(cu);
            }
        }
       
        // remove duplicates and log resulting problems, then add to library
        filterCompilationUnits(cuToWrite, problems);  
        for (final ICompilationUnit cu : cuToWrite)
        {
            defaultLibrary.addScript(createScript(cu, definitionsToBuild));
        }
       
        // Add the generated root class and its dependencies to the list of
        // scripts.
        if (librarySWFTarget.getRootClassName() != null)
        {
            final SWCScript script = new SWCScript();
            script.setName(librarySWFTarget.getRootClassName());
            script.addDefinition(librarySWFTarget.getRootClassName());
            // This class is synthetic and is supposed to be globally
            // unique, so nobody should care what the time stamp is.
            // If we set the time stamp to the current time, then
            // every SWC we make will be slightly different from all other
            // SWCs.
            script.setLastModified(1);

            // add baseclass as an inheritance dependency
            script.addDependency(librarySWFTarget.getBaseClassQName(), DependencyType.INHERITANCE);
            defaultLibrary.addScript(script);
        }
       
        if (librarySWFTarget.getASMetadataNames() != null)
        {
            for (String name : librarySWFTarget.getASMetadataNames())
            {
                defaultLibrary.addNameToKeepAS3MetadataSet(name);
            }
        }

        return defaultLibrarySWF;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.