public final class BeanMorpher extends Object implements ObjectMorpher
| Constructor and Description |
|---|
BeanMorpher(Class beanClass,
MorpherRegistry morpherRegistry) |
BeanMorpher(Class beanClass,
MorpherRegistry morpherRegistry,
boolean lenient) |
| Modifier and Type | Method and Description |
|---|---|
Object |
morph(Object sourceBean)
Morphs the input object into an output object of the supported type.
|
Class |
morphsTo()
Returns the target Class for conversion.
|
boolean |
supports(Class clazz)
Returns true if the Morpher supports conversion from this Class.
|
public BeanMorpher(Class beanClass, MorpherRegistry morpherRegistry)
beanClass - the target class to morph tomorpherRegistry - a registry of morpherspublic BeanMorpher(Class beanClass, MorpherRegistry morpherRegistry, boolean lenient)
beanClass - the target class to morph tomorpherRegistry - a registry of morpherslenient - if an exception should be raised if no morpher is found for
a target propertypublic Object morph(Object sourceBean)
ObjectMorphermorph in interface ObjectMorphersourceBean - The input value to be morphedpublic Class morphsTo()
MorpherCopyright © 2006–2024. All rights reserved.