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 ExpressionNode
key
private ExpressionNode
value
-
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.JsonNode
apply(Scope scope, com.fasterxml.jackson.databind.JsonNode input)
java.lang.String
applyKey(Scope scope, com.fasterxml.jackson.databind.JsonNode input)
void
computeMatchContexts(DotExpression parent)
void
dump(int level)
java.util.List<ExpressionNode>
getChildren()
java.lang.String
getStaticKey()
boolean
isKeyLiteral()
boolean
isLiteral()
ExpressionNode
optimize()
-
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:
computeMatchContexts
in interfaceExpressionNode
- Overrides:
computeMatchContexts
in classAbstractNode
-
isLiteral
public boolean isLiteral()
-
isKeyLiteral
public boolean isKeyLiteral()
-
optimize
public ExpressionNode optimize()
- Specified by:
optimize
in interfaceExpressionNode
- Overrides:
optimize
in classAbstractNode
-
getChildren
public java.util.List<ExpressionNode> getChildren()
- Specified by:
getChildren
in interfaceExpressionNode
- Overrides:
getChildren
in classAbstractNode
-
dump
public void dump(int level)
- Specified by:
dump
in interfaceExpressionNode
- Overrides:
dump
in classAbstractNode
-
-