public abstract class AbstractExpressionEvaluator extends Object implements ExpressionEvaluator
Constructor and Description |
---|
AbstractExpressionEvaluator() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
commonEvaluateUnaryExpression(Object rawExpression,
Object resultValue,
Class<?> resultClass) |
protected Object |
commonEvaluationLiteralExpression(String className,
List<String> genericClasses,
String raw) |
protected Object |
convertResult(String rawString,
String className,
List<String> genericClasses) |
protected List<Object> |
createAndFillList(com.fasterxml.jackson.databind.node.ArrayNode json,
List<Object> toReturn,
String className,
List<String> genericClasses) |
protected Object |
createAndFillObject(com.fasterxml.jackson.databind.node.ObjectNode json,
Object toReturn,
String className,
List<String> genericClasses) |
protected abstract Object |
createObject(String className,
List<String> genericClasses) |
protected abstract Object |
extractFieldValue(Object result,
String fieldName) |
protected abstract Map.Entry<String,List<String>> |
getFieldClassNameAndGenerics(Object element,
String fieldName,
String className,
List<String> genericClasses)
Return a pair with field className as key and list of generics as value
|
protected String |
getSimpleTypeNodeTextValue(com.fasterxml.jackson.databind.JsonNode jsonNode)
Return text value of a simple type node
|
protected abstract Object |
internalLiteralEvaluation(String raw,
String className) |
protected abstract boolean |
internalUnaryEvaluation(String rawExpression,
Object resultValue,
Class<?> resultClass,
boolean skipEmptyString) |
protected boolean |
isEmptyText(com.fasterxml.jackson.databind.JsonNode jsonNode)
Verify if given json node text is empty
|
protected boolean |
isListEmpty(com.fasterxml.jackson.databind.node.ArrayNode json)
Verify if all elements of given json array are empty
|
protected boolean |
isNodeEmpty(com.fasterxml.jackson.databind.JsonNode json)
Verify if given json node has all final values as empty strings
|
protected boolean |
isObjectEmpty(com.fasterxml.jackson.databind.node.ObjectNode json)
Verify if all fields of given json object are empty
|
protected boolean |
isSimpleTypeNode(com.fasterxml.jackson.databind.JsonNode jsonNode)
A node represent a simple type if it is an object with only one field named "value"
|
protected boolean |
isStructuredInput(String className)
Check if className represents a structured input
|
protected boolean |
isStructuredResult(Class<?> resultClass)
Check if resultClass represents a structured result
|
protected abstract void |
setField(Object toReturn,
String fieldName,
Object fieldValue) |
protected boolean |
verifyList(com.fasterxml.jackson.databind.node.ArrayNode json,
List resultRaw) |
protected boolean |
verifyObject(com.fasterxml.jackson.databind.node.ObjectNode json,
Object resultRaw) |
protected boolean |
verifyResult(Object rawExpression,
Object resultRaw) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluateLiteralExpression, evaluateUnaryExpression, fromObjectToExpression
protected boolean commonEvaluateUnaryExpression(Object rawExpression, Object resultValue, Class<?> resultClass)
protected Object commonEvaluationLiteralExpression(String className, List<String> genericClasses, String raw)
protected boolean isStructuredResult(Class<?> resultClass)
resultClass
- protected boolean isStructuredInput(String className)
className
- protected Object convertResult(String rawString, String className, List<String> genericClasses)
protected List<Object> createAndFillList(com.fasterxml.jackson.databind.node.ArrayNode json, List<Object> toReturn, String className, List<String> genericClasses)
protected Object createAndFillObject(com.fasterxml.jackson.databind.node.ObjectNode json, Object toReturn, String className, List<String> genericClasses)
protected boolean verifyList(com.fasterxml.jackson.databind.node.ArrayNode json, List resultRaw)
protected boolean verifyObject(com.fasterxml.jackson.databind.node.ObjectNode json, Object resultRaw)
protected boolean isNodeEmpty(com.fasterxml.jackson.databind.JsonNode json)
json
- protected boolean isListEmpty(com.fasterxml.jackson.databind.node.ArrayNode json)
json
- protected boolean isObjectEmpty(com.fasterxml.jackson.databind.node.ObjectNode json)
json
- protected boolean isEmptyText(com.fasterxml.jackson.databind.JsonNode jsonNode)
jsonNode
- protected boolean isSimpleTypeNode(com.fasterxml.jackson.databind.JsonNode jsonNode)
jsonNode
- protected String getSimpleTypeNodeTextValue(com.fasterxml.jackson.databind.JsonNode jsonNode)
jsonNode
- protected abstract boolean internalUnaryEvaluation(String rawExpression, Object resultValue, Class<?> resultClass, boolean skipEmptyString)
protected abstract Object internalLiteralEvaluation(String raw, String className)
protected abstract Map.Entry<String,List<String>> getFieldClassNameAndGenerics(Object element, String fieldName, String className, List<String> genericClasses)
element
- : instance to be populatedfieldName
- : field to analyzeclassName
- : canonical class name of instancegenericClasses
- : list of generics related to this fieldCopyright © 2001–2019 JBoss by Red Hat. All rights reserved.