Constructor and Description |
---|
EnumExtractor() |
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> pPathPart,
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
Extractor.canSetValue() ), this method sets the value
even on an inner object |
public Class getType()
public Object extractObject(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathPart, boolean jsonify) throws AttributeNotFoundException
extractObject
in interface Extractor
pConverter
- the global converter in order to be able do dispatch for
serializing inner data typespValue
- the value to convertpPathPart
- 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.public Object setObjectValue(StringToObjectConverter pConverter, Object pInner, String pAttribute, Object pValue) throws IllegalAccessException, InvocationTargetException
Extractor.canSetValue()
), this method sets the value
even on an inner objectsetObjectValue
in interface Extractor
pConverter
- 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 errorpublic boolean canSetValue()
canSetValue
in interface Extractor
Copyright © 2017. All rights reserved.