| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final List | |
| pack-priv final InternalConverter | |
| pack-priv final List | |
| pack-priv final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv | CustomConverterImpl(InternalConverter converter, Map<Type, List<ConverterFunction>> rules, List<ConverterFunction> catchAllRules, List<ConverterFunction> errHandlers)
|
| Modifier and Type | Method and Description |
|---|---|
| public InternalConverting | convert(Object
The object that should be converted. obj)Implements org. Start a conversion for the given object. |
| public Functioning | function()
Implements org. Start defining a function that can perform given conversions. |
| public ConverterBuilder | newConverterBuilder()
Implements org. Obtain a builder to create a modified converter based on this converter. |
| allRules | back to summary |
|---|---|
| pack-priv final List<ConverterFunction> allRules | |
| delegate | back to summary |
|---|---|
| pack-priv final InternalConverter delegate | |
| errorHandlers | back to summary |
|---|---|
| pack-priv final List<ConverterFunction> errorHandlers | |
| typeRules | back to summary |
|---|---|
| pack-priv final Map<Type, List<ConverterFunction>> typeRules | |
| CustomConverterImpl | back to summary |
|---|---|
| pack-priv CustomConverterImpl(InternalConverter converter, Map<Type, List<ConverterFunction>> rules, List<ConverterFunction> catchAllRules, List<ConverterFunction> errHandlers) | |
| convert | back to summary |
|---|---|
| public InternalConverting convert(Object obj) Implements org. Doc from org. Start a conversion for the given object.
| |
| function | back to summary |
|---|---|
| public Functioning function() Implements org. Doc from org. Start defining a function that can perform given conversions.
| |
| newConverterBuilder | back to summary |
|---|---|
| public ConverterBuilder newConverterBuilder() Implements org. Doc from org. Obtain a builder to create a modified converter based on this converter.
For more details see the
| |
| Modifier and Type | Field and Description |
|---|---|
| private volatile Object | |
| private final InternalConverting | |
| private volatile boolean | |
| private final InternalConverter | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Converting | defaultValue(Object
The default value. defVal)Implements org. The default value to use when the object cannot be converted or in case
of conversion from a |
| pack-priv List | |
| public Converting | keysIgnoreCase()
Implements org. When converting between map-like types use case-insensitive mapping of keys. |
| public Converting | sourceAs(Class<?>
The class to treat the object as. type)Implements org. Treat the source object as the specified class. |
| public Converting | sourceAsBean()
Implements org. Treat the source object as a JavaBean. |
| public Converting | sourceAsDTO()
Implements org. Treat the source object as a DTO even if the source object has methods or is otherwise not recognized as a DTO. |
| public Converting | targetAs(Class<?>
The class to treat the object as. cls)Implements org. Treat the target object as the specified class. |
| public Converting | targetAsBean()
Implements org. Treat the target object as a JavaBean. |
| public Converting | targetAsDTO()
Implements org. Treat the target object as a DTO even if it has methods or is otherwise not recognized as a DTO. |
| public <T> T | to(Class<T>
The class to convert to. cls)Implements org. Specify the target object type for the conversion as a class object. |
| public <T> T | to(TypeReference<T>
A type reference to the object being converted to. ref)Implements org. Specify the target object type as a |
| public <T> T | to(Type
A Type object to represent the target type to be converted
to. type)Implements org. Specify the target object type as a Java Reflection Type object. |
| public <T> T | to(Type
A Type object to represent the target type to be converted
to. type, InternalConverter Internal converter converter)Implements org. Invoke the conversion while passing the top-level converter. |
| public String | |
| public Converting | view()
Implements org. Return a live view over the backing object that reflects any changes to the original object. |
| private Object |
| defaultValue | back to summary |
|---|---|
| private volatile Object defaultValue | |
| del | back to summary |
|---|---|
| private final InternalConverting del | |
| hasDefault | back to summary |
|---|---|
| private volatile boolean hasDefault | |
| initialConverter | back to summary |
|---|---|
| private final InternalConverter initialConverter | |
| object | back to summary |
|---|---|
| private final Object object | |
| ConvertingWrapper | back to summary |
|---|---|
| pack-priv ConvertingWrapper(Object obj, InternalConverting delegate, InternalConverter converter) | |
| defaultValue | back to summary |
|---|---|
| public Converting defaultValue(Object defVal) Implements org. Doc from org. The default value to use when the object cannot be converted or in case
of conversion from a
| |
| getErrorHandlers | back to summary |
|---|---|
| pack-priv List | |
| keysIgnoreCase | back to summary |
|---|---|
| public Converting keysIgnoreCase() Implements org. Doc from org. When converting between map-like types use case-insensitive mapping of keys.
| |
| sourceAs | back to summary |
|---|---|
| public Converting sourceAs(Class<?> type) Implements org. Doc from org. Treat the source object as the specified class. This can be used to disambiguate a type if it implements multiple interfaces or extends multiple classes.
| |
| sourceAsBean | back to summary |
|---|---|
| public Converting sourceAsBean() Implements org. Doc from org. Treat the source object as a JavaBean. By default objects will not be treated as JavaBeans, this has to be specified using this method.
| |
| sourceAsDTO | back to summary |
|---|---|
| public Converting sourceAsDTO() Implements org. Doc from org. Treat the source object as a DTO even if the source object has methods or is otherwise not recognized as a DTO.
| |
| targetAs | back to summary |
|---|---|
| public Converting targetAs(Class<?> cls) Implements org. Doc from org. Treat the target object as the specified class. This can be used to disambiguate a type if it implements multiple interfaces or extends multiple classes.
| |
| targetAsBean | back to summary |
|---|---|
| public Converting targetAsBean() Implements org. Doc from org. Treat the target object as a JavaBean. By default objects will not be treated as JavaBeans, this has to be specified using this method.
| |
| targetAsDTO | back to summary |
|---|---|
| public Converting targetAsDTO() Implements org. Doc from org. Treat the target object as a DTO even if it has methods or is otherwise not recognized as a DTO.
| |
| to | back to summary |
|---|---|
| public <T> T to(Class<T> cls) Implements org. Doc from org. Specify the target object type for the conversion as a class object. | |
| to | back to summary |
|---|---|
| public <T> T to(TypeReference<T> ref) Implements org. Doc from org. Specify the target object type as a
List<String> result = converter.convert(Arrays.asList(1, 2, 3))
.to(new TypeReference<List<String>>() {
});
| |
| to | back to summary |
|---|---|
| public <T> T to(Type type) Implements org. Doc from org. Specify the target object type as a Java Reflection Type object. | |
| to | back to summary |
|---|---|
| public <T> T to(Type type, InternalConverter converter) Implements org. Doc from org. Invoke the conversion while passing the top-level converter. The top-level converter is needed when performing embedded conversions such as in map elements. When using a custom converter, the top converter must be used for this.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| view | back to summary |
|---|---|
| public Converting view() Implements org. Doc from org. Return a live view over the backing object that reflects any changes to
the original object. This is only possible with conversions to
| |
| wrapErrorHandling | back to summary |
|---|---|
| private Object wrapErrorHandling(final Object wrapped, final InternalConverter converter) | |