* @return The mappings for the given method, keyed by target property name
*/
private Map<String, List<Mapping>> getMappings(ExecutableElement method) {
Map<String, List<Mapping>> mappings = new HashMap<String, List<Mapping>>();
MappingPrism mappingAnnotation = MappingPrism.getInstanceOn( method );
MappingsPrism mappingsAnnotation = MappingsPrism.getInstanceOn( method );
if ( mappingAnnotation != null ) {
if ( !mappings.containsKey( mappingAnnotation.target() ) ) {
mappings.put( mappingAnnotation.target(), new ArrayList<Mapping>() );
}
Mapping mapping = Mapping.fromMappingPrism( mappingAnnotation, method, messager );
if ( mapping != null ) {
mappings.get( mappingAnnotation.target() ).add( mapping );
}
}
if ( mappingsAnnotation != null ) {
mappings.putAll( Mapping.fromMappingsPrism( mappingsAnnotation, method, messager ) );