Package flex2.compiler.as3.reflect

Examples of flex2.compiler.as3.reflect.TypeTable


                    VariableDefinitionNode variableDefinition = AbstractSyntaxTreeUtil.generatePublicVariable(cx, typeExpression, SKINHOSTCOMPONENT);

                    classDef.statements = nodeFactory.statementList(statementList, variableDefinition);
                   
                   
                    BindableFirstPassEvaluator firstPassEvaluator =
                        (BindableFirstPassEvaluator) unit.getContext().getAttribute(BindableExtension.FIRST_PASS_EVALUATOR_KEY);
                    if (firstPassEvaluator != null)
                      firstPassEvaluator.registerBindableVariable(cx, classDef, variableDefinition);
                }
            }
        }
    }
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

        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

            while ( iterator.hasNext() )
            {
                Entry entry = (Entry) iterator.next();
                String className = (String) entry.getKey();
                GenerativeClassInfo generativeClassInfo = (GenerativeClassInfo) entry.getValue();
                ClassInfo classInfo = typeAnalyzer.getClassInfo(className);
                generativeClassInfo.setClassInfo(classInfo);
            }

            Evaluator secondPassEvaluator = getSecondPassEvaluator(unit, typeAnalyzer, firstPassEvaluator);
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

        //This walks the class hiearchy to insure that the tree has been parsed
        //we need to do this before we use getClassInfo() to make sure we get all the
        //baseclasses' info
        typeAnalyzer.evaluate(context, node);
       
        ClassInfo classInfo = typeAnalyzer.getClassInfo(className);
       
        //Returns a hash of all skin parts, including inherited parts
        Map<String, Boolean> parts = classInfo.getSkinParts(true);
       
       
        if(parts != null && parts.size() > 0)
        {
            NodeFactory nodeFactory = context.getNodeFactory();
View Full Code Here

      currentInfo = (ManagedClassInfo) classMap.get(className);

      if (currentInfo != null)
      {
        ClassInfo classInfo = currentInfo.getClassInfo();

        if (!classInfo.implementsInterface(StandardDefs.PACKAGE_FLASH_EVENTS,
                           GenerativeExtension.IEVENT_DISPATCHER))
        {
          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))
          {
            return null;
          }

          classInfo.addInterfaceMultiName(standardDefs.getDataPackage(), IMANAGED);
        }

        postProcessClassInfo(context, currentInfo);

        if (node.statements != null)
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

    {
        String className = NodeMagic.getClassName(classDef);

        typeAnalyzer.evaluate(cx, classDef);

        ClassInfo classInfo = typeAnalyzer.getClassInfo(className);
        if (classInfo != null && (
            classInfo.definesVariable(identifier) ||
            classInfo.definesFunction(identifier, true) ||
            classInfo.definesGetter(identifier, true) ||
            classInfo.definesSetter(identifier, true)))
        {
            return true;
        }
        return false;
    }
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.