Class ASTDirective

  • All Implemented Interfaces:
    net.sourceforge.pmd.lang.ast.impl.GenericNode<VtlNode>, net.sourceforge.pmd.lang.ast.impl.javacc.JjtreeNode<VtlNode>, net.sourceforge.pmd.lang.ast.Node, net.sourceforge.pmd.lang.ast.TextAvailableNode, VtlNode, net.sourceforge.pmd.reporting.Reportable

    public final class ASTDirective
    extends net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode<net.sourceforge.pmd.lang.velocity.ast.AbstractVtlNode,​VtlNode>
    This class is responsible for handling the pluggable directives in VTL.

    For example : #foreach()

    Please look at the Parser.jjt file which is what controls the generation of this class.

    Author:
    Jason van Zyl, Geir Magnusson Jr., Kasper Nielsen
    Version:
    $Id: ASTDirective.java 724825 2008-12-09 18:56:06Z nbubna $
    • Field Summary

      • Fields inherited from class net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode

        id
      • Fields inherited from interface net.sourceforge.pmd.lang.ast.Node

        COORDS_COMPARATOR
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <P,​R>
      R
      acceptVisitor​(net.sourceforge.pmd.lang.ast.AstVisitor<? super P,​? extends R> visitor, P data)  
      protected <P,​R>
      R
      acceptVtlVisitor​(VtlVisitor<? super P,​? extends R> visitor, P data)  
      String getDirectiveName()
      Gets the name of this directive.
      String getXPathNodeName()  
      String literal()  
      • Methods inherited from class net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode

        addChild, compareLocation, enlargeLeft, fitTokensToChildren, getFirstToken, getImage, getLastToken, getTextRegion, insertChild, jjtClose, jjtOpen, setFirstToken, setImage, setLastToken, toString
      • Methods inherited from class net.sourceforge.pmd.lang.ast.impl.AbstractNode

        children, firstChild, getChild, getIndexInParent, getNumChildren, getParent, getUserMap, remove, removeChildAtIndex, setChild, setParent
      • Methods inherited from interface net.sourceforge.pmd.lang.ast.impl.GenericNode

        ancestors, ancestorsOrSelf, asStream, children, descendants, descendantsOrSelf, getChild, getFirstChild, getLastChild, getNextSibling, getParent, getPreviousSibling
      • Methods inherited from interface net.sourceforge.pmd.lang.ast.impl.javacc.JjtreeNode

        getFirstToken, getLastToken, tokens
      • Methods inherited from interface net.sourceforge.pmd.lang.ast.Node

        ancestors, children, compareLocation, descendants, firstChild, getAstInfo, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getImage, getIndexInParent, getLanguageVersion, getNumChildren, getReportLocation, getRoot, getTextDocument, getUserMap, getXPathAttributesIterator, hasImageEqualTo, isFindBoundary
      • Methods inherited from interface net.sourceforge.pmd.lang.ast.TextAvailableNode

        getOriginalText, getText, getTextRegion
    • Method Detail

      • acceptVtlVisitor

        protected <P,​R> R acceptVtlVisitor​(VtlVisitor<? super P,​? extends R> visitor,
                                                 P data)
      • getDirectiveName

        public String getDirectiveName()
        Gets the name of this directive.
        Returns:
        The name of this directive.
      • getXPathNodeName

        public String getXPathNodeName()
        Specified by:
        getXPathNodeName in interface net.sourceforge.pmd.lang.ast.Node
      • acceptVisitor

        public final <P,​R> R acceptVisitor​(net.sourceforge.pmd.lang.ast.AstVisitor<? super P,​? extends R> visitor,
                                                 P data)
        Specified by:
        acceptVisitor in interface net.sourceforge.pmd.lang.ast.Node
      • literal

        public String literal()