Package com.identityworksllc.iiq.common
Interface ObjectMapper.Convertible
-
- Enclosing class:
- ObjectMapper<T>
public static interface ObjectMapper.Convertible
Implementing this interface allows a class to coerce itself from one or more input types.When converting an object of this type, a new instance will be constructed using the no-args constructor. Then,
canCoerce(Object)
will be invoked to verify that the object is supported. If so, the object will be initialized viainitializeFrom(Object)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canCoerce(Object input)
Invoked by the ObjectMapper to ensure that the given input is appropriate for coercionvoid
initializeFrom(Object input)
Initializes this object from the given input
-
-
-
Method Detail
-
canCoerce
boolean canCoerce(Object input)
Invoked by the ObjectMapper to ensure that the given input is appropriate for coercion- Parameters:
input
- The input object for testing- Returns:
- True if the input can be coerced into this type
-
initializeFrom
void initializeFrom(Object input) throws ObjectMapper.ObjectMapperException
Initializes this object from the given input- Parameters:
input
- The input object- Throws:
ObjectMapper.ObjectMapperException
-
-