Package fmpp.models
Class JSONBooleanNode
- java.lang.Object
-
- fmpp.models.JSONNode
-
- fmpp.models.JSONBooleanNode
-
- All Implemented Interfaces:
freemarker.template.AdapterTemplateModel,freemarker.template.TemplateBooleanModel,freemarker.template.TemplateModel,freemarker.template.TemplateNodeModel,java.io.Serializable
public class JSONBooleanNode extends JSONNode implements freemarker.template.TemplateBooleanModel
JSON "true" and "false" value; see http://www.json.org/.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_NODE_NAMEstatic java.lang.StringNODE_TYPE
-
Constructor Summary
Constructors Constructor Description JSONBooleanNode(JSONNode parentNode, java.lang.String nodeName, boolean value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.BooleangetAdaptedObject(java.lang.Class<?> hint)Returns the plain Java object wrapped into this node.booleangetAsBoolean()freemarker.template.TemplateSequenceModelgetChildNodes()Always returnsnull.protected java.lang.StringgetDefaultNodeName()Returns the name of the node if it has no explicit name.java.lang.StringgetNodeType()ReturnsNODE_TYPE.-
Methods inherited from class fmpp.models.JSONNode
getNodeName, getNodeNamespace, getParentNode, nodeTypeToDefaultNodeName, wrap, wrap
-
-
-
-
Field Detail
-
NODE_TYPE
public static final java.lang.String NODE_TYPE
- See Also:
- Constant Field Values
-
DEFAULT_NODE_NAME
public static final java.lang.String DEFAULT_NODE_NAME
-
-
Constructor Detail
-
JSONBooleanNode
public JSONBooleanNode(JSONNode parentNode, java.lang.String nodeName, boolean value)
-
-
Method Detail
-
getChildNodes
public freemarker.template.TemplateSequenceModel getChildNodes() throws freemarker.template.TemplateModelExceptionAlways returnsnull.- Specified by:
getChildNodesin interfacefreemarker.template.TemplateNodeModel- Throws:
freemarker.template.TemplateModelException
-
getNodeType
public java.lang.String getNodeType() throws freemarker.template.TemplateModelExceptionReturnsNODE_TYPE.- Specified by:
getNodeTypein interfacefreemarker.template.TemplateNodeModel- Throws:
freemarker.template.TemplateModelException
-
getAsBoolean
public boolean getAsBoolean() throws freemarker.template.TemplateModelException- Specified by:
getAsBooleanin interfacefreemarker.template.TemplateBooleanModel- Throws:
freemarker.template.TemplateModelException
-
getDefaultNodeName
protected java.lang.String getDefaultNodeName()
Description copied from class:JSONNodeReturns the name of the node if it has no explicit name. This is normally called by theJSONNode(JSONNode, String)constructor if its second argument isnull.- Specified by:
getDefaultNodeNamein classJSONNode- See Also:
JSONNode.nodeTypeToDefaultNodeName(String)
-
getAdaptedObject
public java.lang.Boolean getAdaptedObject(java.lang.Class<?> hint)
Returns the plain Java object wrapped into this node.- Specified by:
getAdaptedObjectin interfacefreemarker.template.AdapterTemplateModel- Since:
- 0.9.16
-
-