Save This Page
Home » velocity-1.5 » org.apache » velocity » runtime » directive » [javadoc | source]
org.apache.velocity.runtime.directive
public class: Literal [javadoc | source]
java.lang.Object
   org.apache.velocity.runtime.directive.Directive
      org.apache.velocity.runtime.directive.Literal

All Implemented Interfaces:
    Cloneable, DirectiveConstants

A very simple directive that leverages the Node.literal() to grab the literal rendition of a node. We basically grab the literal value on init(), then repeatedly use that during render().
Field Summary
 String literalText     
Fields inherited from org.apache.velocity.runtime.directive.Directive:
rsvc
Method from org.apache.velocity.runtime.directive.Literal Summary:
getName,   getType,   init,   render
Methods from org.apache.velocity.runtime.directive.Directive:
getColumn,   getLine,   getName,   getType,   init,   render,   setLocation
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.velocity.runtime.directive.Literal Detail:
 public String getName() 
    Return name of this directive.
 public int getType() 
    Return type of this directive.
 public  void init(RuntimeServices rs,
    InternalContextAdapter context,
    Node node) throws TemplateInitException 
    Store the literal rendition of a node using the Node.literal().
 public boolean render(InternalContextAdapter context,
    Writer writer,
    Node node) throws IOException 
    Throw the literal rendition of the block between #literal()/#end into the writer.