Examples of IClassDefinition


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

    protected final MXMLSpecifierNodeBase createSpecifierNode(MXMLTreeBuilder builder, String specifierName)
    {
        if (TAG_REQUEST.equals(specifierName))
        {
            final FlexProject project = builder.getProject();
            final IClassDefinition classHTTPService = getClassReference(project);
            final IDefinition definitionRequest = project.resolveSpecifier(classHTTPService, TAG_REQUEST);
            if (definitionRequest != null)
            {
                final MXMLHTTPServiceRequestPropertyNode requestPropertyNode = new MXMLHTTPServiceRequestPropertyNode(this);
                requestPropertyNode.setDefinition(definitionRequest);
View Full Code Here

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

    }

    @Override
    public String getName()
    {
        IClassDefinition classDefinition = getContainedClassDefinition();
        // The classDefinition can be null when Component tag is partially written
        // i.e., with no component inside it
        // e.g. <fx:Component></fx:Component>
        return classDefinition != null ? classDefinition.getBaseName() : "";
    }
View Full Code Here

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

                // TODO Add a problem subclass for this.
                ICompilerProblem problem = new MXMLSemanticProblem(childTag);
                builder.addProblem(problem);
            }

            IClassDefinition tagDefinition = (IClassDefinition)tagDef;

            // Check that the class is not final.
            if (tagDefinition.isFinal())
            {
                // TODO Add a problem subclass for this.
                ICompilerProblem problem = new MXMLSemanticProblem(childTag);
                builder.addProblem(problem);
            }
View Full Code Here

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

        reprocessStateDependentNodes(builder);

        // Add the dependency between the class this node defines and its superclass,
        // as expressed by this tag that created this node.
        FlexProject project = builder.getProject();
        IClassDefinition classReference = getClassReference(project);
        String qname = classReference.getQualifiedName();
        builder.addDependency(qname, DependencyType.INHERITANCE);
    }
View Full Code Here

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

            ICompilerProblem problem = new MXMLNotAClassProblem(rootTag, tagDef.getQualifiedName());
            builder.addProblem(problem);
            return;
        }

        IClassDefinition tagDefinition = (IClassDefinition)tagDef;

        // Report a problem if that class is final.
        if (tagDefinition != null && tagDefinition.isFinal())
        {
            ICompilerProblem problem = new MXMLFinalClassProblem(rootTag, tagDef.getQualifiedName());
            builder.addProblem(problem);
            return;
        }

        // Report a problem is that class's constructor has required parameters.
        IFunctionDefinition constructor = tagDefinition.getConstructor();
        if (constructor != null && constructor.hasRequiredParameters())
        {
            ICompilerProblem problem = new MXMLConstructorHasParametersProblem(rootTag, tagDef.getQualifiedName());
            builder.addProblem(problem);
            return;
View Full Code Here

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

    public IDefinition resolveProperty(IClassDefinition classDefinition, String propertyName)
    {
        Iterator<IClassDefinition> classIterator = classDefinition.classIterator(this, true);
        while (classIterator.hasNext())
        {
            IClassDefinition c = classIterator.next();
           
            ASScope classScope = ((ClassDefinition)c).getContainedScope();
            IDefinitionSet definitionSet = classScope.getLocalDefinitionSetByName(propertyName);
            if (definitionSet != null)
            {
View Full Code Here

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

    public IEventDefinition resolveEvent(IClassDefinition classDefinition, String eventName)
    {
        Iterator<IClassDefinition> classIterator = classDefinition.classIterator(this, true);
        while (classIterator.hasNext())
        {
            IClassDefinition c = classIterator.next();
            IEventDefinition eventDefinition = c.getEventDefinition(getWorkspace(), eventName);
            if (eventDefinition != null)
                return eventDefinition;
        }

        return null;
View Full Code Here

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

        Iterator<IClassDefinition> classIterator = classDefinition.classIterator(this, true);

        IWorkspace w = getWorkspace();
        while (classIterator.hasNext())
        {
            IClassDefinition c = classIterator.next();
            IStyleDefinition styleDefinition = c.getStyleDefinition(w, styleName);
            if (styleDefinition != null)
                return styleDefinition;
        }

        return null;
View Full Code Here

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

        IWorkspace w = getWorkspace();

        Iterator<IClassDefinition> classIterator = classDefinition.classIterator(this, true);
        while (classIterator.hasNext())
        {
            IClassDefinition c = classIterator.next();
            IEffectDefinition effectDefinition = c.getEffectDefinition(w, effectName);
            if (effectDefinition != null)
                return effectDefinition;
        }

        return null;
View Full Code Here

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

        ClassNode enclosing_class = (ClassNode) iNode.getAncestorOfType(ClassNode.class);

        if ( enclosing_class != null )
        {
            IClassDefinition super_def = enclosing_class.getDefinition().resolveBaseClass(project);
            if (super_def != null)
            {
                IFunctionDefinition ctor = super_def.getConstructor();

                if (ctor instanceof FunctionDefinition)
                {
                    FunctionDefinition func = (FunctionDefinition)ctor;
                    if (func.getParameters() != null && func.getParameters().length != 0)
                    {
                        ParameterDefinition first_param = func.getParameters()[0];

                        if ( !first_param.hasDefaultValue() && ! first_param.isRest() )
                        {
                            addProblem(new NoDefaultConstructorInBaseClassProblem(iNode, super_def.getBaseName()));
                        }
                    }
                }
            }
        }
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.