本文整理匯總了Java中org.codehaus.jackson.map.DeserializationConfig.isEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java DeserializationConfig.isEnabled方法的具體用法?Java DeserializationConfig.isEnabled怎麽用?Java DeserializationConfig.isEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.codehaus.jackson.map.DeserializationConfig
的用法示例。
在下文中一共展示了DeserializationConfig.isEnabled方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: constructAnySetter
import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected SettableAnyProperty constructAnySetter(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, AnnotatedMethod paramAnnotatedMethod)
throws JsonMappingException
{
if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
paramAnnotatedMethod.fixAccess();
JavaType localJavaType1 = paramBasicBeanDescription.bindingsForBeanType().resolveType(paramAnnotatedMethod.getParameterType(1));
BeanProperty.Std localStd = new BeanProperty.Std(paramAnnotatedMethod.getName(), localJavaType1, paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedMethod);
JavaType localJavaType2 = resolveType(paramDeserializationConfig, paramBasicBeanDescription, localJavaType1, paramAnnotatedMethod, localStd);
JsonDeserializer localJsonDeserializer = findDeserializerFromAnnotation(paramDeserializationConfig, paramAnnotatedMethod, localStd);
if (localJsonDeserializer != null)
{
SettableAnyProperty localSettableAnyProperty = new SettableAnyProperty(localStd, paramAnnotatedMethod, localJavaType2);
localSettableAnyProperty.setValueDeserializer(localJsonDeserializer);
return localSettableAnyProperty;
}
return new SettableAnyProperty(localStd, paramAnnotatedMethod, modifyTypeByAnnotation(paramDeserializationConfig, paramAnnotatedMethod, localJavaType2, localStd.getName()));
}
示例2: constructSettableProperty
import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected SettableBeanProperty constructSettableProperty(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, String paramString, AnnotatedField paramAnnotatedField)
throws JsonMappingException
{
if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
paramAnnotatedField.fixAccess();
JavaType localJavaType1 = paramBasicBeanDescription.bindingsForBeanType().resolveType(paramAnnotatedField.getGenericType());
BeanProperty.Std localStd = new BeanProperty.Std(paramString, localJavaType1, paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedField);
JavaType localJavaType2 = resolveType(paramDeserializationConfig, paramBasicBeanDescription, localJavaType1, paramAnnotatedField, localStd);
if (localJavaType2 != localJavaType1)
localStd = localStd.withType(localJavaType2);
JsonDeserializer localJsonDeserializer = findDeserializerFromAnnotation(paramDeserializationConfig, paramAnnotatedField, localStd);
JavaType localJavaType3 = modifyTypeByAnnotation(paramDeserializationConfig, paramAnnotatedField, localJavaType2, paramString);
SettableBeanProperty.FieldProperty localFieldProperty = new SettableBeanProperty.FieldProperty(paramString, localJavaType3, (TypeDeserializer)localJavaType3.getTypeHandler(), paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedField);
if (localJsonDeserializer != null)
localFieldProperty.setValueDeserializer(localJsonDeserializer);
AnnotationIntrospector.ReferenceProperty localReferenceProperty = paramDeserializationConfig.getAnnotationIntrospector().findReferenceType(paramAnnotatedField);
if ((localReferenceProperty != null) && (localReferenceProperty.isManagedReference()))
localFieldProperty.setManagedReferenceName(localReferenceProperty.getName());
return localFieldProperty;
}
示例3: findDeserializerCreators
import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected CreatorContainer findDeserializerCreators(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription)
throws JsonMappingException
{
boolean bool = paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS);
CreatorContainer localCreatorContainer = new CreatorContainer(paramBasicBeanDescription, bool);
AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
if (paramBasicBeanDescription.getType().isConcrete())
{
Constructor localConstructor = paramBasicBeanDescription.findDefaultConstructor();
if (localConstructor != null)
{
if (bool)
ClassUtil.checkAndFixAccess(localConstructor);
localCreatorContainer.setDefaultConstructor(localConstructor);
}
}
VisibilityChecker localVisibilityChecker1 = paramDeserializationConfig.getDefaultVisibilityChecker();
if (!paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.AUTO_DETECT_CREATORS))
localVisibilityChecker1 = localVisibilityChecker1.withCreatorVisibility(JsonAutoDetect.Visibility.NONE);
VisibilityChecker localVisibilityChecker2 = paramDeserializationConfig.getAnnotationIntrospector().findAutoDetectVisibility(paramBasicBeanDescription.getClassInfo(), localVisibilityChecker1);
_addDeserializerConstructors(paramDeserializationConfig, paramBasicBeanDescription, localVisibilityChecker2, localAnnotationIntrospector, localCreatorContainer);
_addDeserializerFactoryMethods(paramDeserializationConfig, paramBasicBeanDescription, localVisibilityChecker2, localAnnotationIntrospector, localCreatorContainer);
return localCreatorContainer;
}
示例4: deserializerForCreator
import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
public static JsonDeserializer<?> deserializerForCreator(DeserializationConfig paramDeserializationConfig, Class<?> paramClass, AnnotatedMethod paramAnnotatedMethod)
{
if (paramAnnotatedMethod.getParameterType(0) != String.class)
throw new IllegalArgumentException("Parameter #0 type for factory method (" + paramAnnotatedMethod + ") not suitable, must be java.lang.String");
if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
ClassUtil.checkAndFixAccess(paramAnnotatedMethod.getMember());
return new FactoryBasedDeserializer(paramClass, paramAnnotatedMethod);
}
示例5: constructSetterlessProperty
import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected SettableBeanProperty constructSetterlessProperty(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, String paramString, AnnotatedMethod paramAnnotatedMethod)
throws JsonMappingException
{
if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
paramAnnotatedMethod.fixAccess();
JavaType localJavaType1 = paramAnnotatedMethod.getType(paramBasicBeanDescription.bindingsForBeanType());
JsonDeserializer localJsonDeserializer = findDeserializerFromAnnotation(paramDeserializationConfig, paramAnnotatedMethod, new BeanProperty.Std(paramString, localJavaType1, paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedMethod));
JavaType localJavaType2 = modifyTypeByAnnotation(paramDeserializationConfig, paramAnnotatedMethod, localJavaType1, paramString);
SettableBeanProperty.SetterlessProperty localSetterlessProperty = new SettableBeanProperty.SetterlessProperty(paramString, localJavaType2, (TypeDeserializer)localJavaType2.getTypeHandler(), paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedMethod);
if (localJsonDeserializer != null)
localSetterlessProperty.setValueDeserializer(localJsonDeserializer);
return localSetterlessProperty;
}
示例6: getDeserializationMethodFilter
import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected MethodFilter getDeserializationMethodFilter(DeserializationConfig paramDeserializationConfig)
{
if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.USE_GETTERS_AS_SETTERS))
return DEFAULT_SETTER_AND_GETTER_FILTER;
return DEFAULT_SETTER_FILTER;
}
示例7: constructEnumResolver
import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected EnumResolver<?> constructEnumResolver(Class<?> paramClass, DeserializationConfig paramDeserializationConfig)
{
if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.READ_ENUMS_USING_TO_STRING))
return EnumResolver.constructUnsafeUsingToString(paramClass);
return EnumResolver.constructUnsafe(paramClass, paramDeserializationConfig.getAnnotationIntrospector());
}
示例8: findMapCreators
import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected CreatorContainer findMapCreators(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription)
throws JsonMappingException
{
AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
CreatorContainer localCreatorContainer = new CreatorContainer(paramBasicBeanDescription, paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS));
Iterator localIterator1 = paramBasicBeanDescription.getConstructors().iterator();
while (localIterator1.hasNext())
{
AnnotatedConstructor localAnnotatedConstructor = (AnnotatedConstructor)localIterator1.next();
int m = localAnnotatedConstructor.getParameterCount();
if ((m < 1) || (!localAnnotationIntrospector.hasCreatorAnnotation(localAnnotatedConstructor)))
continue;
SettableBeanProperty[] arrayOfSettableBeanProperty2 = new SettableBeanProperty[m];
int n = 0;
for (int i1 = 0; i1 < m; i1++)
{
AnnotatedParameter localAnnotatedParameter2 = localAnnotatedConstructor.getParameter(i1);
if (localAnnotatedParameter2 == null);
for (String str2 = null; (str2 == null) || (str2.length() == 0); str2 = localAnnotationIntrospector.findPropertyNameForParam(localAnnotatedParameter2))
throw new IllegalArgumentException("Parameter #" + i1 + " of constructor " + localAnnotatedConstructor + " has no property name annotation: must have for @JsonCreator for a Map type");
n++;
arrayOfSettableBeanProperty2[i1] = constructCreatorProperty(paramDeserializationConfig, paramBasicBeanDescription, str2, i1, localAnnotatedParameter2);
}
localCreatorContainer.addPropertyConstructor(localAnnotatedConstructor, arrayOfSettableBeanProperty2);
}
Iterator localIterator2 = paramBasicBeanDescription.getFactoryMethods().iterator();
while (localIterator2.hasNext())
{
AnnotatedMethod localAnnotatedMethod = (AnnotatedMethod)localIterator2.next();
int i = localAnnotatedMethod.getParameterCount();
if ((i < 1) || (!localAnnotationIntrospector.hasCreatorAnnotation(localAnnotatedMethod)))
continue;
SettableBeanProperty[] arrayOfSettableBeanProperty1 = new SettableBeanProperty[i];
int j = 0;
for (int k = 0; k < i; k++)
{
AnnotatedParameter localAnnotatedParameter1 = localAnnotatedMethod.getParameter(k);
if (localAnnotatedParameter1 == null);
for (String str1 = null; (str1 == null) || (str1.length() == 0); str1 = localAnnotationIntrospector.findPropertyNameForParam(localAnnotatedParameter1))
throw new IllegalArgumentException("Parameter #" + k + " of factory method " + localAnnotatedMethod + " has no property name annotation: must have for @JsonCreator for a Map type");
j++;
arrayOfSettableBeanProperty1[k] = constructCreatorProperty(paramDeserializationConfig, paramBasicBeanDescription, str1, k, localAnnotatedParameter1);
}
localCreatorContainer.addPropertyFactory(localAnnotatedMethod, arrayOfSettableBeanProperty1);
}
return localCreatorContainer;
}
示例9: _createAndCache2
import org.codehaus.jackson.map.DeserializationConfig; //導入方法依賴的package包/類
protected JsonDeserializer<Object> _createAndCache2(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty)
throws JsonMappingException
{
JsonDeserializer localJsonDeserializer2;
try
{
JsonDeserializer localJsonDeserializer1 = _createDeserializer(paramDeserializationConfig, paramJavaType, paramBeanProperty);
localJsonDeserializer2 = localJsonDeserializer1;
if (localJsonDeserializer2 == null)
{
localJsonDeserializer2 = null;
return localJsonDeserializer2;
}
}
catch (IllegalArgumentException localIllegalArgumentException)
{
throw new JsonMappingException(localIllegalArgumentException.getMessage(), null, localIllegalArgumentException);
}
boolean bool1 = localJsonDeserializer2 instanceof ResolvableDeserializer;
if (localJsonDeserializer2.getClass() == BeanDeserializer.class);
for (boolean bool2 = true; ; bool2 = false)
{
if ((!bool2) && (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.USE_ANNOTATIONS)))
{
AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
Boolean localBoolean = localAnnotationIntrospector.findCachability(AnnotatedClass.construct(localJsonDeserializer2.getClass(), localAnnotationIntrospector, null));
if (localBoolean != null)
bool2 = localBoolean.booleanValue();
}
if (bool1)
{
this._incompleteDeserializers.put(paramJavaType, localJsonDeserializer2);
_resolveDeserializer(paramDeserializationConfig, (ResolvableDeserializer)localJsonDeserializer2);
this._incompleteDeserializers.remove(paramJavaType);
}
if (!bool2)
break;
this._cachedDeserializers.put(paramJavaType, localJsonDeserializer2);
return localJsonDeserializer2;
}
}