/** * When we used intovalue, then we must return keeper * @param p * @param ctxt * @param intoValue * @return * @throws IOException * @throws JsonProcessingException */ @Override @SuppressWarnings("unchecked") public Object deserialize(JsonParser p, DeserializationContext ctxt, Object intoValue) throws IOException { Object value = getInternalValue(p, ctxt); ((Keeper)intoValue).accept(value); return intoValue; }
@Override @SuppressWarnings("unchecked") public final void deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object instance) throws IOException { Keeper target; try { target = (Keeper) getter.getValue(instance); } catch (Exception e) { _throwAsIOE(p, e); return; // never gets here } if (target == null) { throw JsonMappingException.from(p, "Problem deserialize 'setterless' property '" + getName() + "': get method returned null"); } Object value; if (_valueTypeDeserializer != null) { value = _valueDeserializer.deserializeWithType(p, ctxt, _valueTypeDeserializer); } else { value = _valueDeserializer.deserialize(p, ctxt); } target.accept(value); }
final String name = cluster.getName(); uc.setName(name); uc.getTitle().accept(cluster.getTitle()); uc.getDescription().accept(cluster.getDescription()); uc.getFilter().accept(cluster.getImageFilter()); uc.setFeatures(cluster.getFeatures()); if (cluster.getConfig() instanceof DockerBasedClusterConfig) {