Package liqp

Class Insertion

Direct Known Subclasses:
Block, Tag

public abstract class Insertion extends LValue
Basic class for both tags and blocks. Most of internal api uses this. But for user api it is better to use Tag or Block as base class directly.
  • Field Details

    • name

      public final String name
      The name of this insertions.
  • Constructor Details

    • Insertion

      protected Insertion()
      Used for all package protected insertions in the liqp.insertions-package whose name is their class name lower cased.
    • Insertion

      public Insertion(String name)
      Creates a new instance of a Insertion.
      Parameters:
      name - the name of the tag.
  • Method Details

    • getName

      public String getName()
      Returns the name of this insertion.
      Returns:
      The name.
    • render

      public abstract Object render(TemplateContext context, LNode... nodes)
      Renders this insertion.
      Parameters:
      context - the context (variables) with which this node should be rendered.
      nodes - the nodes of this tag is created with. See the file `src/grammar/LiquidWalker.g` to see how each of the tags is created.
      Returns:
      an Object denoting the rendered AST.