@Target(value=METHOD) @Retention(value=CLASS) public @interface BeanMapping
Either resultType()
, qualifiedBy()
or nullValueMappingStrategy()
must be specified.
Modifier and Type | Optional Element and Description |
---|---|
NullValueMappingStrategy |
nullValueMappingStrategy
The strategy to be applied when
null is passed as source value to this bean mapping. |
Class<? extends Annotation>[] |
qualifiedBy
A qualifier can be specified to aid the selection process of a suitable factory method or filtering applicable
@ BeforeMapping / @ AfterMapping methods. |
String[] |
qualifiedByName
Similar to
qualifiedBy() , but used in combination with @ Named in case no custom
qualifier annotation is defined. |
Class<?> |
resultType
Specifies the result type of the factory method to be used in case several factory methods qualify.
|
public abstract Class<?> resultType
public abstract Class<? extends Annotation>[] qualifiedBy
@
BeforeMapping
/ @
AfterMapping
methods. This is useful in case multiple factory
method (hand written of internal) qualify and result in an 'Ambiguous factory methods' error.
A qualifier is a custom annotation and can be placed on either a hand written mapper class or a method.
qualifiedByName()
public abstract String[] qualifiedByName
qualifiedBy()
, but used in combination with @
Named
in case no custom
qualifier annotation is defined.Named
public abstract NullValueMappingStrategy nullValueMappingStrategy
null
is passed as source value to this bean mapping. If no
strategy is configured, the strategy given via MapperConfig.nullValueMappingStrategy()
or
Mapper.nullValueMappingStrategy()
will be applied, using NullValueMappingStrategy.RETURN_NULL
by default.null
is passed as source value to the methods of this mapping.Copyright © 2012-2017 Gunnar Morling; All rights reserved. Released under the Apache Software License 2.0.