Package org.apache.flex.compiler.internal.scopes

Examples of org.apache.flex.compiler.internal.scopes.TypeScope$StaticPredicate


    {
        ClassDefinition def = new ClassDefinition(name, NamespaceDefinition.getPublicNamespaceDefinition());
        def.setPublic();
        def.setFinal();
        def.setImplicit();
        ASScope scope = new TypeScope(null, def);
        scope.setContainingDefinition(def);
        def.setContainedScope(scope);
        return def;
    }
View Full Code Here


      
        this.project = project;
        this.baseClass = baseClass;
        this.elementType = elementType;
       
        setContainedScope(new TypeScope(null, this));
        setModifier(ASModifier.FINAL);
        setImplicit();
        setNamespaceReference(NamespaceDefinition.getPublicNamespaceDefinition());
    }
View Full Code Here

            scope.addDefinition(definition);

            // The BlockNode inside a ClassNode creates a new ASScope,
            // with the current scope as its parent.
            // This new scope then gets passed down as the current scope.
            TypeScope typeScope = new TypeScope(scope, contentsNode, definition);
            definition.setContainedScope(typeScope);
            definition.setupThisAndSuper();
            definition.buildContingentDefinitions();
            scope = typeScope;
        }
View Full Code Here

        return false;
    }

    private boolean isClassMember(IDefinition nodeDef, IClassNode classNode)
    {
        TypeScope cscope = (TypeScope) classNode.getDefinition()
                .getContainedScope();

        Set<INamespaceDefinition> nsSet = cscope.getNamespaceSet(project);
        Collection<IDefinition> defs = new HashSet<IDefinition>();

        cscope.getAllPropertiesForMemberAccess((CompilerProject) project, defs,
                nsSet);

        Iterator<IDefinition> visiblePropertiesIterator = defs.iterator();
        while (visiblePropertiesIterator.hasNext())
        {
View Full Code Here

            scope = scopeNode != null ? scopeNode.getScope() : null;
        }

        if (scope instanceof TypeScope)
        {
            TypeScope typeScope = (TypeScope)scope;
            if (this instanceof BaseDefinitionNode)
            {
                if (((BaseDefinitionNode)this).hasModifier(ASModifier.STATIC))
                    scope = typeScope.getStaticScope();
                else
                    scope = typeScope.getInstanceScope();
            }
            else
            {
                // Do we need the class or instance scope?
                BaseDefinitionNode bdn = (BaseDefinitionNode)this.getAncestorOfType(BaseDefinitionNode.class);
                if (bdn instanceof ClassNode)
                {
                    // We must be loose code in a class
                    scope = typeScope.getStaticScope();
                }
                else
                {
                    if (bdn != null && bdn.hasModifier(ASModifier.STATIC)
                            // Namespaces are always static
                            || bdn instanceof NamespaceNode)
                        scope = typeScope.getStaticScope();
                    else
                        scope = typeScope.getInstanceScope();
                }
            }
        }
        ASScope asScope = scope instanceof ASScope ? (ASScope)scope : null;
        return asScope;
View Full Code Here

        return false;
    }

    private boolean isClassMember(IDefinition nodeDef, IClassNode classNode)
    {
        TypeScope cscope = (TypeScope) classNode.getDefinition()
                .getContainedScope();

        Set<INamespaceDefinition> nsSet = cscope.getNamespaceSet(project);
        Collection<IDefinition> defs = new HashSet<IDefinition>();

        cscope.getAllPropertiesForMemberAccess((CompilerProject) project, defs,
                nsSet);

        Iterator<IDefinition> visiblePropertiesIterator = defs.iterator();
        while (visiblePropertiesIterator.hasNext())
        {
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.scopes.TypeScope$StaticPredicate

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.