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)
ObjectMorpher
morph
in interface ObjectMorpher
sourceBean
- The input value to be morphedpublic Class morphsTo()
Morpher
Copyright © 2006–2021. All rights reserved.