Class MemberHandler<M extends Member>
java.lang.Object
org.ghotibeaun.json.converters.handlers.MemberHandler<M>
- Direct Known Subclasses:
FieldMemberHandler
,MethodMemberHandler
public abstract class MemberHandler<M extends Member> extends Object
-
Constructor Summary
Constructors Constructor Description MemberHandler(M member, ScannerEntry entry, Optional<ValueConverter<?>> valueConverter)
-
Method Summary
Modifier and Type Method Description ScannerEntry
getEntry()
JSONValue<?>
getJSONValue(Object instance)
M
getMember()
abstract <V> V
getMemberValue(Object instance)
Optional<ValueConverter<?>>
getValueConverter()
Optional<Object>
handleJSONValue(JSONValue<?> value)
static MemberHandler<? extends Member>
newMemberHandler(Member member, ScannerEntry entry, Optional<ValueConverter<?>> valueConverter)
abstract void
setMemberValue(Object instance, JSONValue<?> value)
-
Constructor Details
-
MemberHandler
-
-
Method Details
-
newMemberHandler
public static MemberHandler<? extends Member> newMemberHandler(Member member, ScannerEntry entry, Optional<ValueConverter<?>> valueConverter) -
getMember
-
getEntry
-
getValueConverter
-
handleJSONValue
- Throws:
JSONConversionException
-
setMemberValue
public abstract void setMemberValue(Object instance, JSONValue<?> value) throws JSONConversionException- Throws:
JSONConversionException
-
getMemberValue
- Throws:
JSONConversionException
-
getJSONValue
- Throws:
JSONConversionException
-