Examples of IDefinitionSet


Examples of org.apache.flex.compiler.scopes.IDefinitionSet

        // Get the variable definition for the id from the class scope.
        MXMLClassDefinitionNode classDefinitionNode =
                (MXMLClassDefinitionNode)getClassDefinitionNode();
        IClassDefinition classDefinition = classDefinitionNode.getClassDefinition();
        ASScope classScope = (ASScope)classDefinition.getContainedScope();
        IDefinitionSet definitionSet = classScope.getLocalDefinitionSetByName(id);
        int n = definitionSet.getSize();
        for (int i = 0; i < n; i++)
        {
            IDefinition definition = definitionSet.getDefinition(i);
            if (definition instanceof IVariableDefinition)
                return (IVariableDefinition)definition;
        }
        return null;
    }
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IDefinitionSet

        while (classIterator.hasNext())
        {
            IClassDefinition c = classIterator.next();
           
            ASScope classScope = ((ClassDefinition)c).getContainedScope();
            IDefinitionSet definitionSet = classScope.getLocalDefinitionSetByName(propertyName);
            if (definitionSet != null)
            {
                IDefinition winner = null;
               
                int n = definitionSet.getSize();
                for (int i = 0; i < n; i++)
                {
                    IDefinition definition = definitionSet.getDefinition(i);
                   
                    // Look for vars and setters, but not getters.
                    // Remember that getters and setters implement IVariableDefinition!
                    if (definition instanceof IVariableDefinition &&
                        !(definition instanceof IGetterDefinition))
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IDefinitionSet

     * compilation
     */
    public boolean addConditionalCompilationNamespace(NamespaceNode node)
    {
        initConfigStructures();
        IDefinitionSet name = configScope.getASScope().getLocalDefinitionSetByName(node.getName());
        if (name != null)
        {
            //allow redefinition of config namespace - matches ASC
            return true;
        }
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IDefinitionSet

    public boolean addConfigConstNode(ConfigConstNode node)
    {
        initConfigStructures();
        node.normalize(true);
        IdentifierNode configNamespaceNode = (IdentifierNode)node.getNamespaceNode();
        IDefinitionSet set = configScope.getASScope().getLocalDefinitionSetByName(configNamespaceNode.getName());
        if (set == null)
        {
            IIdentifierNode namespaceNode = (IdentifierNode)node.getNamespaceNode();
            ICompilerProblem problem = new UndefinedConfigNamespaceProblem(namespaceNode, namespaceNode.getName());
            addProblem(problem);
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IDefinitionSet

    }

    @Override
    public IDefinitionSet getLocalDefinitionSetByName(String name)
    {
        IDefinitionSet d = typeScope.getLocalDefinitionSetByName(name);
        if (d != null)
        {
            // Return a definition set that will filter the real definition set based
            // on static modifiers.
            d = new FilteredDefinitionSet(d, getScopeKind());
            if (d.isEmpty())
                d = null; // If we filtered out everything, just return null
        }

        return d;
    }
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IDefinitionSet

    public LargeDefinitionStore(SmallDefinitionStore8 store)
    {
        int n = store.getCapacity();
        for (int i = 0; i < n; i++)
        {
            IDefinitionSet definitionSet = store.getDefinitionSet(i);
            if (definitionSet != null)
            {
                int m = definitionSet.getSize();
                for (int j = 0; j < m; j++)
                {
                    IDefinition definition = definitionSet.getDefinition(j);
                    add(definition);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IDefinitionSet

    @Override
    public boolean add(IDefinition definition)
    {
        // Look in the map for a definition set with the same base name.
        String baseName = definition.getBaseName();
        IDefinitionSet oldDefinitionSet = get(baseName);
       
        // Add the new definition to the old set. This may create a new set.
        IDefinitionSet newDefinitionSet =
            SmallDefinitionStoreBase.addDefinitionToSet(oldDefinitionSet, definition);
       
        // If we got a new set, put it into the map.
        if (newDefinitionSet != oldDefinitionSet)
            put(baseName, newDefinitionSet);
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IDefinitionSet

    @Override
    public boolean remove(IDefinition definition)
    {
        // Look in the map for a definition set with the same base name.
        String baseName = definition.getBaseName();
        IDefinitionSet oldDefinitionSet = get(baseName);
       
        // If not found, return false to indicate that the definition wasn't found
        // in this store.
        if (oldDefinitionSet == null)
            return false;
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IDefinitionSet

        for (String name : names)
        {
            sb.append(name);
            sb.append('\n');
           
            IDefinitionSet set = getDefinitionSetByName(name);
            int n = set.getSize();
            for (int i = 0; i < n; i++)
            {
                IDefinition d = set.getDefinition(i);
                sb.append("  ");
                sb.append(d.toString());
                sb.append('\n');
            }
        }
View Full Code Here

Examples of org.apache.flex.compiler.scopes.IDefinitionSet

        // If the existing definition set is a SmallDefinitionSet or a LargeDefinitionSet,
        // we can return the same set with the promises replaced by actual definitions.
        // If the existing definition set is a promise acting as its own set-of-size-1,
        // then we have to return a different set (the actual definition acting as its
        // own set-of-size-1.
        IDefinitionSet returnedDefinitionSet = definitionSet;
       
        int n = definitionSet.getSize();
        for (int i = 0; i < n; i++)
        {
            IDefinition definition = definitionSet.getDefinition(i);
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.