Package org.apache.flex.abc.semantics

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


         *  Generate the runtime name appropriate to this qualifier/name combination.
         *  @return the runtime name appropriate to this qualifier/name combination.
         */
        public Name generateName()
        {
            Name result;

            if ( this.compileTimeQualifier != null )
            {
                result = this.compileTimeQualifier;
            }
            else if ( this.runtimeQualifier != null && this.runtimeName != null )
            {
                result = new Name(CONSTANT_RTQnameL, null, null);
            }
            else
            {
                //  Last valid combination generates a RTQname.
                assert(this.runtimeQualifier != null && this.compileTimeName != null) : "Unknown runtime name configuration: " + this.toString();

                result = new Name(CONSTANT_RTQname, null, this.compileTimeName.getBaseName());
            }

            return result;
        }
View Full Code Here


     * or "i0" for an instance initialzier method) into a Name
     * of type Qname with the special private MXML namespace.
     */
    private static Name createMXMLPrivateName(String baseName)
    {
        return new Name(CONSTANT_Qname, MXML_PRIVATE_NAMESPACE_SET, baseName);
    }
View Full Code Here

        // Event handlers all have one parameter, whose type is determined by
        // the [Event] metadata that declared the event.
        // This type was stored in the EventDefinition
        // that the MXMLEventSpecifierNode refers to.
        EventDefinition eventDefinition = (EventDefinition)eventNode.getDefinition();
        Name eventTypeName = eventDefinition.getTypeReference().getMName(
            project, (ASScope)eventDefinition.getContainingScope());
        Vector<Name> paramTypes = new Vector<Name>();
        paramTypes.add(eventTypeName);
        mi.setParamTypes(paramTypes);
       
View Full Code Here

        MethodInfo mi = new MethodInfo();
       
        mi.setMethodName(handlerName);
       
        ITypeDefinition type = vectorNode.getType();
        Name typeName = ((TypeDefinitionBase)type).getMName(project);
       
        Vector<Name> paramTypes = new Vector<Name>();
        paramTypes.add(IMXMLTypeConstants.NAME_ARRAY);
        mi.setParamTypes(paramTypes);
       
View Full Code Here

        if (stateDependentNodes==null)
            return;
   
        FlexProject project = getProject();
        String deferredInstanceFromFunctionClass = project.getDeferredInstanceFromFunctionClass();
        Name deferredInstanceFromFunctionName = project.getDeferredInstanceFromFunctionName();

        if (!(classDefinition.isInstanceOf("mx.core.IStateClient2", project)))
        {
            final IResolvedQualifiersReference stateClient2Reference = ReferenceFactory.packageQualifiedReference(
                    this.getProject().getWorkspace(),
                    "mx.core.IStateClient2");
            final Name stateClient2Name = stateClient2Reference.getMName();

            IReference[] implementedInterfaces = classDefinition.getImplementedInterfaceReferences();
            IReference[] newInterfaces = null;
            Name[] newNames = null;
            if (implementedInterfaces != null)
View Full Code Here

                FunctionDefinition funcDef = (FunctionDefinition)SemanticUtils.findProperty(classDefinition.getContainedScope(),
                        "generateMXMLAttributes",
                        getProject(), false);
                if (funcDef != null)
                {
                    Name funcName = ((FunctionDefinition)funcDef).getMName(getProject());
                    ctor_insns.addInstruction(OP_getlocal0);          
                    ctor_insns.addAll(mxmlPropertiesInsns);
                    ctor_insns.addInstruction(OP_callpropvoid, new Object[] {funcName, 1 });
                }
            }
View Full Code Here

    // TODO Can we put this in the special MXML private namespace?
    // If not, what happens if there is already a variable with the same name?
    private void createDocumentDescriptorVariable(IMXMLClassDefinitionNode node)
    {
        FlexProject project = getProject();
        Name uiComponentDescriptorName = project.getUIComponentDescriptorClassName();
        addVariableTrait(NAME_DOCUMENT_DESCRIPTOR, uiComponentDescriptorName);
    }
View Full Code Here

        context.startUsing(IL.DESCRIPTOR);
       
        FlexProject project = getProject();
        IClassDefinition instanceClass = node.getClassReference(project);
       
        Name type = ((ClassDefinition)instanceClass).getMName(project);
       
        String id = node instanceof IMXMLInstanceNode ?
                    ((IMXMLInstanceNode)node).getEffectiveID() :
                    null;
       
        // var temp = new UIComponentDescriptor({...});
        // Note: temp is top-of-stack.
        Name uiComponentDescriptorName = project.getUIComponentDescriptorClassName();
        context.addInstruction(OP_findpropstrict, uiComponentDescriptorName);
        pushDescriptorConstructorArgument(type, id, context);
        context.addInstruction(OP_constructprop, new Object[] { uiComponentDescriptorName, 1 });
       
        context.stopUsing(IL.DESCRIPTOR, 0);
View Full Code Here

            final Context parentContext,
            final IMXMLDesignLayerNode childNode)
    {
        assert !childNode.skipCodeGeneration() : "No-op DesignLayer tags can't be added to the parent.";
        parentContext.pushTarget();
        parentContext.addInstruction(OP_getlex, new Name(childNode.getEffectiveID()));
        parentContext.addInstruction(OP_callpropvoid, ADD_LAYER_CALL_OPERANDS);
    }
View Full Code Here

            final Context designLayerContext,
            final IMXMLInstanceNode childInstanceNode)
    {
        assert !designLayerNode.skipCodeGeneration() : "No-op DesignLayer tags shouldn't be emitted.";
        designLayerContext.pushTarget();
        designLayerContext.addInstruction(OP_getlex, new Name(childInstanceNode.getEffectiveID()));
        designLayerContext.addInstruction(OP_swap);
        designLayerContext.addInstruction(OP_setproperty, NAME_DESIGN_LAYER);
    }
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.