Package org.apache.flex.compiler.tree.as

Examples of org.apache.flex.compiler.tree.as.IASNode


        if (attributesCount == 0)
            return true;
        //enforce order
        for (int i = 0; i < attributesCount; i++)
        {
            IASNode attribute = getChild(i);
            IASNode otherAttribute = other.getChild(i);
            if (!attribute.equals(otherAttribute))
                return false;
        }

        return true;
View Full Code Here


    {
        int size = getChildCount();
        ArrayList<IMetaTagNode> list = new ArrayList<IMetaTagNode>(size);
        for (int i = 0; i < size; i++)
        {
            IASNode child = getChild(i);
            if (child instanceof IMetaTagNode && ((IMetaTagNode)child).getTagName().compareTo(name) == 0)
            {
                list.add((IMetaTagNode)child);
            }
        }
View Full Code Here

    }

    @Override
    boolean hasContinueLabel(String label)
    {
        IASNode loopNode = controlFlowTreeNode.getParent();
        assert loopNode != null;
        IASNode loopNodeParent = loopNode.getParent();
        if (loopNodeParent == null)
            return false;
        IASNode loopNodeGrandParent = loopNodeParent.getParent();
        if (!(loopNodeGrandParent instanceof LabeledStatementNode))
            return false;
       
        LabeledStatementNode labeledStatementNode = (LabeledStatementNode)loopNodeGrandParent;
        String labeledStatementNodeLabel = labeledStatementNode.getLabel();
View Full Code Here

    }

    @Override
    public IDefinitionNode getDecoratedDefinitionNode()
    {
        IASNode parent = getParent();
        if (parent instanceof MetaTagsNode)
        {
            return ((MetaTagsNode)parent).getDecoratedDefinition();
        }
        return null;
View Full Code Here

     *  Find all the findings that apply to an annotated AST.
     *  @param annotation - the annotated AST.
     */
    ArrayList<UnknownTreeFinding> findMatches(CmcEmitter.JBurgAnnotation annotation)
    {
        IASNode node = annotation.getNode();

        ArrayList<UnknownTreeFinding.Template> candidates = new ArrayList<UnknownTreeFinding.Template>();
        ArrayList<UnknownTreeFinding> result = new ArrayList<UnknownTreeFinding>();

        //  Get the initial set of findings: all findings filed
        //  under this node's ASTNodeID, and all findings filed
        //  under "Unknown" which means "any" in this context.
        if ( UnknownTreeHandlerPatterns.allTemplates.containsKey(node.getNodeID()) )
            candidates.addAll(UnknownTreeHandlerPatterns.allTemplates.get(node.getNodeID()));

        if ( UnknownTreeHandlerPatterns.allTemplates.containsKey(UnknownID) )
            candidates.addAll(UnknownTreeHandlerPatterns.allTemplates.get(UnknownID) );

        for ( UnknownTreeFinding.Template candidate: candidates )
View Full Code Here

   
    @Override
    public FunctionClassification getFunctionClassification()
    {
        IScopedNode scopedNode = getScopeNode();
        IASNode node = scopedNode;
       
        if (node instanceof ICommonClassNode || node.getParent() instanceof ICommonClassNode)
            return FunctionClassification.CLASS_MEMBER;
       
        if (node.getParent() instanceof InterfaceNode)
            return FunctionClassification.INTERFACE_MEMBER;
       
        if (node.getParent() instanceof PackageNode)
            return FunctionClassification.PACKAGE_MEMBER;
       
        if (node instanceof FileNode)// this is an include
            return FunctionClassification.FILE_MEMBER;
       
View Full Code Here

        {
            int argumentscount = arguments.getChildCount();
            variables = new IParameterNode[argumentscount];
            for (int i = 0; i < argumentscount; i++)
            {
                IASNode argument = arguments.getChild(i);
                if (argument instanceof IParameterNode)
                    variables[i] = (IParameterNode)argument;
            }
        }
       
View Full Code Here

    private void setConstructorIfNeeded(FunctionDefinition funcDef)
    {
        if (isConstructor())
        {
            IASNode parentParent = getParent().getParent();
            if( parentParent instanceof ClassNode)
            {
                ClassNode classNode = (ClassNode)parentParent;
                if (classNode.getConstructorNode() == null)
                {
View Full Code Here

     * @return true if this is a package-level function
     */
    public boolean isPackageLevelFunction()
    {
        // regular package-level function
        IASNode parent = getParent();
        IASNode parent2 = parent.getParent();
      
        if (parent instanceof BlockNode && parent2 instanceof PackageNode)
            return true;
       
        // constructor
        if (parent2 != null)
        {
            IASNode parent3 = parent2.getParent();
           
            if (isConstructor() &&
                parent2 instanceof ClassNode &&
                parent3 instanceof BlockNode &&
                parent3.getParent() instanceof PackageNode)
            {
                return true;
            }
        }
       
View Full Code Here

     * @return  The IASNode that produced this FileScope, or null if this Scope did not come from
     *          a source file
     */
    public IASNode getNode()
    {
        IASNode node = null;
            try
            {
                    node = reparseFile();
            }
            catch (InterruptedException ie)
View Full Code Here

TOP

Related Classes of org.apache.flex.compiler.tree.as.IASNode

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.