Examples of Nsset


Examples of org.apache.flex.abc.semantics.Nsset

                    return new Name(superName.getKind(), superName.getQualifiers(), null);
                }
                else if (isAttributeIdentifier())
                {
                    return new Name(ABCConstants.CONSTANT_QnameA,
                            new Nsset(new Namespace(ABCConstants.CONSTANT_PackageNs)), "*");
                }
                else if (isTypeRef())
                {
                    //  null means ANY_TYPE
                    return null;
View Full Code Here

Examples of org.apache.flex.abc.semantics.Nsset

     * @param propName  the Name of the property to generate a hidden name for
     * @return          the Name of the hidden property that will actually store the value
     */
    static Name getBackingPropertyName(Name propName)
    {
        return new Name(CONSTANT_Qname, new Nsset(bindablePrivateNamespace), propName.getBaseName());
    }
View Full Code Here

Examples of org.apache.flex.abc.semantics.Nsset

     * @param propName  the Name of the property to generate a hidden name for
     * @return          the Name of the hidden property that will actually store the value
     */
    static Name getBackingPropertyName(Name propName, String suffix)
    {
        return new Name(CONSTANT_Qname, new Nsset(bindablePrivateNamespace), propName.getBaseName() + suffix);
    }
View Full Code Here

Examples of org.apache.flex.abc.semantics.Nsset

        ASScope scope = getASScope(iNode);
        if (scope == null)
            return null;

        Set<INamespaceDefinition> namespaceSet = scope.getNamespaceSet(project);
        Nsset nsSet = convertSetINamespaceToNsset(namespaceSet);
        return nsSet;       
    }
View Full Code Here

Examples of org.apache.flex.abc.semantics.Nsset

        ASScope scope = getASScope(iNode);
        if (scope == null)
            return null;

        Set<INamespaceDefinition> namespaceSet = scope.getNamespaceSetForSuper(project, superDef);
        Nsset nsSet = convertSetINamespaceToNsset(namespaceSet);
        return nsSet;       
    }
View Full Code Here

Examples of org.apache.flex.abc.semantics.Nsset

        {
            Namespace aetNamespace = ((NamespaceDefinition)namespace).getAETNamespace();
            ns_set.add(aetNamespace);
        }

        return new Nsset(ns_set);
    }
View Full Code Here

Examples of org.apache.flex.abc.semantics.Nsset

               
        ASProjectScope projectScope = (ASProjectScope)project.getScope();
        IDefinition vectorDef = projectScope.findDefinitionByName(IASLanguageConstants.Vector_qname);
        Name vectorName = ((ClassDefinition)vectorDef).getMName(project);
        Name typeName = ((TypeDefinitionBase)type).getMName(project);
        Nsset nsSet = new Nsset(new Namespace(ABCConstants.CONSTANT_PackageNs));
        Name indexName = new Name(ABCConstants.CONSTANT_MultinameL, nsSet, null);
       
        if (getProject().getTargetSettings().getMxmlChildrenAsData())
        {
            context.addInstruction(OP_getlex, typeName); // push the type so decoders have a hint
View Full Code Here

Examples of org.apache.flex.abc.semantics.Nsset

            // 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);
                }
            }
            else
            {
                namespaceSet = null;
                nameKind = isAttributeIdentifier() ? CONSTANT_RTQnameA : CONSTANT_RTQname;
            }

            return new Name(nameKind, namespaceSet, getName());
        }

        Name name = null;

        if (isMemberRef())
        {
            ExpressionNodeBase baseExpr = getBaseExpression();
            if (baseExpr != null)
            {
                // Handle the case where we look like a member expression, but the base expression is really
                // a reference to a package.  For example 'a.b.c.Foo' where a.b.c is a known package name.
                // This needs to generate a QName with a.b.c as the qualifier.
                if (baseIsPackage())
                {
                    String packageName = baseExpr.computeSimpleReference();
                    Workspace workspace = (Workspace)project.getWorkspace();
                    INamespaceReference qualifier = workspace.getPackageNamespaceDefinitionCache().get(packageName, false);

                    return new Name(isAttributeIdentifier() ? CONSTANT_QnameA : CONSTANT_Qname,
                            new Nsset(qualifier.resolveAETNamespace(project)), getName());
                }

                Set<INamespaceDefinition> namespaceSet = null;
                IDefinition baseType = baseExpr.resolveType(project);
View Full Code Here

Examples of org.apache.flex.abc.semantics.Nsset

     * @return the AET Name
     */
    private static Name makeName(Set<INamespaceDefinition> namespaceSet, String name, boolean isAttr)
    {
        int nameKind = isAttr ? CONSTANT_MultinameA : CONSTANT_Multiname;
        Nsset nsSet = SemanticUtils.convertSetINamespaceToNsset(namespaceSet);
        Name n = new Name(nameKind, nsSet, name);
        return n;
    }
View Full Code Here

Examples of org.apache.flex.abc.semantics.Nsset

        bodyInstructionList.addInstruction(ABCConstants.OP_newobject, entryCount);
        bodyInstructionList.addInstruction(ABCConstants.OP_returnvalue);

        Name getContentsMethodName = new Name(ABCConstants.CONSTANT_Qname,
                new Nsset(classGen.getProtectedNamespace()), "getContent");

        //Create getContents method
        classGen.addITraitsMethod(getContentsMethodName, Collections.<Name> emptyList(),
                new Name(IASLanguageConstants.Object), Collections.<Object> emptyList(),
                false, false, true, bodyInstructionList);
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.