Examples of NamespaceDefinition


Examples of org.apache.flex.compiler.internal.definitions.NamespaceDefinition

            //  Try for a compile-time constant value.
            IDefinition val = ((ExpressionNodeBase)iNode).resolve(project);

            if ( val instanceof NamespaceDefinition )
            {
                NamespaceDefinition ns = (NamespaceDefinition)val;
                result = ns.resolveAETNamespace(project);
            }
            else if( val instanceof ConstantDefinition )
            {
                ConstantDefinition cd = (ConstantDefinition)val;
                result = cd.resolveValueFrom(project, (NodeBase)iNode);
View Full Code Here

Examples of org.apache.flex.compiler.internal.definitions.NamespaceDefinition

            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();
View Full Code Here

Examples of org.apache.flex.compiler.internal.definitions.NamespaceDefinition

            insns.addInstruction(OP_getproperty, var_name);
            insns.addInstruction(OP_returnvalue);

            FunctionGeneratorHelper.generateFunction(classScope.getEmitter(), mi, insns);

            NamespaceDefinition nd = (NamespaceDefinition)classDefinition.getProtectedNamespaceReference();
            Name func_name = new Name(nd.getAETNamespace(), "skinParts");
            tv = classScope.traitsVisitor.visitMethodTrait(TRAIT_Getter, func_name, 0, mi);
            tv.visitAttribute(Trait.TRAIT_OVERRIDE, Boolean.TRUE);
            tv.visitEnd();

        }
View Full Code Here

Examples of org.apache.flex.compiler.internal.definitions.NamespaceDefinition

            // Namespace definitions inside of a class are always static
            if (scope.getContainingDefinition() instanceof IClassDefinition)
                is_static = true;

            NamespaceDefinition definition = buildDefinition(is_static);
            setDefinition(definition);
            scope.addDefinition(definition);
        }

        super.analyze(set, scope, problems);
View Full Code Here

Examples of org.apache.flex.compiler.internal.definitions.NamespaceDefinition

        INamespaceReference namespaceReference = NamespaceDefinition.createNamespaceReference(
                getASScope(), getNamespaceNode(), is_static);

        ExpressionNodeBase initExpr = getNamespaceURINode();
       
        NamespaceDefinition definition =
                NamespaceDefinition.createNamespaceDefintionDirective(namespaceReference, getScope(), definitionName, getURILiteral(), initExpr != null ? initExpr.computeNamespaceReference() : null);
        definition.setNode(this);

        fillInModifiers(definition);
        fillInMetadata(definition);

        return definition;
View Full Code Here

Examples of org.jfree.layouting.namespace.NamespaceDefinition

            throw new NullPointerException("URI must not be null");
        }

        for (int i = 0; i < namespaces.length; i++)
        {
            final NamespaceDefinition definition = namespaces[i];
            if (uri.equals(definition.getURI()))
            {
                return definition;
            }
        }
        return null;
View Full Code Here

Examples of org.jfree.layouting.namespace.NamespaceDefinition

            throw new NullPointerException("URI must not be null");
        }

        for (int i = 0; i < namespaces.length; i++)
        {
            final NamespaceDefinition definition = namespaces[i];
            if (uri.equals(definition.getURI()))
            {
                return definition;
            }
        }
        return null;
View Full Code Here

Examples of org.jfree.layouting.namespace.NamespaceDefinition

      if (attributeMap == null || attributeMap.isEmpty())
      {
        continue;
      }

      final NamespaceDefinition nsDef = target.getNamespaceByUri(namespace);
      final Iterator attributeIt = attributeMap.entrySet().iterator();
      while (attributeIt.hasNext())
      {
        final Map.Entry entry = (Map.Entry) attributeIt.next();
        final String key = (String) entry.getKey();
View Full Code Here

Examples of org.jfree.layouting.namespace.NamespaceDefinition

    if (list.isNamespaceUriDefined(uri))
    {
      return;
    }

    final NamespaceDefinition def = getNamespaceByUri(uri);
    if (def != null)
    {
      final String prefix = def.getPreferredPrefix();
      if (writer.isNamespacePrefixDefined(prefix) == false &&
          list.isNamespacePrefixDefined(prefix) == false)
      {
        list.addNamespaceDeclaration (prefix, uri);
      }
View Full Code Here

Examples of org.jfree.layouting.namespace.NamespaceDefinition

      }

      final NamespaceDefinition[] namespaces = createDefaultNameSpaces();
      for (int i = 0; i < namespaces.length; i++)
      {
        final NamespaceDefinition definition = namespaces[i];
        feed.startMetaNode();
        feed.setMetaNodeAttribute("type", "namespace");
        feed.setMetaNodeAttribute("definition", definition);
        feed.endMetaNode();
      }
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.