Package org.apache.flex.compiler.definitions.references

Examples of org.apache.flex.compiler.definitions.references.INamespaceReference


        return scope;
    }

    protected String getNamespaceReferenceAsString()
    {
        INamespaceReference namespaceReference = getNamespaceReference();
        return namespaceReference != null ?
                namespaceReference.toString() :
                INamespaceConstants.internal_;
    }
View Full Code Here


            return false;

        if (node == this)
            return true;

        INamespaceReference namespace = getNamespaceReference();
        if (namespace == null && node.getNamespaceReference() != null)
            return false;
        if (namespace != null && namespace.getBaseName().compareTo(node.getNamespaceReference().getBaseName()) != 0)
        {
            return false;
        }

        if (node.getBaseName().compareTo(getBaseName()) != 0)
View Full Code Here

     * @return true, if the namespaceReference for this definition is some kind of
     * package namespaceReference.
     */
    protected boolean inPackageNamespace()
    {
        INamespaceReference nsRef = getNamespaceReference();
        assert nsRef != null : "All definitions should have a namespaceReference reference!";
        if (nsRef.isPublicOrInternalNamespace())
            return true;
        return false;
    }
View Full Code Here

        // class definition that look like this:
        // public class org.apache.Foo {}
        // out fix for this is to run the string
        // through Multiname.getBaseNameForQName.
        String definitionName = Multiname.getBaseNameForQName(nameNode.computeSimpleReference());
        INamespaceReference namespaceReference = NamespaceDefinition.createNamespaceReference(getASScope(), getNamespaceNode());

        ClassDefinition definition = new ClassDefinition(definitionName, namespaceReference);
        definition.setNode(this);

        fillInModifiers(definition);
View Full Code Here

            {
                // here we have decided that the binding expression is a variable
                IVariableDefinition var = (IVariableDefinition)def;
                if (!var.isStatic())
                {
                    INamespaceReference ns = var.getNamespaceReference();
                    if (ns == NamespaceDefinition.getPublicNamespaceDefinition())
                    {
                        // ok, our variable is public and non-static - let's take it
                        sourceString = def.getBaseName();
                        isSimplePublicProperty = true;
View Full Code Here

            }
           
            else
            {
                // If it's not "internal", then we can use our normal check to find out what it is
                INamespaceReference ns_ref = func_def.getNamespaceReference();
                if ( ns_ref instanceof INamespaceDefinition.ILanguageNamespaceDefinition )
                {
                    isLanguateNS = true;
                }
               
View Full Code Here

    {
        Collection<INamespaceReference> nsrefs = new ArrayList<INamespaceReference>();

        String baseName = getBaseName(node);

        INamespaceReference first = createNamespaceReference(scope, node);
        nsrefs.add(first);
        if( first instanceof IPublicNamespaceDefinition && baseName.equals(INamespaceConstants.public_) )
        {
            // Anything that resolve to the unnanmed namespace won't have multiple namespaces
            if( first != PUBLIC )
View Full Code Here

     *
     * @param db
     */
    protected void fillInNamespaceAndModifiers(DefinitionBase db)
    {
        INamespaceReference namespaceReference = NamespaceDefinition.createNamespaceReference(
                getASScope(), getNamespaceNode(), this.hasModifier(ASModifier.STATIC));

        db.setNamespaceReference(namespaceReference);

        fillInModifiers(db);
View Full Code Here

        else if (parent instanceof IMXMLPropertySpecifierNode && dbnode instanceof IMXMLSingleDataBindingNode)
        {
            IMXMLPropertySpecifierNode psn = (IMXMLPropertySpecifierNode)parent;
            IDefinition d = psn.getDefinition();
            Binding b = host.getInstanceScope().getBinding(d);
            INamespaceReference ns = psn.getDefinition().getNamespaceReference();
            if (ns != NamespaceDefinition.getPublicNamespaceDefinition())
            {
                InstructionList insns = new InstructionList();
                insns.addInstruction(OP_getlocal0);
                insns.addInstruction(OP_getlocal1);
View Full Code Here

     */
    NamespaceDefinition buildDefinition(boolean is_static)
    {
        String definitionName = getName();

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

        ExpressionNodeBase initExpr = getNamespaceURINode();
       
        NamespaceDefinition definition =
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.definitions.references.INamespaceReference

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.