public <Sk, Sv, D> Set<D> mapAsSet(Map<Sk, Sv> source, Type<? extends Map<Sk, Sv>> sourceType, Type<D> destinationType, MappingContext context) { /* * Use map as collection to map the entry set to a list; requires an * existing mapping for Map.Entry to to type D. */ Set<D> destination = new HashSet<D>(source.size()); Type<Entry<Sk, Sv>> entryType = TypeFactory.resolveTypeOf(source.entrySet(), sourceType).getNestedType(0); return (Set<D>) mapAsCollection(source.entrySet(), entryType, destinationType, destination, context); }
sourceType = (Type<S>) TypeFactory.valueOf(sourceObject.getClass()); Type<?> sourceObjectType = TypeFactory.resolveTypeOf(sourceObject, sourceType); } else { resolvedType = unenhanceStrategy.unenhanceType(sourceObject, TypeFactory.resolveTypeOf(sourceObject, sourceType));