freemarker.template.TemplateModel, freemarker.template.TemplateSequenceModelpublic class JSONArrayNode extends JSONNode implements freemarker.template.TemplateSequenceModel
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
DEFAULT_NODE_NAME |
|
static java.lang.String |
NODE_TYPE |
| Constructor | Description |
|---|---|
JSONArrayNode(JSONNode parentNode,
java.lang.String nodeName,
java.util.List elements) |
| Modifier and Type | Method | Description |
|---|---|---|
freemarker.template.TemplateModel |
get(int idx) |
|
java.util.List<java.lang.Object> |
getAdaptedObject(java.lang.Class<?> hint) |
Returns the plain Java object wrapped into this node.
|
freemarker.template.TemplateSequenceModel |
getChildNodes() |
|
protected java.lang.String |
getDefaultNodeName() |
Returns the name of the node if it has no explicit name.
|
java.lang.String |
getNodeType() |
Returns
NODE_TYPE. |
int |
size() |
getNodeName, getNodeNamespace, getParentNode, nodeTypeToDefaultNodeName, wrap, wrappublic static final java.lang.String NODE_TYPE
public static final java.lang.String DEFAULT_NODE_NAME
public JSONArrayNode(JSONNode parentNode, java.lang.String nodeName, java.util.List elements)
public freemarker.template.TemplateSequenceModel getChildNodes()
throws freemarker.template.TemplateModelException
JSONNode-s in this JSON array, using a JSONNullNode for JSON null-s.
Note that get(int) treats JSON null-s differently.freemarker.template.TemplateModelExceptionpublic java.lang.String getNodeType()
throws freemarker.template.TemplateModelException
NODE_TYPE.freemarker.template.TemplateModelExceptionpublic freemarker.template.TemplateModel get(int idx)
throws freemarker.template.TemplateModelException
JSONNode at the given index from this JSON array, using a Java null for JSON
null-s. Note that getChildNodes() treats JSON null-s differently.get in interface freemarker.template.TemplateSequenceModelfreemarker.template.TemplateModelExceptionpublic int size()
throws freemarker.template.TemplateModelException
size in interface freemarker.template.TemplateSequenceModelfreemarker.template.TemplateModelExceptionprotected java.lang.String getDefaultNodeName()
JSONNodeJSONNode(JSONNode, String) constructor if its second argument is null.getDefaultNodeName in class JSONNodeJSONNode.nodeTypeToDefaultNodeName(String)public java.util.List<java.lang.Object> getAdaptedObject(java.lang.Class<?> hint)