public interface Extractor
Modifier and Type | Method and Description |
---|---|
boolean |
canSetValue()
Whether this extractor is able to set a value.
|
Object |
extractObject(ObjectToJsonConverter pConverter,
Object pValue,
Stack<String> pExtraArgs,
boolean jsonify)
Extract an object from pValue.
|
Class |
getType()
Type for which this extractor can objects of this type
|
Object |
setObjectValue(StringToObjectConverter pConverter,
Object pInner,
String pAttribute,
Object pValue)
If this extractor is able to set a value (see
canSetValue() ), this method sets the value
even on an inner object |
Class getType()
Object extractObject(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pExtraArgs, boolean jsonify) throws AttributeNotFoundException
pConverter
- the global converter in order to be able do dispatch for
serializing inner data typespValue
- the value to convertpExtraArgs
- extra arguments which contain e.g. a pathjsonify
- whether to convert to a JSON object/list or whether the plain object
should be returned. The later is required for writing an inner valueAttributeNotFoundException
- if the inner path does not exist.Object setObjectValue(StringToObjectConverter pConverter, Object pInner, String pAttribute, Object pValue) throws IllegalAccessException, InvocationTargetException
canSetValue()
), this method sets the value
even on an inner objectpConverter
- the global converter in order to be able do dispatch for
serializing inner data typespInner
- object on which to set the valuepAttribute
- attribute of the object to setpValue
- the new value to setIllegalAccessException
- if the attribute to set to is not accessibleInvocationTargetException
- reflection errorboolean canSetValue()
Copyright © 2021. All rights reserved.