Examples of childOfType()


Examples of org.codehaus.groovy.antlr.GroovySourceAST.childOfType()

    // parameters
    GroovySourceAST parametersNode = t.childOfType(GroovyTokenTypes.PARAMETERS);
    if (parametersNode != null && parametersNode.getNumberOfChildren() > 0) {
      GroovySourceAST currentNode = (GroovySourceAST) parametersNode.getFirstChild();
        while (currentNode != null) {
          String parameterTypeName = getTypeNodeAsText(currentNode.childOfType(GroovyTokenTypes.TYPE),"def");
            String parameterName = getText(currentNode.childOfType(GroovyTokenTypes.IDENT));
            SimpleGroovyParameter parameter = new SimpleGroovyParameter(parameterName);
            parameter.setTypeName(parameterTypeName);
           
            executableMemberDoc.add(parameter);
View Full Code Here

Examples of org.codehaus.groovy.antlr.GroovySourceAST.childOfType()

    GroovySourceAST parametersNode = t.childOfType(GroovyTokenTypes.PARAMETERS);
    if (parametersNode != null && parametersNode.getNumberOfChildren() > 0) {
      GroovySourceAST currentNode = (GroovySourceAST) parametersNode.getFirstChild();
        while (currentNode != null) {
          String parameterTypeName = getTypeNodeAsText(currentNode.childOfType(GroovyTokenTypes.TYPE),"def");
            String parameterName = getText(currentNode.childOfType(GroovyTokenTypes.IDENT));
            SimpleGroovyParameter parameter = new SimpleGroovyParameter(parameterName);
            parameter.setTypeName(parameterTypeName);
           
            executableMemberDoc.add(parameter);
           
View Full Code Here

Examples of org.codehaus.groovy.antlr.GroovySourceAST.childOfType()

        GroovySourceAST parametersNode = t.childOfType(PARAMETERS);
        if (parametersNode != null && parametersNode.getNumberOfChildren() > 0) {
            GroovySourceAST currentNode = (GroovySourceAST) parametersNode.getFirstChild();
            while (currentNode != null) {
                String parameterTypeName = getTypeOrDefault(currentNode);
                String parameterName = getText(currentNode.childOfType(IDENT));
                SimpleGroovyParameter parameter = new SimpleGroovyParameter(parameterName);
                parameter.setVararg(currentNode.getType() == VARIABLE_PARAMETER_DEF);
                parameter.setTypeName(parameterTypeName);
                GroovySourceAST modifiers = currentNode.childOfType(MODIFIERS);
                if (modifiers != null) {
View Full Code Here

Examples of org.codehaus.groovy.antlr.GroovySourceAST.childOfType()

        GroovySourceAST parametersNode = t.childOfType(PARAMETERS);
        if (parametersNode != null && parametersNode.getNumberOfChildren() > 0) {
            GroovySourceAST currentNode = (GroovySourceAST) parametersNode.getFirstChild();
            while (currentNode != null) {
                String parameterTypeName = getTypeOrDefault(currentNode);
                String parameterName = getText(currentNode.childOfType(IDENT));
                SimpleGroovyParameter parameter = new SimpleGroovyParameter(parameterName);
                parameter.setTypeName(parameterTypeName);
                GroovySourceAST modifiers = currentNode.childOfType(MODIFIERS);
                if (modifiers != null) {
                    List<GroovySourceAST> annotations = modifiers.childrenOfType(ANNOTATION);
View Full Code Here

Examples of org.codehaus.groovy.antlr.GroovySourceAST.childOfType()

    // parameters
    GroovySourceAST parametersNode = t.childOfType(GroovyTokenTypes.PARAMETERS);
    if (parametersNode != null && parametersNode.getNumberOfChildren() > 0) {
      GroovySourceAST currentNode = (GroovySourceAST) parametersNode.getFirstChild();
        while (currentNode != null) {
          String parameterTypeName = getTypeNodeAsText(currentNode.childOfType(GroovyTokenTypes.TYPE),"def");
            String parameterName = getText(currentNode.childOfType(GroovyTokenTypes.IDENT));
            SimpleGroovyParameter parameter = new SimpleGroovyParameter(parameterName);
            parameter.setTypeName(parameterTypeName);
           
            executableMemberDoc.add(parameter);
View Full Code Here

Examples of org.codehaus.groovy.antlr.GroovySourceAST.childOfType()

    GroovySourceAST parametersNode = t.childOfType(GroovyTokenTypes.PARAMETERS);
    if (parametersNode != null && parametersNode.getNumberOfChildren() > 0) {
      GroovySourceAST currentNode = (GroovySourceAST) parametersNode.getFirstChild();
        while (currentNode != null) {
          String parameterTypeName = getTypeNodeAsText(currentNode.childOfType(GroovyTokenTypes.TYPE),"def");
            String parameterName = getText(currentNode.childOfType(GroovyTokenTypes.IDENT));
            SimpleGroovyParameter parameter = new SimpleGroovyParameter(parameterName);
            parameter.setTypeName(parameterTypeName);
           
            executableMemberDoc.add(parameter);
           
View Full Code Here

Examples of org.codehaus.groovy.antlr.GroovySourceAST.childOfType()

        if (visit == OPENING_VISIT) {
            String importTextWithSlashesInsteadOfDots = extractImportPath(t);

            GroovySourceAST child = t.childOfType(LITERAL_as);
            if (child != null)  {
                String alias = child.childOfType(DOT).getNextSibling().getText();

                child = child.childOfType(DOT);
                importTextWithSlashesInsteadOfDots = recurseDownImportBranch(child);

                aliases.put(alias, importTextWithSlashesInsteadOfDots);
View Full Code Here

Examples of org.codehaus.groovy.antlr.GroovySourceAST.childOfType()

            GroovySourceAST child = t.childOfType(LITERAL_as);
            if (child != null)  {
                String alias = child.childOfType(DOT).getNextSibling().getText();

                child = child.childOfType(DOT);
                importTextWithSlashesInsteadOfDots = recurseDownImportBranch(child);

                aliases.put(alias, importTextWithSlashesInsteadOfDots);
            }
View Full Code Here

Examples of org.codehaus.groovy.antlr.GroovySourceAST.childOfType()

        GroovySourceAST parametersNode = t.childOfType(PARAMETERS);
        if (parametersNode != null && parametersNode.getNumberOfChildren() > 0) {
            GroovySourceAST currentNode = (GroovySourceAST) parametersNode.getFirstChild();
            while (currentNode != null) {
                String parameterTypeName = getTypeOrDefault(currentNode);
                String parameterName = getText(currentNode.childOfType(IDENT));
                SimpleGroovyParameter parameter = new SimpleGroovyParameter(parameterName);
                parameter.setVararg(currentNode.getType() == VARIABLE_PARAMETER_DEF);
                parameter.setTypeName(parameterTypeName);
                GroovySourceAST modifiers = currentNode.childOfType(MODIFIERS);
                if (modifiers != null) {
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.