Examples of INamespaceDefinition


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

        try
        {
            final ASFileScope fileScope = new ASFileScope(getProject().getWorkspace(), null);

            Multiname mname = Multiname.crackDottedQName(getProject(), qname);
            INamespaceDefinition packageNS = Iterables.getOnlyElement(mname.getNamespaceSet());

            final ClassDefinition classDefinition = new ClassDefinition(mname.getBaseName(),
                    (INamespaceReference)packageNS);
            fileScope.addDefinition(classDefinition);
View Full Code Here

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

     * @param problems a list of problems to report errors to
     */
    public void validateClassImplementsAllMethods(ICompilerProject project, ClassDefinition cls, Collection<ICompilerProblem> problems)
    {
        // Interface methods must be implemented by public methods
        INamespaceDefinition publicNs = NamespaceDefinition.getPublicNamespaceDefinition();
        ASScope classScope = cls.getContainedScope();

        for (IDefinitionSet defSet : this.getContainedScope().getAllLocalDefinitionSets())
        {
            for (int i = 0, l = defSet.getSize(); i < l; ++i)
View Full Code Here

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

        fileScope.addDefinition(packageDefinition);
       
        for(IDefinition def : definitions)
        {
            Multiname mname = Multiname.crackDottedQName(getProject(), def.getQualifiedName());
            INamespaceDefinition packageNS = Iterables.getOnlyElement(mname.getNamespaceSet());

            ClassDefinition classDefinition = new ClassDefinition(mname.getBaseName(), (INamespaceReference)packageNS);
            IReference baseClass = ReferenceFactory.packageQualifiedReference(getProject().getWorkspace(), getFlexProject().getResourceBundleClass());
            classDefinition.setBaseClassReference(baseClass);
            classDefinition.setExcludedClass();
View Full Code Here

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

     * @return A {@link ResolvedQualifiersReference}.
     */
    public static IResolvedQualifiersReference packageQualifiedReference(
            IWorkspace workspace, String packageName, String baseName, boolean includeInternal)
    {
        INamespaceDefinition packagePublicNS =
                ((Workspace)workspace).getPackageNamespaceDefinitionCache().get(packageName, false);
        ImmutableSet.Builder<INamespaceDefinition> namespaceSetBuilder =
                new ImmutableSet.Builder<INamespaceDefinition>().add(packagePublicNS);
        if (includeInternal)
        {
            INamespaceDefinition packageInternalNS =
                    ((Workspace)workspace).getPackageNamespaceDefinitionCache().get(packageName, true);
            namespaceSetBuilder.add(packageInternalNS);
        }
        ImmutableSet<INamespaceDefinition> namespaceSet = namespaceSetBuilder.build();
        return new ResolvedQualifiersReference(namespaceSet, baseName);
View Full Code Here

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

            return ref;

        switch( name.getKind() )
        {
            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
                {
                    INamespaceDefinition singleNS = getNamespaceReferenceForNamespace(name.getSingleQualifier());
                    ref = ReferenceFactory.resolvedQualifierQualifiedReference(workspace, singleNS, name.getBaseName());
                }
                break;
            case ABCConstants.CONSTANT_TypeName:
                // If we ever support more than Vector, we'll need to harden this code against loops
View Full Code Here

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

     * @return A {@link INamespaceReference} that wraps the specified
     * {@link Namespace}.
     */
    public INamespaceDefinition getNamespaceReferenceForNamespace(Namespace ns)
    {
        INamespaceDefinition result = namespacesMap.get(ns);
        if (result != null)
            return result;

        // Strip off versioning information.
        Namespace nonVersionedNS = ns.getApiVersion() == ABCConstants.NO_API_VERSION?
View Full Code Here

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

            typeDefinition = classDefinition;
        }

       
        final INamespaceDefinition namespaceReference = getNamespaceReferenceForNamespace(namespace);
       
        typeDefinition.setNamespaceReference((INamespaceReference)namespaceReference);

        if (!isSealed)
            typeDefinition.setDynamic();
View Full Code Here

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

            return true;

        if( this.extraNamespace != null && nsRef == this.extraNamespace )
            return true;

        INamespaceDefinition namespace = definition.resolveNamespace(project);
        if( namespaceSet.contains(namespace) )
            return true;
        else if( (extraNamespace != null) && ((namespace == extraNamespace) || (extraNamespace.equals(namespace))))
            return true;
View Full Code Here

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

        INamespaceReference[] usedNamespaces = this.getUsedNamespaces();
        if (usedNamespaces != null)
        {
            for (INamespaceReference usedNamespaceReference : usedNamespaces)
            {
                INamespaceDefinition usedNamespace = usedNamespaceReference.resolveNamespaceReference(compilerProject);
                if (usedNamespace != null)
                    result.add(usedNamespace);
            }
        }
View Full Code Here

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

                else
                {
                    containingScope = getInstanceScope();
                    if (!needsProtected)
                    {
                        INamespaceDefinition protectedNameSpace = owningType.getProtectedNamespaceReference();
                        needsProtected = (protectedNameSpace != null) && (protectedNameSpace.equals(definition.getNamespaceReference()));
                    }
                }
                ((DefinitionBase)definition).setContainingScope(containingScope);

            }
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.