Package org.cfeclipse.cfml.parser.cfscript

Examples of org.cfeclipse.cfml.parser.cfscript.ASTFunctionDeclaration


   *
     * @param element The element that (should be) the CFScript function
     * @return The formatted name of the funciton + parameters
     */
    private String getCFScriptFunctionName(Object element) {
        ASTFunctionDeclaration function = (ASTFunctionDeclaration)element;
        CFNodeList children = function.getChildNodes();
        StringBuffer nameBuffer = new StringBuffer();
       
        if(children.size() > 0)
        {
            DocItem firstChild = (DocItem)children.get(0);
            if(firstChild instanceof ASTParameterList)
            {
                CFNodeList params = ((ASTParameterList)firstChild).getChildNodes();
                Iterator paramIter = params.iterator();
                while(paramIter.hasNext())
                {
                    Object currentParam = paramIter.next();
                    if(!(currentParam instanceof ASTId))
                    {
                        continue;
                    }
                    if(nameBuffer.length() > 0)
                    {
                        nameBuffer.append(", ");
                    }
                    nameBuffer.append(((ASTId)currentParam).toString());
                   
                }
            }
        }
        nameBuffer.insert(0, function.getItemData() + "(");
        nameBuffer.append(")");

        return nameBuffer.toString();
    }
View Full Code Here

TOP

Related Classes of org.cfeclipse.cfml.parser.cfscript.ASTFunctionDeclaration

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.