All Downloads are FREE. Search and download functionalities are using the official Maven repository.

liqp.nodes.TagNode Maven / Gradle / Ivy

package liqp.nodes;

import liqp.tags.Tag;

import java.util.Map;

class TagNode implements LNode {

    private Tag tag;
    private LNode[] tokens;

    public TagNode(String tagName, Tag tag, LNode... tokens) {
        if (tag == null) {
            throw new IllegalArgumentException("no tag available named: " + tagName);
        }
        this.tag = tag;
        this.tokens = tokens;
    }

    @Override
    public Object render(Map context) {

        return tag.render(context, tokens);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy