Package org.apache.flex.abc.semantics

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


        else
        {
            String uri = tag.getURI();
            if (uri != null)
            {
                return new Name(new Namespace(ABCConstants.CONSTANT_Namespace, uri), tag.getShortName());
            }
            else
            {
                return new Name(tag.getShortName());
            }
View Full Code Here


    private Name getNameForAttr(IMXMLTagAttributeData attr)
    {
        String uri = attr.getURI();
        if (uri != null)
        {
            return new Name(ABCConstants.CONSTANT_QnameA, new Nsset(new Namespace(ABCConstants.CONSTANT_Namespace, uri)), attr.getShortName());
        }
        else
        {
            return new Name(ABCConstants.CONSTANT_QnameA, new Nsset(new Namespace(ABCConstants.CONSTANT_Namespace, "")), attr.getShortName());
        }
    }
View Full Code Here

                    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

    {
        ArrayList<Namespace> ns_set = new ArrayList<Namespace>(namespaceSet.size());

        for (INamespaceDefinition namespace : namespaceSet)
        {
            Namespace aetNamespace = ((NamespaceDefinition)namespace).getAETNamespace();
            ns_set.add(aetNamespace);
        }

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

               
        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

        methodInfo.setReturnType(NAME_VOID);
        methodInfo.setParamNames(ImmutableList.<String> of("factory"));

        final Vector<Name> paramTypes = new Vector<Name>();
        final Name flexModuleFactoryTypeName = new Name(
                new Namespace(ABCConstants.CONSTANT_PackageNs, "mx.core"),
                "IFlexModuleFactory");
        paramTypes.add(flexModuleFactoryTypeName);
        methodInfo.setParamTypes(paramTypes);
       
        final InstructionList methodInstructions = new InstructionList();
View Full Code Here

        return baseName;
    }
   
    private INamespaceReference getNamespaceReference(Name name)
    {
        final Namespace namespace = Iterables.getFirst(name.getQualifiers(), null);
        assert namespace != null;
       
        INamespaceReference namespaceReference =
            (INamespaceReference)scopeBuilder.getNamespaceReferenceForNamespace(namespace);
       
View Full Code Here

        INamespaceDefinition result = namespacesMap.get(ns);
        if (result != null)
            return result;

        // Strip off versioning information.
        Namespace nonVersionedNS = ns.getApiVersion() == ABCConstants.NO_API_VERSION?
            ns :
            new Namespace(ns.getKind(), ns.getName());
        ;

        result = NamespaceDefinition.createNamespaceDefinition(nonVersionedNS);

        assert result != null;
View Full Code Here

        final boolean isInterface = (iinfo.flags & ABCConstants.CONSTANT_ClassInterface) != 0;

        assert iinfo.name.getKind() == ABCConstants.CONSTANT_Qname;
        String typeName = iinfo.name.getBaseName();

        final Namespace namespace = iinfo.name.getSingleQualifier();
        final String namespaceName = namespace.getName();
        final int namespaceKind = namespace.getKind();
        INamespaceReference namespaceRef = null;
        if (namespaceName.length() != 0 &&
            ((namespaceKind == ABCConstants.CONSTANT_PackageNs) || (namespaceKind == ABCConstants.CONSTANT_PackageInternalNs)))
        {
            namespaceRef =
                ((Workspace)workspace).getPackageNamespaceDefinitionCache().get(namespaceName, namespaceKind == ABCConstants.CONSTANT_PackageInternalNs);
        }
        else
        {
            namespaceRef = NamespaceDefinition.createNamespaceDefinition(namespace);
        }

        final TypeDefinitionBase typeDefinition;
        if (isInterface)
        {
            final InterfaceDefinition interfaceDefinition = new InterfaceDefinition(typeName);

            final IReference[] extendedInterfaces = getReferences(iinfo.interfaceNames);
            interfaceDefinition.setExtendedInterfaceReferences(extendedInterfaces);

            setupCastFunction(iinfo, interfaceDefinition);

            typeDefinition = interfaceDefinition;
        }
        else
        {
            String protectedNSURI;
            if (iinfo.hasProtectedNs())
                protectedNSURI = iinfo.protectedNs.getName();
            else
            {
                String classNSURI = namespace.getName();
                protectedNSURI = (classNSURI.isEmpty() ? "" : classNSURI + ":") + typeName;
            }
            NamespaceDefinition.IProtectedNamespaceDefinition protectedNSDefinition = NamespaceDefinition.createProtectedNamespaceDefinition(protectedNSURI);
           
            final ClassDefinition classDefinition = new ClassDefinition(typeName, namespaceRef, protectedNSDefinition);
View Full Code Here

        iinfo = new InstanceInfo();
       
        if(hasProtectedMembers)
        {
            iinfo.flags |= ABCConstants.CONSTANT_ClassProtectedNs;
            iinfo.protectedNs = new Namespace(ABCConstants.CONSTANT_ProtectedNs,
                    className.getSingleQualifier().getName() + ":" +className.getBaseName());
        }
       
        iinfo.interfaceNames = implementedInterfaces.toArray(new Name[implementedInterfaces.size()]);
        iinfo.name = className;
View Full Code Here

TOP

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

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.