Package org.apache.flex.abc.semantics

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


            case ABCConstants.CONSTANT_Qname:
                INamespaceDefinition ns = getNamespaceReferenceForNamespace(name.getSingleQualifier());
                ref = ReferenceFactory.resolvedQualifierQualifiedReference(workspace, ns, name.getBaseName());
                break;
            case ABCConstants.CONSTANT_Multiname:
                Nsset set = name.getQualifiers();
                if (set.length() != 1)
                {
                    Set<INamespaceDefinition> ns_set = new HashSet<INamespaceDefinition>(set.length());
                    for( Namespace n : set )
                        ns_set.add(getNamespaceReferenceForNamespace(n));
                    ref = ReferenceFactory.multinameReference(workspace, ns_set, name.getBaseName());
                }
                else
View Full Code Here


        // one namespace in their namespace set, interfaces seem
        // to have true multinames with multiple namespaces.
        // For now, just look for the package namespace.
        // Eventually we have to deal with a real multiname.
        String packageName = null;
        Nsset qualifiers = name.getQualifiers();
        if (qualifiers != null)
        {
            for (Namespace namespace : qualifiers)
            {
                if ((namespace.getKind() == ABCConstants.CONSTANT_PackageNs) || (namespace.getKind() == ABCConstants.CONSTANT_PackageInternalNs))
View Full Code Here

            {
                result = n;
            }
            else
            {
                result = new Name(ABCConstants.CONSTANT_Qname, new Nsset(new Namespace(ABCConstants.CONSTANT_PackageNs)), n.getBaseName());
            }
        }
        else
        {
            result = null;
View Full Code Here

    private String nameToString (Name n)
    {
        if (n == null || n.couldBeAnyType())
            return "*";

        Nsset nsset;

        switch (n.getKind())
        {
            case CONSTANT_Qname:
            case CONSTANT_QnameA:
                return qnameToString(n.getSingleQualifier(), n.getBaseName());
            case CONSTANT_Multiname:
            case CONSTANT_MultinameA:
                nsset = n.getQualifiers();
                if (nsset.length() == 1)
                    return qnameToString(nsset.iterator().next(), n.getBaseName());
                else
                    return (nssetToString(nsset) + "::") + n.getBaseName();
            case CONSTANT_RTQname:
            case CONSTANT_RTQnameA:
                return "<error> " + n.toString();
View Full Code Here

    /**
     * Get a String that can be used as the  qualifier for a given Name
     */
    private String nsQualifierForName (Name n)
    {
        Nsset nsset;
        switch (n.getKind())
        {
            case CONSTANT_Qname:
            case CONSTANT_QnameA:
                return nsQualifierForNamespace(n.getSingleQualifier());
            case CONSTANT_Multiname:
            case CONSTANT_MultinameA:
                nsset = n.getQualifiers();
                if (nsset.length() == 1)
                    return nsQualifierForNamespace(nsset.iterator().next());
                break;
            case CONSTANT_RTQname:
            case CONSTANT_RTQnameA:
                break;
            case CONSTANT_MultinameL:
View Full Code Here

                qual = ((NamespaceDefinition)NamespaceDefinition.getDefaultNamespaceDefinition(scope)).getAETNamespace();
        }

        // if we can't figure out the namespaceReference, we can't generate a valid name
        if (qual != null)
            name = new Name(ABCConstants.CONSTANT_Qname, new Nsset(qual), getBaseName());
        return name;
    }
View Full Code Here

        // already called getSkinsParts and collected problems.  This
        // call should get the cached array.
        IMetaTag[] skinParts = classDefinition.findSkinParts(classScope.getProject(), null);
        if (skinParts.length > 0)
        {
            Name var_name = new Name(CONSTANT_Qname, new Nsset(skinPartPrivateNamespace), "skinParts");
            classStaticScope.declareVariableName(var_name);
            ITraitVisitor tv = classStaticScope.traitsVisitor.visitSlotTrait(TRAIT_Var, var_name,
                    ITraitsVisitor.RUNTIME_SLOT, NAME_OBJECT, LexicalScope.noInitializer);
            tv.visitEnd();
View Full Code Here

     * @param ns - the Namespace.
     * @param baseName The unqualified name.
     */
    public Name(Namespace ns, String baseName)
    {
        this(CONSTANT_Qname, new Nsset(ns), baseName, null, null);
    }
View Full Code Here

            Name n = expr.getMName(currentScope.getProject());

            if ( n == null )
            {
                currentScope.addProblem(new CodegenInternalProblem(iNode, "Unable to resove member name: " + iNode.toString()));
                n = new Name(CONSTANT_Qname, new Nsset(new Namespace(CONSTANT_PackageNs, qualifiers)), base_name);
            }

            return currentScope.getBinding(iNode, n, expr.resolve(currentScope.getProject()));
        }

        //else
            currentScope.addProblem(new CodegenInternalProblem(iNode, "Unable to resove to a dotted name: " + iNode.toString()));
            return new Binding(iNode, new Name(CONSTANT_Qname, new Nsset(new Namespace(CONSTANT_PackageNs, qualifiers)), base_name), null);
    }
View Full Code Here

        if ( isNamespace(qualifier) )
        {
            result.addAll(runtime_member_selector);
            //  Extract the URI from the namespace and use it to construct a qualified name.
            NamespaceDefinition ns_def = (NamespaceDefinition)qualifier.getDefinition();
            Name qualified_name = new Name(CONSTANT_MultinameL, new Nsset(ns_def.resolveAETNamespace(currentScope.getProject())), null);
            result.addAll(rhs);
            result.addInstruction(OP_setproperty, qualified_name);
        }
        else
        {
View Full Code Here

TOP

Related Classes of org.apache.flex.abc.semantics.Nsset

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.