Package org.apache.flex.compiler.internal.definitions

Examples of org.apache.flex.compiler.internal.definitions.NamespaceDefinition$UserDefinedNamespaceReference


            if (qual != null )
            {
                if( qual.getNamespaceCount() == 1 )
                {
                    // Qualifier resolved to 1 namespace, so we can emit a QName
                    NamespaceDefinition ns = (NamespaceDefinition)qual.getFirst();
                    nameKind = isAttributeIdentifier() ? CONSTANT_QnameA : CONSTANT_Qname;
                    if (isMemberRef())
                    {
                        ExpressionNodeBase baseExpr = getBaseExpression();
                        if (baseExpr instanceof LanguageIdentifierNode &&
                                ((LanguageIdentifierNode)baseExpr).getKind() == LanguageIdentifierKind.SUPER)
                        {
                            // If we're a super expression, adjust the namespace in case it's the protected namespace
                            IDefinition baseType = baseExpr.resolveType(project);
                            Set<INamespaceDefinition> nsset = ImmutableSet.of((INamespaceDefinition)ns);
                            nsset = scope.adjustNamespaceSetForSuper(baseType, nsset);
                            // We only started with 1 namespace, so we know that's how many we have
                            ns = (NamespaceDefinition)nsset.iterator().next();
                        }
                    }
                    // If the qualifier is the any namespace, then we want a null nsset
                    // instead of a nsset of length 1, with a null namespace in it.
                    if( ns == NamespaceDefinition.getAnyNamespaceReference() )
                        namespaceSet = null;
                    else
                        namespaceSet = new Nsset(ns.getAETNamespace());
                }
                else
                {
                    // qualifier resolve to 1+ namespaces, so emit a multiname
                    Set<INamespaceDefinition> nsset = qual.getNamespaceSet();
View Full Code Here


            insns.addInstruction(OP_getproperty, var_name);
            insns.addInstruction(OP_returnvalue);

            FunctionGeneratorHelper.generateFunction(classScope.getEmitter(), mi, insns);

            NamespaceDefinition nd = (NamespaceDefinition)classDefinition.getProtectedNamespaceReference();
            Name func_name = new Name(nd.getAETNamespace(), "skinParts");
            tv = classScope.traitsVisitor.visitMethodTrait(TRAIT_Getter, func_name, 0, mi);
            tv.visitAttribute(Trait.TRAIT_OVERRIDE, Boolean.TRUE);
            tv.visitEnd();

        }
View Full Code Here

            // Namespace definitions inside of a class are always static
            if (scope.getContainingDefinition() instanceof IClassDefinition)
                is_static = true;

            NamespaceDefinition definition = buildDefinition(is_static);
            setDefinition(definition);
            scope.addDefinition(definition);
        }

        super.analyze(set, scope, problems);
View Full Code Here

        INamespaceReference namespaceReference = NamespaceDefinition.createNamespaceReference(
                getASScope(), getNamespaceNode(), is_static);

        ExpressionNodeBase initExpr = getNamespaceURINode();
       
        NamespaceDefinition definition =
                NamespaceDefinition.createNamespaceDefintionDirective(namespaceReference, getScope(), definitionName, getURILiteral(), initExpr != null ? initExpr.computeNamespaceReference() : null);
        definition.setNode(this);

        fillInModifiers(definition);
        fillInMetadata(definition);

        return definition;
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.internal.definitions.NamespaceDefinition$UserDefinedNamespaceReference

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.