@Singleton @Introspected public class DefaultValueExtractors extends Object implements ValueExtractorRegistry
Modifier and Type | Field and Description |
---|---|
static String |
ITERABLE_ELEMENT_NODE_NAME |
static String |
LIST_ELEMENT_NODE_NAME |
static String |
MAP_VALUE_NODE_NAME |
Modifier | Constructor and Description |
---|---|
|
DefaultValueExtractors()
Default constructor.
|
protected |
DefaultValueExtractors(BeanContext beanContext)
Constructor used during DI.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValueExtractor
public static final String ITERABLE_ELEMENT_NODE_NAME
public static final String LIST_ELEMENT_NODE_NAME
public static final String MAP_VALUE_NODE_NAME
public DefaultValueExtractors()
@Inject protected DefaultValueExtractors(@Nullable BeanContext beanContext)
beanContext
- The bean contextpublic UnwrapByDefaultValueExtractor<Optional> getOptionalValueExtractor()
public UnwrapByDefaultValueExtractor<OptionalInt> getOptionalIntValueExtractor()
OptionalInt
.public UnwrapByDefaultValueExtractor<OptionalLong> getOptionalLongValueExtractor()
OptionalLong
.public UnwrapByDefaultValueExtractor<OptionalDouble> getOptionalDoubleValueExtractor()
OptionalDouble
.public javax.validation.valueextraction.ValueExtractor<Iterable> getIterableValueExtractor()
public javax.validation.valueextraction.ValueExtractor<Map<?,?>> getMapValueExtractor()
public javax.validation.valueextraction.ValueExtractor<Object[]> getObjectArrayValueExtractor()
public javax.validation.valueextraction.ValueExtractor<int[]> getIntArrayValueExtractor()
public javax.validation.valueextraction.ValueExtractor<byte[]> getByteArrayValueExtractor()
public javax.validation.valueextraction.ValueExtractor<char[]> getCharArrayValueExtractor()
public javax.validation.valueextraction.ValueExtractor<boolean[]> getBooleanArrayValueExtractor()
public javax.validation.valueextraction.ValueExtractor<double[]> getDoubleArrayValueExtractor()
public javax.validation.valueextraction.ValueExtractor<float[]> getFloatArrayValueExtractor()
public javax.validation.valueextraction.ValueExtractor<short[]> getShortArrayValueExtractor()
@NonNull public <T> Optional<javax.validation.valueextraction.ValueExtractor<T>> findValueExtractor(@NonNull Class<T> targetType)
ValueExtractorRegistry
ValueExtractor
for the given type.findValueExtractor
in interface ValueExtractorRegistry
T
- The target typetargetType
- The target type of the value@NonNull public <T> Optional<javax.validation.valueextraction.ValueExtractor<T>> findUnwrapValueExtractor(@NonNull Class<T> targetType)
ValueExtractorRegistry
ValueExtractor
without searching the hierarchy.findUnwrapValueExtractor
in interface ValueExtractorRegistry
T
- The target typetargetType
- The target type of the value