@ThreadSafe @Immutable public final class DefaultAttributeConverterProvider extends Object implements AttributeConverterProvider
Given an input, this will identify a converter that can convert the specific Java type and invoke it. If a converter cannot be found, it will invoke a "parent" converter, which would be expected to be able to convert the value (or throw an exception).
Modifier and Type | Class and Description |
---|---|
static class |
DefaultAttributeConverterProvider.Builder
A builder for configuring and creating
DefaultAttributeConverterProvider s. |
Modifier and Type | Method and Description |
---|---|
static DefaultAttributeConverterProvider.Builder |
builder()
Equivalent to
builder(EnhancedType.of(Object.class)) . |
<T> AttributeConverter<T> |
converterFor(EnhancedType<T> type)
Find a converter that matches the provided type.
|
static DefaultAttributeConverterProvider |
create() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
defaultProvider
public static DefaultAttributeConverterProvider.Builder builder()
builder(EnhancedType.of(Object.class))
.public <T> AttributeConverter<T> converterFor(EnhancedType<T> type)
converterFor
in interface AttributeConverterProvider
type
- The type of the object to be convertedAttributeConverter
for converting the given type.public static DefaultAttributeConverterProvider create()
Copyright © 2020. All rights reserved.