// 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; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationConfig; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.introspect.AnnotatedParameter; import com.fasterxml.jackson.databind.introspect.AnnotatedWithParams; import java.io.IOException; // Referenced classes of package com.fasterxml.jackson.databind.deser: // SettableBeanProperty public abstract class ValueInstantiator { public ValueInstantiator() { } protected Object _createFromStringFallbacks(DeserializationContext deserializationcontext, String s) throws IOException, JsonProcessingException { if (canCreateFromBoolean()) { String s1 = s.trim(); if ("true".equals(s1)) { return createFromBoolean(deserializationcontext, true); } if ("false".equals(s1)) { return createFromBoolean(deserializationcontext, false); } } if (s.length() == 0 && deserializationcontext.isEnabled(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT)) { return null; } else { throw deserializationcontext.mappingException("Can not instantiate value of type %s from String value ('%s'); no single-String constructor/factory method", new Object[] { getValueTypeDesc(), s }); } } public boolean canCreateFromBoolean() { return false; } public boolean canCreateFromDouble() { return false; } public boolean canCreateFromInt() { return false; } public boolean canCreateFromLong() { return false; } public boolean canCreateFromObjectWith() { return false; } public boolean canCreateFromString() { return false; } public boolean canCreateUsingDefault() { return getDefaultCreator() != null; } public boolean canCreateUsingDelegate() { return false; } public boolean canInstantiate() { return canCreateUsingDefault() || canCreateUsingDelegate() || canCreateFromObjectWith() || canCreateFromString() || canCreateFromInt() || canCreateFromLong() || canCreateFromDouble() || canCreateFromBoolean(); } public Object createFromBoolean(DeserializationContext deserializationcontext, boolean flag) throws IOException { throw deserializationcontext.mappingException("Can not instantiate value of type %s from Boolean value (%s)", new Object[] { getValueTypeDesc(), Boolean.valueOf(flag) }); } public Object createFromDouble(DeserializationContext deserializationcontext, double d) throws IOException { throw deserializationcontext.mappingException("Can not instantiate value of type %s from Floating-point number (%s, double)", new Object[] { getValueTypeDesc(), Double.valueOf(d) }); } public Object createFromInt(DeserializationContext deserializationcontext, int i) throws IOException { throw deserializationcontext.mappingException("Can not instantiate value of type %s from Integer number (%s, int)", new Object[] { getValueTypeDesc(), Integer.valueOf(i) }); } public Object createFromLong(DeserializationContext deserializationcontext, long l) throws IOException { throw deserializationcontext.mappingException("Can not instantiate value of type %s from Integer number (%s, long)", new Object[] { getValueTypeDesc(), Long.valueOf(l) }); } public Object createFromObjectWith(DeserializationContext deserializationcontext, Object aobj[]) throws IOException { throw deserializationcontext.mappingException("Can not instantiate value of type %s with arguments", new Object[] { getValueTypeDesc() }); } public Object createFromString(DeserializationContext deserializationcontext, String s) throws IOException { return _createFromStringFallbacks(deserializationcontext, s); } public Object createUsingDefault(DeserializationContext deserializationcontext) throws IOException { throw deserializationcontext.mappingException("Can not instantiate value of type %s; no default creator found", new Object[] { getValueTypeDesc() }); } public Object createUsingDelegate(DeserializationContext deserializationcontext, Object obj) throws IOException { throw deserializationcontext.mappingException("Can not instantiate value of type %s using delegate", new Object[] { getValueTypeDesc() }); } public AnnotatedWithParams getDefaultCreator() { return null; } public AnnotatedWithParams getDelegateCreator() { return null; } public JavaType getDelegateType(DeserializationConfig deserializationconfig) { return null; } public SettableBeanProperty[] getFromObjectArguments(DeserializationConfig deserializationconfig) { return null; } public AnnotatedParameter getIncompleteParameter() { return null; } public abstract String getValueTypeDesc(); public AnnotatedWithParams getWithArgsCreator() { return null; } }