Converter<?> provide(BeanProperty property, Genson genson) { Type type = property.getType(); for (Iterator<? extends ContextualFactory<?>> it = contextualFactories.iterator(); it .hasNext(); ) { ContextualFactory<?> factory = it.next(); Converter<?> object = null; Type factoryType = lookupGenericType(ContextualFactory.class, factory.getClass()); factoryType = expandType(factoryType, factory.getClass()); Type factoryParameter = typeOf(0, factoryType); if (type instanceof Class<?> && ((Class<?>) type).isPrimitive()) type = wrap((Class<?>) type); if (match(type, factoryParameter, false) && (object = factory.create(property, genson)) != null) { return object; } } return null; } }
Converter<?> provide(BeanProperty property, Genson genson) { Type type = property.getType(); for (Iterator<? extends ContextualFactory<?>> it = contextualFactories.iterator(); it .hasNext(); ) { ContextualFactory<?> factory = it.next(); Converter<?> object = null; Type factoryType = lookupGenericType(ContextualFactory.class, factory.getClass()); factoryType = expandType(factoryType, factory.getClass()); Type factoryParameter = typeOf(0, factoryType); if (type instanceof Class<?> && ((Class<?>) type).isPrimitive()) type = wrap((Class<?>) type); if (match(type, factoryParameter, false) && (object = factory.create(property, genson)) != null) { return object; } } return null; } }