a tiny c-template work-alike for java
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 

48 lines
1004 B

package com.binarythought.picotemplate;
/**
* Groups of TemplateNodes compose a template once it's compiled.
* This class shouldn't be used directly.
* @see Template
*/
public class TemplateNode
{
/** Plain node type */
public static final int PLAIN = 0;
/** Variable node type */
public static final int VARIABLE = 1;
/** Start of section node type */
public static final int SECTION_START = 2;
/** End of section node type */
public static final int SECTION_END = 3;
private int nodeType;
private String content;
/**
* Instantiate new node.
* @param nodeType Type of node
* @param content Content of this node.
*/
public TemplateNode(int nodeType, String content)
{
this.nodeType = nodeType;
this.content = content;
}
/**
* Get the type of this node
* @return Type of this node.
*/
public int getNodeType(){ return nodeType; }
/**
* Get the content of this node.
* @return Content of this node.
*/
public String getContent(){ return content; }
}