// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.fasterxml.jackson.databind.deser.impl; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.deser.SettableBeanProperty; import com.fasterxml.jackson.databind.deser.ValueInstantiator; import java.io.IOException; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; // Referenced classes of package com.fasterxml.jackson.databind.deser.impl: // PropertyValueBuffer, PropertyValue, ObjectIdReader public final class PropertyBasedCreator { protected final SettableBeanProperty _allProperties[]; protected final int _propertyCount; protected final HashMap _propertyLookup = new HashMap(); protected final ValueInstantiator _valueInstantiator; protected PropertyBasedCreator(ValueInstantiator valueinstantiator, SettableBeanProperty asettablebeanproperty[]) { _valueInstantiator = valueinstantiator; int j = asettablebeanproperty.length; _propertyCount = j; _allProperties = new SettableBeanProperty[j]; for (int i = 0; i < j; i++) { valueinstantiator = asettablebeanproperty[i]; _allProperties[i] = valueinstantiator; _propertyLookup.put(valueinstantiator.getName(), valueinstantiator); } } public static PropertyBasedCreator construct(DeserializationContext deserializationcontext, ValueInstantiator valueinstantiator, SettableBeanProperty asettablebeanproperty[]) throws JsonMappingException { int j = asettablebeanproperty.length; SettableBeanProperty asettablebeanproperty1[] = new SettableBeanProperty[j]; for (int i = 0; i < j; i++) { SettableBeanProperty settablebeanproperty1 = asettablebeanproperty[i]; SettableBeanProperty settablebeanproperty = settablebeanproperty1; if (!settablebeanproperty1.hasValueDeserializer()) { settablebeanproperty = settablebeanproperty1.withValueDeserializer(deserializationcontext.findContextualValueDeserializer(settablebeanproperty1.getType(), settablebeanproperty1)); } asettablebeanproperty1[i] = settablebeanproperty; } return new PropertyBasedCreator(valueinstantiator, asettablebeanproperty1); } public Object build(DeserializationContext deserializationcontext, PropertyValueBuffer propertyvaluebuffer) throws IOException { Object obj1 = _valueInstantiator.createFromObjectWith(deserializationcontext, propertyvaluebuffer.getParameters(_allProperties)); Object obj = obj1; if (obj1 != null) { obj1 = propertyvaluebuffer.handleIdValue(deserializationcontext, obj1); deserializationcontext = propertyvaluebuffer.buffered(); do { obj = obj1; if (deserializationcontext == null) { break; } deserializationcontext.assign(obj1); deserializationcontext = ((PropertyValue) (deserializationcontext)).next; } while (true); } return obj; } public SettableBeanProperty findCreatorProperty(int i) { for (Iterator iterator = _propertyLookup.values().iterator(); iterator.hasNext();) { SettableBeanProperty settablebeanproperty = (SettableBeanProperty)iterator.next(); if (settablebeanproperty.getPropertyIndex() == i) { return settablebeanproperty; } } return null; } public SettableBeanProperty findCreatorProperty(String s) { return (SettableBeanProperty)_propertyLookup.get(s); } public Collection properties() { return _propertyLookup.values(); } public PropertyValueBuffer startBuilding(JsonParser jsonparser, DeserializationContext deserializationcontext, ObjectIdReader objectidreader) { return new PropertyValueBuffer(jsonparser, deserializationcontext, _propertyCount, objectidreader); } }