Package org.apache.flex.compiler.definitions.references

Examples of org.apache.flex.compiler.definitions.references.IResolvedQualifiersReference


            // without a host component name, there aren't any more checks we
            // can do, so just bail out.
            return;
        }

        IResolvedQualifiersReference hostComponentRef = ReferenceFactory.packageQualifiedReference(project.getWorkspace(), hostComponentClassName);
        ICompilationUnit referencingCU = project.getScope().getCompilationUnitForDefinition(this);
        IDefinition hostComponentDef = hostComponentRef.resolve(project, referencingCU, SIGNATURE);
        if (!(hostComponentDef instanceof IClassDefinition))
        {
            ICompilerProblem problem = new HostComponentClassNotFoundProblem(metaTags[0], hostComponentClassName);
            problems.add(problem);
            // without a host component class definition, there aren't any more checks we
View Full Code Here


    {
        for (IClassDefinition c : classIterable(project, true))
        {
            assert c instanceof ClassDefinition : "IClassDefinition " + c.getBaseName() + "is not a ClassDefinition!";
            ClassDefinition classDef = (ClassDefinition)c;
            IResolvedQualifiersReference factoryRef = classDef.getFactoryClass(project.getWorkspace());
            if (factoryRef != null)
            {
                IDefinition factoryDef = factoryRef.resolve(project, (ASScope)this.getContainingScope(), EXPRESSION, true);
                if (factoryDef instanceof ClassDefinition)
                    return (ClassDefinition)factoryDef;
            }
        }
        return null;
View Full Code Here

            if (hostComponentMetaData.length < 1)
                continue;
            String hostComponentName = getHostComponentClassName(hostComponentMetaData[0]);
            if (hostComponentName == null)
                return null;
            IResolvedQualifiersReference hostComponentRef = ReferenceFactory.packageQualifiedReference(project.getWorkspace(), hostComponentName);
            IDefinition hostComponentDef = hostComponentRef.resolve(project);
            if (!(hostComponentDef instanceof IClassDefinition))
                return null;
            return (IClassDefinition)hostComponentDef;
        }
        return null;
View Full Code Here

     */
    private class ApplicationAndModuleDefinitions
    {
        ApplicationAndModuleDefinitions()
        {
            IResolvedQualifiersReference sparkAppRef = ReferenceFactory.packageQualifiedReference(
                    flexProject.getWorkspace(), IMXMLTypeConstants.SparkApplication);
            IResolvedQualifiersReference haloAppRef = ReferenceFactory.packageQualifiedReference(
                  flexProject.getWorkspace(), IMXMLTypeConstants.HaloApplication);
            IResolvedQualifiersReference iModuleRef = ReferenceFactory.packageQualifiedReference(
                  flexProject.getWorkspace(), IMXMLTypeConstants.IModule);
       
            sparkApplication = resolveType(sparkAppRef);
            haloApplication = resolveType(haloAppRef);
            iModule = resolveType(iModuleRef);
View Full Code Here

   
    private final FlexDelegate delegate;
   
    private ModuleFactoryInfo computeModuleFactoryInfo()
    {
        final IResolvedQualifiersReference moduleFactoryBaseClassReference =
            ReferenceFactory.packageQualifiedReference(flexProject.getWorkspace(), getBaseClassQName());
        final IDefinition moduleFactoryBaseClassDef =
            moduleFactoryBaseClassReference.resolve(flexProject);
        if (!(moduleFactoryBaseClassDef instanceof ClassDefinition))
            return ModuleFactoryInfo.create(Collections.<ICompilerProblem>emptyList()); // TODO make a compiler problem here!
       
        final ClassDefinition moduleFactoryBaseClass =
            (ClassDefinition)moduleFactoryBaseClassDef;
View Full Code Here

                    emitter,
                    generatedRootName,
                    (ClassDefinition)moduleFactoryInfo.moduleFactoryBaseClass,
                    Collections.<Name>emptyList(),
                    classITraitsInit);
            IResolvedQualifiersReference objectReference =
                ReferenceFactory.packageQualifiedReference(project.getWorkspace(),
                    IASLanguageConstants.Object);
           
            // Codegen various methods
            // TODO: Determine whether a override is needed or not depending on the
            // methods in the base class. Same deal for the Create and Info Methods.
            codegenCallInContextMethod(classGen, true);

            final FlexLibraryFrame1Info frame1Info =
                new FlexLibraryFrame1Info(flexProject, emittedCompilationUnits);
           
            // Override the create() and info() methods if we have embedded fonts.
            if (!frame1Info.embeddedFonts.isEmpty())
            {
                codegenCreateMethod(classGen, objectReference.getMName());
                codegenInfoMethod(classGen,
                        IASLanguageConstants.Object,
                        frame1Info,
                        accessibleClassNames,
                        problemCollection);           
View Full Code Here

abstract class FlexFrame1Info
{
    protected FlexFrame1Info(FlexProject flexProject)
    {
        this.flexProject = flexProject;
        IResolvedQualifiersReference resourceBundleRef = ReferenceFactory.packageQualifiedReference(
                flexProject.getWorkspace(), flexProject.getResourceBundleClass());
        resourceBundleDefinition = (ClassDefinition)resourceBundleRef.resolve(flexProject);
       
        // sorted set of resouce bundles
        compiledResourceBundleNames = new TreeSet<String>();
       
        embeddedFonts = new TreeMap<String, FlexFontInfo>();
View Full Code Here

            resolveReferenceToCompilationUnit(delegate.flexVersionReference,
                    projectScope,
                    compilationUnits,
                    problems);
       
        final IResolvedQualifiersReference runtimeDPIProviderRef = delegate.getRuntimeDPIProviderClassReference();
        if (runtimeDPIProviderRef != null)
            resolveReferenceToCompilationUnit(runtimeDPIProviderRef,
                    projectScope,
                    compilationUnits,
                    problems);
View Full Code Here

        IWorkspace workspace = project.getWorkspace();
     
    
        for (String depend : depends)
        {
             IResolvedQualifiersReference ref = ReferenceFactory.packageQualifiedReference(workspace, depend);
             if (ref==null)
             {
                 // TODO: generate compiler problem if we can't resolve these
                 assert false;
                 return false;
             }
             IDefinition def = ref.resolve(project, scope, DependencyType.EXPRESSION, false);
             if (def==null)
             {
                 // TODO: generate compiler problem if we can't resolve these
                 // CMP-886
                 assert false;
View Full Code Here

     * @param isOverride true if the generated method overrides a base class
     * method, false otherwise.
     */
    protected final void codegenCallInContextMethod(ClassGeneratorHelper classGen, boolean isOverride)
    {
        IResolvedQualifiersReference applyReference = ReferenceFactory.resolvedQualifierQualifiedReference(flexProject.getWorkspace(),
                NamespaceDefinition.getAS3NamespaceDefinition(), "apply");

        InstructionList callInContext = new InstructionList();
        callInContext.addInstruction(ABCConstants.OP_getlocal1);
        callInContext.addInstruction(ABCConstants.OP_getlocal2);
        callInContext.addInstruction(ABCConstants.OP_getlocal3);
        callInContext.addInstruction(ABCConstants.OP_callproperty, new Object[] {applyReference.getMName(), 2});
        callInContext.addInstruction(ABCConstants.OP_getlocal, 4);
        Label callInContextReturnVoid = new Label();
        callInContext.addInstruction(ABCConstants.OP_iffalse, callInContextReturnVoid);
        callInContext.addInstruction(ABCConstants.OP_returnvalue);
        callInContext.labelNext(callInContextReturnVoid);
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.definitions.references.IResolvedQualifiersReference

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.