Uses of Interface
org.apache.velocity.runtime.parser.node.Node
Packages that use Node
Package
Description
-
Uses of Node in org.apache.velocity.runtime
Methods in org.apache.velocity.runtime with parameters of type NodeModifier and TypeMethodDescriptionbooleanRuntimeInstance.addVelocimacro(String name, Node macro, List<Macro.MacroArg> macroArgs, Template definingTemplate) Adds a new Velocimacro.booleanRuntimeServices.addVelocimacro(String name, Node macro, List<Macro.MacroArg> macroArgs, Template definingTemplate) Adds a new Velocimacro.static booleanRuntimeSingleton.addVelocimacro(String name, Node macro, List<Macro.MacroArg> macroArgs, Template definingTemplate) Adds a new Velocimacro.booleanVelocimacroFactory.addVelocimacro(String name, Node macroBody, List<Macro.MacroArg> macroArgs, Template definingTemplate) Adds a macro to the factory.booleanVelocimacroManager.addVM(String vmName, Node macroBody, List<Macro.MacroArg> macroArgs, Template definingTemplate, boolean canReplaceGlobalMacro) Adds a VM definition to the cache. -
Uses of Node in org.apache.velocity.runtime.directive
Fields in org.apache.velocity.runtime.directive declared as NodeModifier and TypeFieldDescriptionprotected NodeBlock.blockMacro.MacroArg.defaultValIf the argument was given a default value, then this contains the base of the AST tree of the value.Methods in org.apache.velocity.runtime.directive with parameters of type NodeModifier and TypeMethodDescriptionprotected voidVelocimacroProxy.checkArgumentCount(Node node, int callArgNum) Check whether the number of arguments given matches the number defined.protected IteratorForeach.getIterator(Object iterable, Node node) Retrieve the contextual iterator.protected Object[]VelocimacroProxy.handleArgValues(InternalContextAdapter context, Node node, int callArgNum) Gets the macro argument values and puts them in the context under the argument names.voidBlock.init(RuntimeServices rs, InternalContextAdapter context, Node node) simple init - get the keyvoidBlockMacro.init(RuntimeServices rs, String macroName, InternalContextAdapter context, Node node) Initializes the directive.voidBreak.init(RuntimeServices rs, InternalContextAdapter context, Node node) voidDefine.init(RuntimeServices rs, InternalContextAdapter context, Node node) simple init - get the keyvoidDirective.init(RuntimeServices rs, InternalContextAdapter context, Node node) How this directive is to be initialized.voidEvaluate.init(RuntimeServices rs, InternalContextAdapter context, Node node) Initialize and check arguments.voidForeach.init(RuntimeServices rs, InternalContextAdapter context, Node node) simple init - init the tree and get the elementKey from the ASTvoidInclude.init(RuntimeServices rs, InternalContextAdapter context, Node node) simple init - init the tree and get the elementKey from the ASTvoidMacro.init(RuntimeServices rs, InternalContextAdapter context, Node node) voidParse.init(RuntimeServices rs, InternalContextAdapter context, Node node) Init's the #parse directive.voidRuntimeMacro.init(RuntimeServices rs, String name, InternalContextAdapter context, Node node) Initialize the Runtime macro.voidStop.init(RuntimeServices rs, InternalContextAdapter context, Node node) booleanBlockMacro.render(InternalContextAdapter context, Writer writer, Node node) Renders content using the selected macro and the passed AST body.booleanBreak.render(InternalContextAdapter context, Writer writer, Node node) This directive throws a StopCommand which signals either the nearest Scope or the specified scope to stop rendering its content.booleanDefine.render(InternalContextAdapter context, Writer writer, Node node) directive.render() simply makes an instance of the Block inner class and places it into the context as indicated.abstract booleanDirective.render(InternalContextAdapter context, Writer writer, Node node) How this directive is to be renderedbooleanEvaluate.render(InternalContextAdapter context, Writer writer, Node node) Evaluate the argument, convert to a String, and evaluate again (with the same context).booleanForeach.render(InternalContextAdapter context, Writer writer, Node node) renders the #foreach() blockbooleanInclude.render(InternalContextAdapter context, Writer writer, Node node) iterates through the argument list and renders every argument that is appropriate.booleanMacro.render(InternalContextAdapter context, Writer writer, Node node) render() doesn't do anything in the final output rendering.booleanParse.render(InternalContextAdapter context, Writer writer, Node node) iterates through the argument list and renders every argument that is appropriate.booleanRuntimeMacro.render(InternalContextAdapter context, Writer writer, Node node) Velocimacro implementation is not known at the init time.booleanRuntimeMacro.render(InternalContextAdapter context, Writer writer, Node node, Renderable body) This method is used with BlockMacro when we want to render a macro with a body AST.booleanStop.render(InternalContextAdapter context, Writer writer, Node node) booleanVelocimacroProxy.render(InternalContextAdapter context, Writer writer, Node node) Render the macro AST nodebooleanVelocimacroProxy.render(InternalContextAdapter context, Writer writer, Node node, Renderable body) Renders the macro using the context.protected voidForeach.renderBlock(InternalContextAdapter context, Writer writer, Node block) -
Uses of Node in org.apache.velocity.runtime.directive.contrib
Methods in org.apache.velocity.runtime.directive.contrib with parameters of type NodeModifier and TypeMethodDescriptionvoidFor.init(RuntimeServices rs, InternalContextAdapter context, Node node) booleanFor.render(InternalContextAdapter context, Writer writer, Node node) protected voidFor.renderBlock(InternalContextAdapter context, Writer writer, Node node) -
Uses of Node in org.apache.velocity.runtime.parser.node
Classes in org.apache.velocity.runtime.parser.node that implement NodeModifier and TypeClassDescriptionclassHandles number addition of nodes.
Please look at the Parser.jjt file which is what controls the generation of this class.classPlease look at the Parser.jjt file which is what controls the generation of this class.classclassclassclassRepresents all comments...classNumeric comparison supportclassThis class is responsible for handling the pluggable directives in VTL.classclassHandles number division of nodes
Please look at the Parser.jjt file which is what controls the generation of this class.classThis class is responsible for handling the ElseIf VTL control statement.classThis class is responsible for handling the Else VTL control statement.classHandlesarg1 == arg2This operator requires that the LHS and RHS are both of the same Class, both numbers or both coerce-able to strings.classThis class is responsible for handling Escapes in VTL.classThis class is responsible for handling EscapedDirectives in VTL.classclassclassHandles floating point numbers.classHandles arg1 >= arg2classHandles arg1 > arg2classASTIdentifier.java Method support for identifiers : $foo mainly used by ASTReference Introspection is now moved to 'just in time' or at render / execution time.classPlease look at the Parser.jjt file which is what controls the generation of this class.classclassThis node is responsible for the bracket notation at the end of a reference, e.g., $foo[1]classHandles integer numbers.classhandles the range 'operator' [ n ..classHandles arg1 <= arg2classclassHandles arg1 < arg2classAST Node for creating a map / dictionary.classHelps handle math
Please look at the Parser.jjt file which is what controls the generation of this class.classASTMethod.java Method support for references : $foo.method() NOTE : introspection is now done at render time.classHandles modulus division
Please look at the Parser.jjt file which is what controls the generation of this class.classHandles multiplication
Please look at the Parser.jjt file which is what controls the generation of this class.classclassHandlesarg1 != arg2by negating evaluation of ASTEQNodeclassclassclassPlease look at the Parser.jjt file which is what controls the generation of this class.classclassclassThis class is responsible for handling the references in VTL ($foo).classNode for the #set directiveclassASTStringLiteral support.classHandles subtraction of nodes (in #set() )
Please look at the Parser.jjt file which is what controls the generation of this class.classclassThis node holds the "Textblock" data which should not be interpreted by Velocity.classclassclassclassFields in org.apache.velocity.runtime.parser.node declared as NodeModifier and TypeFieldDescriptionprotected Node[]SimpleNode.childrenprotected NodeSimpleNode.parentMethods in org.apache.velocity.runtime.parser.node that return NodeModifier and TypeMethodDescriptionRoot node deep cloningprotected NodeChild node deep cloningNode.jjtGetChild(int i) This method returns a child node.SimpleNode.jjtGetChild(int i) Node.jjtGetParent()SimpleNode.jjtGetParent()JJTStandardParserState.peekNode()JJTStandardParserState.popNode()JJTStandardParserState.rootNode()Methods in org.apache.velocity.runtime.parser.node with parameters of type NodeModifier and TypeMethodDescriptionvoidASTStringLiteral.adjTokenLineNums(Node node) Adjust all the line and column numbers that comprise a node so that they are corrected for the string literals position within the template file.voidJJTStandardParserState.clearNodeScope(Node n) protected NodeChild node deep cloningvoidJJTStandardParserState.closeNodeScope(Node n, boolean condition) voidJJTStandardParserState.closeNodeScope(Node n, int num) voidNode.jjtAddChild(Node n, int i) This method tells the node to add its argument to the node's list of children.voidSimpleNode.jjtAddChild(Node n, int i) voidNode.jjtSetParent(Node n) This pair of methods are used to inform the node of its parent.voidSimpleNode.jjtSetParent(Node n) voidJJTStandardParserState.openNodeScope(Node n) void -
Uses of Node in org.apache.velocity.util
Methods in org.apache.velocity.util with parameters of type NodeModifier and TypeMethodDescriptionstatic StringStringUtils.formatFileString(Node node) Creates a string that formats the template filename with line number and column of the given Node. -
Uses of Node in org.apache.velocity.util.introspection
Constructors in org.apache.velocity.util.introspection with parameters of type Node