Package org.apache.flex.abc.semantics

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


        }
        else
        {
            il.addInstruction(ABCConstants.OP_getproperty, getNameForTag(tag));
            int index = getIndexOfTag(tag);
            il.addInstruction(ABCConstants.OP_getproperty, new Name(String.valueOf(index)));
        }
    }
View Full Code Here


        else
        {
            il.addInstruction(ABCConstants.OP_getproperty, getNameForTag(tag));
            il.addInstruction(ABCConstants.OP_getlocal1);
            int index = getIndexOfTag(tag);
            il.addInstruction(ABCConstants.OP_setproperty, new Name(String.valueOf(index)));
        }
    }
View Full Code Here

     * code will be in a function that has 1 argument, which is the new value,
     * so we know it's passed in as the first local.
     */
    private void generateSetInstructions(InstructionList il, IMXMLTextData text)
    {
        il.addInstruction(ABCConstants.OP_callproperty, new Object[] {new Name("text"), 0});
        il.addInstruction(ABCConstants.OP_getlocal1);
        int index = getIndexOfText(text);
        il.addInstruction(ABCConstants.OP_setproperty, new Name(String.valueOf(index)));
    }
View Full Code Here

     */
    private Name getNameForTag(IMXMLTagData tag)
    {
        if (tag == rootTag)
        {
            return new Name(parent.getEffectiveID());
        }
        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

        {
            case ANY_TYPE:
            {
                if( isQualifiedExpr(this) || isMemberRef() )
                {
                    Name superName = super.getMName(project);
                    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;
                }
                else
                {
                    //  E4X wildcard operator.
                    return new Name("*");
            }
            }
            case REST:
            {
                // This is a bit hokey, but this ILanguageIdentifierNode is saying
                // that the type of the parameter definition is type "rest" or "...".
                // Since those aren't spelled "Array", we translate to "Array" here.
                return new Name(IASLanguageConstants.Array);
            }
            default:
            {
                return super.getMName(project);
            }
View Full Code Here

     * @param propName  the Name of the property to generate a hidden name for
     * @return          the Name of the hidden property that will actually store the value
     */
    static Name getBackingPropertyName(Name propName)
    {
        return new Name(CONSTANT_Qname, new Nsset(bindablePrivateNamespace), propName.getBaseName());
    }
View Full Code Here

     * @param propName  the Name of the property to generate a hidden name for
     * @return          the Name of the hidden property that will actually store the value
     */
    static Name getBackingPropertyName(Name propName, String suffix)
    {
        return new Name(CONSTANT_Qname, new Nsset(bindablePrivateNamespace), propName.getBaseName() + suffix);
    }
View Full Code Here

     *  Check a getproperty operation.
     *  @param binding - the Binding which is being fetched.
     */
    public void checkGetProperty(Binding binding)
    {
        Name name = binding.getName();
        assert name != null;

        switch ( name.getKind() )
        {
            case ABCConstants.CONSTANT_QnameA:
            case ABCConstants.CONSTANT_MultinameA:
            case ABCConstants.CONSTANT_MultinameLA:
            case ABCConstants.CONSTANT_RTQnameA:
View Full Code Here

        else
        {
            IDefinition typeDef = utils.getDefinition(typename.getNode());
            if ( !SemanticUtils.isType(typeDef) )
            {
                Name name = typename.getName();
                while ( name != null && name.isTypeName() && name.getTypeNameParameter() != null )
                    name = name.getTypeNameParameter();

                if ( name != null )
                {
                    if ( !name.isTypeName() )
                    {
                        addTypeProblem(typename.getNode(), typeDef, name.getBaseName(), false);
                    }
                    else
                    {
                        //  Render as best able.
                        addTypeProblem(typename.getNode(), typeDef, name.toString(), false);
                    }
                }
            }
        }
       
View Full Code Here

TOP

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

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.