Package flex2.compiler.as3.reflect

Examples of flex2.compiler.as3.reflect.TypeTable


    {
    DocumentInfo docInfo = (DocumentInfo) unit.getContext().getAttribute(MxmlCompiler.DOCUMENT_INFO);
        Source source = unit.getSource();

        //  get parsed superclass info - NOTE may be null in case of error
        ClassInfo baseClassInfo = getClassInfo(source, symbolTable, docInfo.getQualifiedSuperClassName());
        if (baseClassInfo == null && docInfo.getQualifiedSuperClassName() != null)
        {
            String qualifiedClassName = NameFormatter.toDot(docInfo.getPackageName(), docInfo.getClassName());
            ThreadLocalToolkit.log(new BaseClassNotFound(qualifiedClassName, docInfo.getQualifiedSuperClassName()), source);
            return;
View Full Code Here


        TypeAnalyzer typeAnalyzer = symbolTable.getTypeAnalyzer();

        program.evaluate(cx, typeAnalyzer);

        ClassInfo classInfo = typeAnalyzer.getClassInfo(className);

        // If classInfo is null, then errors should be reported downstream.
        if (classInfo != null)
        {
            ClassInfo baseClassInfo = classInfo.getBaseClassInfo();

            if (baseClassInfo != null && !FrameworkDefs.bindingManagementVars.isEmpty())
            {
                // NOTE: take the presence of first var to imply the presence of the entire set
                if (baseClassInfo.definesVariable((FrameworkDefs.bindingManagementVars.get(0)).getName()))
                {
                    removeVariables(classDefinitionNode, FrameworkDefs.bindingManagementVars);
                }
            }
        }
View Full Code Here

    {
    DocumentInfo docInfo = (DocumentInfo) unit.getContext().getAttribute(MxmlCompiler.DOCUMENT_INFO);
        Source source = unit.getSource();

        //  get parsed superclass info - NOTE may be null in case of error
        ClassInfo baseClassInfo = getClassInfo(source, symbolTable, docInfo.getQualifiedSuperClassName());
        if (baseClassInfo == null && docInfo.getQualifiedSuperClassName() != null)
        {
            String qualifiedClassName = NameFormatter.toDot(docInfo.getPackageName(), docInfo.getClassName());
            ThreadLocalToolkit.log(new BaseClassNotFound(qualifiedClassName, docInfo.getQualifiedSuperClassName()), source);
            return;
View Full Code Here

                throw new SkinClassNotFound(skinClassName);
            }

            result = new TranscodingResults();
            TypeAnalyzer typeAnalyzer = symbolTable.getTypeAnalyzer();
            ClassInfo skinClassInfo = typeAnalyzer.analyzeClass(null, new MultiName(NameFormatter.toColon(skinClassName)));
            result.generatedCode = generateSource(className, skinClassName, skinClassInfo);
        }
        else
        {
            throw new EmbedRequiresCodegen((String) args.get(Transcoder.ORIGINAL), className);
View Full Code Here

        GenerativeClassInfo.AccessorInfo info = (GenerativeClassInfo.AccessorInfo)entry.getValue();

        if (info.getIsFunction())
        {
          String propName = info.getPropertyName();
          ClassInfo reflectionInfo = classInfo.getClassInfo();

          if (!reflectionInfo.definesGetter(propName, true))
          {
            if (info.getIsExplicit())
            {
              context.localizedWarning2(((GenerativeClassInfo.GetterSetterInfo)info).getSetterPosition(), new BindableOnWriteOnlySetter());
            }
            iter.remove();
          }
          else if (!reflectionInfo.definesSetter(propName, true))
          {
            if (info.getIsExplicit())
            {
              context.localizedWarning2(((GenerativeClassInfo.GetterSetterInfo)info).getGetterPosition(), new BindableOnReadOnlyGetter());
            }
View Full Code Here

                // is not the root then generate a warning.
                if (typeAnalyzer != null)
                {
                    for (QName qName : u.topLevelDefinitions)
                    {
                        ClassInfo info = typeAnalyzer.getClassInfo(qName.toString());
                        checkForModuleOrApplication(standardDefs, typeAnalyzer, info, qName, configuration);
                    }
                }
            }
           
View Full Code Here

                info.extendsClass(StandardDefs.CLASS_APPLICATION) ||
                info.extendsClass(StandardDefs.CLASS_SPARK_APPLICATION))
            {
                // Now test that the root does not extend or implement this class before we generate a
                // warning.
                ClassInfo rootInfo = typeAnalyzer.getClassInfo(configuration.getMainDefinition());
                if (rootInfo != null &&
                    !rootInfo.implementsInterface(qName.getNamespace(), qName.getLocalPart()) &&
                    !rootInfo.extendsClass(qName.toString()))
                {
                    ThreadLocalToolkit.getLogger().log(new CompiledAsAComponent(qName.toString(),
                                                       configuration.getMainDefinition()));
                }
            }
View Full Code Here

    if(!processComments)
    {
        asc.addCompilerExtension(new BindableExtension(gendir, mxmlConfiguration.getGenerateAbstractSyntaxTree(), false));
    }
   
    asc.addCompilerExtension(new DataBindingExtension(gendir, mxmlConfiguration.showBindingWarnings(),
                              mxmlConfiguration.getGenerateAbstractSyntaxTree(),
                                                          ascConfiguration.getDefine()));
    asc.addCompilerExtension(new ManagedExtensionError());
        // asc.addCompilerExtension(new flex2.compiler.util.TraceExtension());
    }
View Full Code Here

    if(!processComments)
    {
        asc.addCompilerExtension(new BindableExtension(gendir, mxmlConfiguration.getGenerateAbstractSyntaxTree(), false));
    }
   
    asc.addCompilerExtension(new DataBindingExtension(gendir, mxmlConfiguration.showBindingWarnings(),
                              mxmlConfiguration.getGenerateAbstractSyntaxTree(),
                                                          ascConfiguration.getDefine()));
    asc.addCompilerExtension(new ManagedExtensionError());
        // asc.addCompilerExtension(new flex2.compiler.util.TraceExtension());
    }
View Full Code Here

        {
          currentInfo.setNeedsToImplementIEventDispatcher(true);

          MultiName multiName = new MultiName(StandardDefs.PACKAGE_FLASH_EVENTS,
                            GenerativeExtension.IEVENT_DISPATCHER);
          InterfaceInfo interfaceInfo = typeAnalyzer.analyzeInterface(context, multiName, classInfo);

          // interfaceInfo will be null if IEventDispatcher was not resolved.
          // This most likely means that playerglobal.swc was not in the
          // external-library-path and other errors will be reported, so punt.
          if ((interfaceInfo == null) || checkForExistingMethods(context, node, classInfo, interfaceInfo))
          {
            return null;
          }

          classInfo.addInterfaceMultiName(StandardDefs.PACKAGE_FLASH_EVENTS,
                                                    GenerativeExtension.IEVENT_DISPATCHER);
        }

        if (!classInfo.implementsInterface(standardDefs.getDataPackage(), IMANAGED))
        {
          currentInfo.setNeedsToImplementIManaged(true);

                    // Don't be tempted to check for mx.core.IUID here, because
                    // analyzeInterface() sets up the inheritance for downstream
                    // consumers and if we only add IUID to the inheritance, then
                    // the check for IManaged in the enclosing if statement will fail.
          MultiName multiName = new MultiName(standardDefs.getDataPackage(), IMANAGED);
          InterfaceInfo interfaceInfo = typeAnalyzer.analyzeInterface(context, multiName, classInfo);

          // interfaceInfo will be null if IManaged was not resolved.
          // This most likely means that fds.swc was not in the
          // library-path and other errors will be reported, so punt.
          if ((interfaceInfo == null) || checkForExistingMethods(context, node, classInfo, interfaceInfo))
View Full Code Here

TOP

Related Classes of flex2.compiler.as3.reflect.TypeTable

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.