Examples of ITypeDefinition


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

    void initializeDefaultProperty(MXMLTreeBuilder builder, IVariableDefinition defaultPropertyDefinition,
            List<IMXMLUnitData> contentUnits)
    {
        FlexProject project = builder.getProject();

        ITypeDefinition typeDef = defaultPropertyDefinition.resolveType(project);
       
        String typeName = typeDef.getQualifiedName();
        typeName = typeName.replace(".<", DOT_LESS_THAN_ESCAPED);
        typeName = typeName.replace(">", GREATER_THAN_ESCAPED);
        type = (ITypeDefinition)resolveElementType(typeName, project);
       
        // Set the location of the implicit array node
View Full Code Here

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

        // dependent on the compilation unit for the class or interface specified by 'type'.
        if (type != null)
        {
            FlexProject project = builder.getProject();

            ITypeDefinition t = type;
            // for Vectors we want to create a dependency on the element type - we don't
            // need a dependency on Vector itself, as it's builtin
            while (t instanceof AppliedVectorDefinition)
            {
                t = ((AppliedVectorDefinition)t).resolveElementType(project);
            }

            String qname = t.getQualifiedName();
            builder.addDependency(qname, DependencyType.EXPRESSION);
            if (getID() != null)
                builder.addDependency(qname, DependencyType.SIGNATURE);
        }
        else
View Full Code Here

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

        // runtime illegal write to const checks, so combine in this if block.
        if ( target.isLocal() || target.slotIdIsSet() )
        {
            if ( target.getDefinition() != null )
            {
                ITypeDefinition tgtType = target.getDefinition().resolveType(currentScope.getProject());
                ITypeDefinition srcType = null;

                srcType = SemanticUtils.resolveRHSTypeOfAssignment(currentScope.getProject(), iNode);

                if (
                    tgtType != null &&
View Full Code Here

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

                result.addInstruction(OP_dup);

            // Coerce to the right type if the local has a type anno
            if ( lvalue.getDefinition() != null )
            {
                ITypeDefinition type = lvalue.getDefinition().resolveType(currentScope.getProject());

                if ( type != ClassDefinition.getAnyTypeClassDefinition() )
                {
                    coerce(result, type);
                }
View Full Code Here

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

        }

        // the parent of an embed node is always a variable
        final VariableNode variableNode = (VariableNode)iNode.getParent();
        final IVariableDefinition variableDef = (IVariableDefinition)variableNode.getDefinition();
        final ITypeDefinition variableType = variableDef.resolveType(currentScope.getProject());
        final String typeName = variableType.getQualifiedName();
       
        InstructionList result;
        if ("Class".equals(typeName))
        {
            result = createInstructionList(iNode);
View Full Code Here

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

        // AIR (and not FlashPlayer) requires a coerce_a at the end of each clause if the results will be
        // assigned to a Dictionary.
        IBinaryOperatorNode binaryNode = (IBinaryOperatorNode)iNode.getAncestorOfType(IBinaryOperatorNode.class);
        boolean isBracketAssign = binaryNode != null && binaryNode.getOperator() == OperatorType.ASSIGNMENT
            && binaryNode.getLeftOperandNode() instanceof DynamicAccessNode;
        ITypeDefinition destinationType = null;
        if (isBracketAssign)
            destinationType = binaryNode.getLeftOperandNode().resolveType(currentScope.getProject());
        TernaryOperatorNode ternaryNode = (TernaryOperatorNode)iNode;
       
        IExpressionNode valueNode;       
View Full Code Here

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

    {
        InstructionList result = null;

        if ( binding.getDefinition() != null )
        {
            ITypeDefinition typezo = binding.getDefinition().resolveType(currentScope.getProject());
           
            ICompilerProject project = currentScope.getProject();

            if ( typezo == project.getBuiltinType(BuiltinType.STRING) )
            {
View Full Code Here

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

    }

    @Override
    public ITypeDefinition resolveType(ICompilerProject project)
    {
        ITypeDefinition type = null;
       
        switch (kind)
        {
            case THIS:
            {
View Full Code Here

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

     * @param cache
     * @return
     */
    private ITypeDefinition resolveThisType(ICompilerProject project)
    {
        ITypeDefinition thisType = null;

        Context ctx = getContext();

        switch (ctx)
        {
View Full Code Here

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

    /**
     * Calculate the type of a super expression
     */
    private ITypeDefinition resolveSuperType(ICompilerProject project)
    {
        ITypeDefinition superType = null;
        Context ctx = getContext();

        // 'super' is invalid in any other context
        if (ctx == Context.INSTANCE_CONTEXT)
        {
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.