Examples of IQualifiers


Examples of org.apache.flex.compiler.definitions.IQualifiers

        if (isPartOfPackageReference())
            return null;

        IDefinition result = null;
        final String name = getName();
        IQualifiers qualifier = null;

        if (isQualifiedRef())
        {
            qualifier = resolveQualifier(project);
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IQualifiers

        {
            // If we're a qualified name, and the qualifier resolves to a compile
            // time constant, return a QName
            // otherwise emit a RTQname - the CG will have to take care of generating the code to
            // evaluate the qualifier and place it on the stack.
            IQualifiers qual = resolveQualifier(project);

            Nsset namespaceSet;
            int nameKind;

            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();
                    nameKind = isAttributeIdentifier() ? CONSTANT_MultinameA : CONSTANT_Multiname;

                    namespaceSet = SemanticUtils.convertSetINamespaceToNsset(nsset);
                }
            }
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IQualifiers

     * @return The IQualifiers the qualifier resolved to, or null if it
     * was unresolved.  A single qualifier may resolve to multiple namespaces
     */
    private IQualifiers resolveQualifier(ICompilerProject project)
    {
        IQualifiers qual = null;

        ExpressionNodeBase qualExpr = getQualifierExpression();
        if (qualExpr != null)
        {
            if( qualExpr instanceof NamespaceIdentifierNode )
View Full Code Here

Examples of org.apache.flex.compiler.definitions.IQualifiers

     * @param project   The project to resolve things in
     * @return          The qualifier(s) that this namespace node referred to
     */
    public IQualifiers resolveQualifier(ICompilerProject project )
    {
        IQualifiers result = null;
        if( isBuiltinNamespaceIdentifier() )
        {
            ASScope scope = getASScope();
            // Only do the multi namespace processing if there is a decent chance
            // we will end up with many namespaces
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.