Package com.schibsted.spt.data.jslt.impl
Class PairExpression
- java.lang.Object
-
- com.schibsted.spt.data.jslt.impl.AbstractNode
-
- com.schibsted.spt.data.jslt.impl.PairExpression
-
- All Implemented Interfaces:
ExpressionNode
public class PairExpression extends AbstractNode
Represents a ("key" : expr) pair inside a JSON object.
-
-
Field Summary
Fields Modifier and Type Field Description private ExpressionNodekeyprivate ExpressionNodevalue-
Fields inherited from class com.schibsted.spt.data.jslt.impl.AbstractNode
location
-
-
Constructor Summary
Constructors Constructor Description PairExpression(ExpressionNode key, ExpressionNode value, Location location)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNodeapply(Scope scope, com.fasterxml.jackson.databind.JsonNode input)java.lang.StringapplyKey(Scope scope, com.fasterxml.jackson.databind.JsonNode input)voidcomputeMatchContexts(DotExpression parent)voiddump(int level)java.util.List<ExpressionNode>getChildren()java.lang.StringgetStaticKey()booleanisKeyLiteral()booleanisLiteral()ExpressionNodeoptimize()-
Methods inherited from class com.schibsted.spt.data.jslt.impl.AbstractNode
getLocation, prepare
-
-
-
-
Field Detail
-
key
private ExpressionNode key
-
value
private ExpressionNode value
-
-
Constructor Detail
-
PairExpression
public PairExpression(ExpressionNode key, ExpressionNode value, Location location)
-
-
Method Detail
-
applyKey
public java.lang.String applyKey(Scope scope, com.fasterxml.jackson.databind.JsonNode input)
-
getStaticKey
public java.lang.String getStaticKey()
-
apply
public com.fasterxml.jackson.databind.JsonNode apply(Scope scope, com.fasterxml.jackson.databind.JsonNode input)
-
computeMatchContexts
public void computeMatchContexts(DotExpression parent)
- Specified by:
computeMatchContextsin interfaceExpressionNode- Overrides:
computeMatchContextsin classAbstractNode
-
isLiteral
public boolean isLiteral()
-
isKeyLiteral
public boolean isKeyLiteral()
-
optimize
public ExpressionNode optimize()
- Specified by:
optimizein interfaceExpressionNode- Overrides:
optimizein classAbstractNode
-
getChildren
public java.util.List<ExpressionNode> getChildren()
- Specified by:
getChildrenin interfaceExpressionNode- Overrides:
getChildrenin classAbstractNode
-
dump
public void dump(int level)
- Specified by:
dumpin interfaceExpressionNode- Overrides:
dumpin classAbstractNode
-
-