本文整理汇总了Java中org.codehaus.jackson.map.KeyDeserializer类的典型用法代码示例。如果您正苦于以下问题:Java KeyDeserializer类的具体用法?Java KeyDeserializer怎么用?Java KeyDeserializer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KeyDeserializer类属于org.codehaus.jackson.map包,在下文中一共展示了KeyDeserializer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createMapLikeDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public JsonDeserializer<?> createMapLikeDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, MapLikeType paramMapLikeType, BeanProperty paramBeanProperty)
throws JsonMappingException
{
MapLikeType localMapLikeType1 = (MapLikeType)mapAbstractType(paramDeserializationConfig, paramMapLikeType);
BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectForCreation(localMapLikeType1);
JsonDeserializer localJsonDeserializer1 = findDeserializerFromAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), paramBeanProperty);
if (localJsonDeserializer1 != null)
return localJsonDeserializer1;
MapLikeType localMapLikeType2 = (MapLikeType)modifyTypeByAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), localMapLikeType1, null);
JavaType localJavaType1 = localMapLikeType2.getKeyType();
JavaType localJavaType2 = localMapLikeType2.getContentType();
JsonDeserializer localJsonDeserializer2 = (JsonDeserializer)localJavaType2.getValueHandler();
KeyDeserializer localKeyDeserializer = (KeyDeserializer)localJavaType1.getValueHandler();
if (localKeyDeserializer == null)
localKeyDeserializer = paramDeserializerProvider.findKeyDeserializer(paramDeserializationConfig, localJavaType1, paramBeanProperty);
TypeDeserializer localTypeDeserializer = (TypeDeserializer)localJavaType2.getTypeHandler();
if (localTypeDeserializer == null)
localTypeDeserializer = findTypeDeserializer(paramDeserializationConfig, localJavaType2, paramBeanProperty);
return _findCustomMapLikeDeserializer(localMapLikeType2, paramDeserializationConfig, paramDeserializerProvider, localBasicBeanDescription, paramBeanProperty, localKeyDeserializer, localTypeDeserializer, localJsonDeserializer2);
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:21,代码来源:BasicDeserializerFactory.java
示例2: createKeyDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public KeyDeserializer createKeyDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty)
throws JsonMappingException
{
if (this._factoryConfig.hasKeyDeserializers())
{
BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectClassAnnotations(paramJavaType.getRawClass());
Iterator localIterator = this._factoryConfig.keyDeserializers().iterator();
while (localIterator.hasNext())
{
KeyDeserializer localKeyDeserializer = ((KeyDeserializers)localIterator.next()).findKeyDeserializer(paramJavaType, paramDeserializationConfig, localBasicBeanDescription, paramBeanProperty);
if (localKeyDeserializer != null)
return localKeyDeserializer;
}
}
return null;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:17,代码来源:BeanDeserializerFactory.java
示例3: findStringBasedKeyDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig config, JavaType type)
{
/* We don't need full deserialization information, just need to
* know creators.
*/
BasicBeanDescription beanDesc = config.introspect(type);
// Ok, so: can we find T(String) constructor?
Constructor<?> ctor = beanDesc.findSingleArgConstructor(String.class);
if (ctor != null) {
return new StdKeyDeserializer.StringCtorKeyDeserializer(ctor);
}
/* or if not, "static T valueOf(String)" (or equivalent marked
* with @JsonCreator annotation?)
*/
Method m = beanDesc.findFactoryMethod(String.class);
if (m != null){
return new StdKeyDeserializer.StringFactoryKeyDeserializer(m);
}
// nope, no such luck...
return null;
}
开发者ID:r00li,项目名称:RHome,代码行数:22,代码来源:StdKeyDeserializers.java
示例4: createMapLikeDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public JsonDeserializer<?> createMapLikeDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, MapLikeType paramMapLikeType, BeanProperty paramBeanProperty)
{
MapLikeType localMapLikeType1 = (MapLikeType)mapAbstractType(paramDeserializationConfig, paramMapLikeType);
BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectForCreation(localMapLikeType1);
JsonDeserializer localJsonDeserializer1 = findDeserializerFromAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), paramBeanProperty);
if (localJsonDeserializer1 != null)
return localJsonDeserializer1;
MapLikeType localMapLikeType2 = (MapLikeType)modifyTypeByAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), localMapLikeType1, null);
JavaType localJavaType1 = localMapLikeType2.getKeyType();
JavaType localJavaType2 = localMapLikeType2.getContentType();
JsonDeserializer localJsonDeserializer2 = (JsonDeserializer)localJavaType2.getValueHandler();
KeyDeserializer localKeyDeserializer1 = (KeyDeserializer)localJavaType1.getValueHandler();
if (localKeyDeserializer1 == null);
for (KeyDeserializer localKeyDeserializer2 = paramDeserializerProvider.findKeyDeserializer(paramDeserializationConfig, localJavaType1, paramBeanProperty); ; localKeyDeserializer2 = localKeyDeserializer1)
{
TypeDeserializer localTypeDeserializer1 = (TypeDeserializer)localJavaType2.getTypeHandler();
if (localTypeDeserializer1 == null);
for (TypeDeserializer localTypeDeserializer2 = findTypeDeserializer(paramDeserializationConfig, localJavaType2, paramBeanProperty); ; localTypeDeserializer2 = localTypeDeserializer1)
return _findCustomMapLikeDeserializer(localMapLikeType2, paramDeserializationConfig, paramDeserializerProvider, localBasicBeanDescription, paramBeanProperty, localKeyDeserializer2, localTypeDeserializer2, localJsonDeserializer2);
}
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:22,代码来源:BasicDeserializerFactory.java
示例5: findStringBasedKeyDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType)
{
BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspect(paramJavaType);
Constructor localConstructor = localBasicBeanDescription.findSingleArgConstructor(new Class[] { String.class });
if (localConstructor != null)
{
if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
ClassUtil.checkAndFixAccess(localConstructor);
return new StdKeyDeserializer.StringCtorKeyDeserializer(localConstructor);
}
Method localMethod = localBasicBeanDescription.findFactoryMethod(new Class[] { String.class });
if (localMethod != null)
{
if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
ClassUtil.checkAndFixAccess(localMethod);
return new StdKeyDeserializer.StringFactoryKeyDeserializer(localMethod);
}
return null;
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:20,代码来源:StdKeyDeserializers.java
示例6: findMapDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public final JsonDeserializer<?> findMapDeserializer(MapType paramMapType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer)
{
Class localClass = paramMapType.getRawClass();
if (dh.class.isAssignableFrom(localClass))
{
dx.class.isAssignableFrom(localClass);
cq.class.isAssignableFrom(localClass);
return new e(paramMapType, paramKeyDeserializer, paramTypeDeserializer, a(paramJsonDeserializer, paramDeserializationConfig, paramDeserializerProvider, paramBeanProperty, paramMapType));
}
if (hs.class.isAssignableFrom(localClass))
{
ep.class.isAssignableFrom(localClass);
jb.class.isAssignableFrom(localClass);
kf.class.isAssignableFrom(localClass);
}
return null;
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:18,代码来源:a.java
示例7: addDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public SimpleKeyDeserializers addDeserializer(Class<?> paramClass, KeyDeserializer paramKeyDeserializer)
{
if (this._classMappings == null)
this._classMappings = new HashMap();
this._classMappings.put(new ClassKey(paramClass), paramKeyDeserializer);
return this;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:8,代码来源:SimpleKeyDeserializers.java
示例8: addKeyDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public SimpleModule addKeyDeserializer(Class<?> paramClass, KeyDeserializer paramKeyDeserializer)
{
if (this._keyDeserializers == null)
this._keyDeserializers = new SimpleKeyDeserializers();
this._keyDeserializers.addDeserializer(paramClass, paramKeyDeserializer);
return this;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:8,代码来源:SimpleModule.java
示例9: findMapDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public JsonDeserializer<?> findMapDeserializer(MapType paramMapType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer)
throws JsonMappingException
{
if (this._classMappings == null)
return null;
return (JsonDeserializer)this._classMappings.get(new ClassKey(paramMapType.getRawClass()));
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:8,代码来源:SimpleDeserializers.java
示例10: findMapLikeDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public JsonDeserializer<?> findMapLikeDeserializer(MapLikeType paramMapLikeType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BeanDescription paramBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer)
throws JsonMappingException
{
if (this._classMappings == null)
return null;
return (JsonDeserializer)this._classMappings.get(new ClassKey(paramMapLikeType.getRawClass()));
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:8,代码来源:SimpleDeserializers.java
示例11: findKeyDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public Class<? extends KeyDeserializer> findKeyDeserializer(Annotated paramAnnotated)
{
JsonDeserialize localJsonDeserialize = (JsonDeserialize)paramAnnotated.getAnnotation(JsonDeserialize.class);
if (localJsonDeserialize != null)
{
Class localClass = localJsonDeserialize.keyUsing();
if (localClass != KeyDeserializer.None.class)
return localClass;
}
return null;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:12,代码来源:JacksonAnnotationIntrospector.java
示例12: resolveType
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
protected JavaType resolveType(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, JavaType paramJavaType, AnnotatedMember paramAnnotatedMember, BeanProperty paramBeanProperty)
{
if (paramJavaType.isContainerType())
{
AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
JavaType localJavaType = paramJavaType.getKeyType();
if (localJavaType != null)
{
Class localClass2 = localAnnotationIntrospector.findKeyDeserializer(paramAnnotatedMember);
if ((localClass2 != null) && (localClass2 != KeyDeserializer.None.class))
localJavaType.setValueHandler(paramDeserializationConfig.keyDeserializerInstance(paramAnnotatedMember, localClass2));
}
Class localClass1 = localAnnotationIntrospector.findContentDeserializer(paramAnnotatedMember);
if ((localClass1 != null) && (localClass1 != JsonDeserializer.None.class))
{
JsonDeserializer localJsonDeserializer = paramDeserializationConfig.deserializerInstance(paramAnnotatedMember, localClass1);
paramJavaType.getContentType().setValueHandler(localJsonDeserializer);
}
if ((paramAnnotatedMember instanceof AnnotatedMember))
{
TypeDeserializer localTypeDeserializer2 = findPropertyContentTypeDeserializer(paramDeserializationConfig, paramJavaType, paramAnnotatedMember, paramBeanProperty);
if (localTypeDeserializer2 != null)
paramJavaType = paramJavaType.withContentTypeHandler(localTypeDeserializer2);
}
}
if ((paramAnnotatedMember instanceof AnnotatedMember));
for (TypeDeserializer localTypeDeserializer1 = findPropertyTypeDeserializer(paramDeserializationConfig, paramJavaType, paramAnnotatedMember, paramBeanProperty); ; localTypeDeserializer1 = findTypeDeserializer(paramDeserializationConfig, paramJavaType, null))
{
if (localTypeDeserializer1 != null)
paramJavaType = paramJavaType.withTypeHandler(localTypeDeserializer1);
return paramJavaType;
}
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:34,代码来源:BasicDeserializerFactory.java
示例13: MapDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public MapDeserializer(JavaType paramJavaType, Constructor<Map<Object, Object>> paramConstructor, KeyDeserializer paramKeyDeserializer, JsonDeserializer<Object> paramJsonDeserializer, TypeDeserializer paramTypeDeserializer)
{
super(Map.class);
this._mapType = paramJavaType;
this._defaultCtor = paramConstructor;
this._keyDeserializer = paramKeyDeserializer;
this._valueDeserializer = paramJsonDeserializer;
this._valueTypeDeserializer = paramTypeDeserializer;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:10,代码来源:MapDeserializer.java
示例14: findStringBasedKeyDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public static KeyDeserializer findStringBasedKeyDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType)
{
BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspect(paramJavaType);
Constructor localConstructor = localBasicBeanDescription.findSingleArgConstructor(new Class[] { String.class });
if (localConstructor != null)
return new StdKeyDeserializer.StringCtorKeyDeserializer(localConstructor);
Method localMethod = localBasicBeanDescription.findFactoryMethod(new Class[] { String.class });
if (localMethod != null)
return new StdKeyDeserializer.StringFactoryKeyDeserializer(localMethod);
return null;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:12,代码来源:StdKeyDeserializers.java
示例15: _findCustomMapDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
protected JsonDeserializer<?> _findCustomMapDeserializer(MapType paramMapType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer)
throws JsonMappingException
{
Iterator localIterator = this._factoryConfig.deserializers().iterator();
while (localIterator.hasNext())
{
JsonDeserializer localJsonDeserializer = ((Deserializers)localIterator.next()).findMapDeserializer(paramMapType, paramDeserializationConfig, paramDeserializerProvider, paramBasicBeanDescription, paramBeanProperty, paramKeyDeserializer, paramTypeDeserializer, paramJsonDeserializer);
if (localJsonDeserializer != null)
return localJsonDeserializer;
}
return null;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:13,代码来源:BeanDeserializerFactory.java
示例16: _findCustomMapLikeDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
protected JsonDeserializer<?> _findCustomMapLikeDeserializer(MapLikeType paramMapLikeType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer)
throws JsonMappingException
{
Iterator localIterator = this._factoryConfig.deserializers().iterator();
while (localIterator.hasNext())
{
JsonDeserializer localJsonDeserializer = ((Deserializers)localIterator.next()).findMapLikeDeserializer(paramMapLikeType, paramDeserializationConfig, paramDeserializerProvider, paramBasicBeanDescription, paramBeanProperty, paramKeyDeserializer, paramTypeDeserializer, paramJsonDeserializer);
if (localJsonDeserializer != null)
return localJsonDeserializer;
}
return null;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:13,代码来源:BeanDeserializerFactory.java
示例17: findKeyDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
@Override
public Class<? extends KeyDeserializer> findKeyDeserializer(Annotated a)
{
JsonDeserialize ann = a.getAnnotation(JsonDeserialize.class);
if (ann != null) {
Class<? extends KeyDeserializer> deserClass = ann.keyUsing();
if (deserClass != KeyDeserializer.None.class) {
return deserClass;
}
}
return null;
}
开发者ID:r00li,项目名称:RHome,代码行数:13,代码来源:JacksonAnnotationIntrospector.java
示例18: MapDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
public MapDeserializer(JavaType paramJavaType, ValueInstantiator paramValueInstantiator, KeyDeserializer paramKeyDeserializer, JsonDeserializer<Object> paramJsonDeserializer, TypeDeserializer paramTypeDeserializer)
{
super(Map.class);
this._mapType = paramJavaType;
this._keyDeserializer = paramKeyDeserializer;
this._valueDeserializer = paramJsonDeserializer;
this._valueTypeDeserializer = paramTypeDeserializer;
this._valueInstantiator = paramValueInstantiator;
if (paramValueInstantiator.canCreateFromObjectWith());
for (this._propertyBasedCreator = new PropertyBasedCreator(paramValueInstantiator); ; this._propertyBasedCreator = null)
{
this._hasDefaultCreator = paramValueInstantiator.canCreateUsingDefault();
return;
}
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:16,代码来源:MapDeserializer.java
示例19: _findCustomMapDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
protected JsonDeserializer<?> _findCustomMapDeserializer(MapType paramMapType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer)
{
Iterator localIterator = this._factoryConfig.deserializers().iterator();
while (localIterator.hasNext())
{
JsonDeserializer localJsonDeserializer = ((Deserializers)localIterator.next()).findMapDeserializer(paramMapType, paramDeserializationConfig, paramDeserializerProvider, paramBasicBeanDescription, paramBeanProperty, paramKeyDeserializer, paramTypeDeserializer, paramJsonDeserializer);
if (localJsonDeserializer != null)
return localJsonDeserializer;
}
return null;
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:12,代码来源:BeanDeserializerFactory.java
示例20: _findCustomMapLikeDeserializer
import org.codehaus.jackson.map.KeyDeserializer; //导入依赖的package包/类
protected JsonDeserializer<?> _findCustomMapLikeDeserializer(MapLikeType paramMapLikeType, DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, KeyDeserializer paramKeyDeserializer, TypeDeserializer paramTypeDeserializer, JsonDeserializer<?> paramJsonDeserializer)
{
Iterator localIterator = this._factoryConfig.deserializers().iterator();
while (localIterator.hasNext())
{
JsonDeserializer localJsonDeserializer = ((Deserializers)localIterator.next()).findMapLikeDeserializer(paramMapLikeType, paramDeserializationConfig, paramDeserializerProvider, paramBasicBeanDescription, paramBeanProperty, paramKeyDeserializer, paramTypeDeserializer, paramJsonDeserializer);
if (localJsonDeserializer != null)
return localJsonDeserializer;
}
return null;
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:12,代码来源:BeanDeserializerFactory.java
注:本文中的org.codehaus.jackson.map.KeyDeserializer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论