In package com.eden.orchid.api.options.extractors

public final class OptionsHolderOptionExtractor extends OptionExtractor<T>

since: v1.0.0 public final

Source Types

Item TypeCoercion
JSONObjectdirect
Mapnew JSONObject from map
JSONArraydirect
anything[]new JSONArray from array
Listnew JSONArray from list

Destination Types

Field TypeAnnotationDefault Value
? extends OptionsHoldernonenull
List<? extends OptionsHolder>nonenull

Notes

This can deserialize any JSONObject into any class that implements OptionsHolder, and can also handle any generic List of OptionsHolders of the same Class.

Constructors

OptionsHolderOptionExtractor(Provider<T> extractorProvider, Provider<T> contextProvider, FlexibleMapConverter mapConverter) public
Constructor Annotations:
@Inject

Parameters:

Methods

void acceptsClass(Class<T> clazz) public
Method Annotations:
@Override

Parameters:
  • Class clazz
OptionsHolder getOption(Field field, Object sourceObject, String key) public
Method Annotations:
@Override

Parameters:
  • Field field
  • Object sourceObject
  • String key
OptionsHolder getDefaultValue(Field field) public
Method Annotations:
@Override

Parameters:
  • Field field