当前位置: 首页>>代码示例>>Java>>正文


Java JavaType.getRawClass方法代码示例

本文整理汇总了Java中org.codehaus.jackson.type.JavaType.getRawClass方法的典型用法代码示例。如果您正苦于以下问题:Java JavaType.getRawClass方法的具体用法?Java JavaType.getRawClass怎么用?Java JavaType.getRawClass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.codehaus.jackson.type.JavaType的用法示例。


在下文中一共展示了JavaType.getRawClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createEnumDeserializer

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JsonDeserializer<?> createEnumDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, JavaType paramJavaType, BeanProperty paramBeanProperty)
  throws JsonMappingException
{
  BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectForCreation(paramJavaType);
  JsonDeserializer localJsonDeserializer1 = findDeserializerFromAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), paramBeanProperty);
  if (localJsonDeserializer1 != null)
    return localJsonDeserializer1;
  Class localClass = paramJavaType.getRawClass();
  JsonDeserializer localJsonDeserializer2 = _findCustomEnumDeserializer(localClass, paramDeserializationConfig, localBasicBeanDescription, paramBeanProperty);
  if (localJsonDeserializer2 != null)
    return localJsonDeserializer2;
  Iterator localIterator = localBasicBeanDescription.getFactoryMethods().iterator();
  while (localIterator.hasNext())
  {
    AnnotatedMethod localAnnotatedMethod = (AnnotatedMethod)localIterator.next();
    if (!paramDeserializationConfig.getAnnotationIntrospector().hasCreatorAnnotation(localAnnotatedMethod))
      continue;
    if ((localAnnotatedMethod.getParameterCount() == 1) && (localAnnotatedMethod.getRawType().isAssignableFrom(localClass)))
      return EnumDeserializer.deserializerForCreator(paramDeserializationConfig, localClass, localAnnotatedMethod);
    throw new IllegalArgumentException("Unsuitable method (" + localAnnotatedMethod + ") decorated with @JsonCreator (for Enum type " + localClass.getName() + ")");
  }
  return new EnumDeserializer(constructEnumResolver(localClass, paramDeserializationConfig));
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:24,代码来源:BasicDeserializerFactory.java

示例2: findTypeParameters

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JavaType[] findTypeParameters(JavaType paramJavaType, Class<?> paramClass)
{
  Class localClass = paramJavaType.getRawClass();
  if (localClass == paramClass)
  {
    int i = paramJavaType.containedTypeCount();
    JavaType[] arrayOfJavaType;
    if (i == 0)
      arrayOfJavaType = null;
    while (true)
    {
      return arrayOfJavaType;
      arrayOfJavaType = new JavaType[i];
      for (int j = 0; j < i; j++)
        arrayOfJavaType[j] = paramJavaType.containedType(j);
    }
  }
  return findTypeParameters(localClass, paramClass, new TypeBindings(this, paramJavaType));
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:20,代码来源:TypeFactory.java

示例3: useForType

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
@Override
public boolean useForType(JavaType t)
{
  if (t.getRawClass() == Object.class) {
    return true;
  }
  if (t.getRawClass().getName().startsWith("java.")) {
    return false;
  }
  if (t.isArrayType()) {
    return false;
  }
  return super.useForType(t);
}
 
开发者ID:apache,项目名称:apex-core,代码行数:15,代码来源:LogicalPlanSerializer.java

示例4: createSerializer

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
@Override
public JsonSerializer<Object> createSerializer(SerializationConfig config, JavaType baseType, BeanProperty property) {
	if (baseType.getRawClass() == TestBeanSimple.class) {
		return new TestBeanSimpleSerializer();
	}
	else {
		return super.createSerializer(config, baseType, property);
	}
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:10,代码来源:MappingJacksonJsonViewTests.java

示例5: isNaturalTypeWithStdHandling

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
protected boolean isNaturalTypeWithStdHandling(JavaType paramJavaType, JsonSerializer<?> paramJsonSerializer)
{
  Class localClass = paramJavaType.getRawClass();
  if (paramJavaType.isPrimitive())
    if ((localClass == Integer.TYPE) || (localClass == Boolean.TYPE) || (localClass == Double.TYPE))
      break label59;
  label59: 
  do
    do
      return false;
    while ((localClass != String.class) && (localClass != Integer.class) && (localClass != Boolean.class) && (localClass != Double.class));
  while (paramJsonSerializer.getClass().getAnnotation(JacksonStdImpl.class) == null);
  return true;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:15,代码来源:JsonValueSerializer.java

示例6: _mapAbstractType2

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
protected JavaType _mapAbstractType2(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType)
  throws JsonMappingException
{
  Class localClass = paramJavaType.getRawClass();
  JavaType localJavaType;
  if (this._factoryConfig.hasAbstractTypeResolvers())
  {
    Iterator localIterator = this._factoryConfig.abstractTypeResolvers().iterator();
    do
    {
      if (!localIterator.hasNext())
        break;
      localJavaType = ((AbstractTypeResolver)localIterator.next()).findTypeMapping(paramDeserializationConfig, paramJavaType);
    }
    while ((localJavaType == null) || (localJavaType.getRawClass() == localClass));
  }
  do
  {
    return localJavaType;
    AbstractTypeResolver localAbstractTypeResolver = paramDeserializationConfig.getAbstractTypeResolver();
    if (localAbstractTypeResolver == null)
      break;
    localJavaType = localAbstractTypeResolver.findTypeMapping(paramDeserializationConfig, paramJavaType);
  }
  while ((localJavaType != null) && (localJavaType.getRawClass() != localClass));
  return null;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:28,代码来源:BeanDeserializerFactory.java

示例7: getSchema

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JsonNode getSchema(SerializerProvider paramSerializerProvider, Type paramType)
  throws JsonMappingException
{
  ObjectNode localObjectNode = createSchemaNode("array", true);
  JavaType localJavaType = null;
  if (paramType != null)
  {
    localJavaType = paramSerializerProvider.constructType(paramType).getContentType();
    if ((localJavaType == null) && ((paramType instanceof ParameterizedType)))
    {
      Type[] arrayOfType = ((ParameterizedType)paramType).getActualTypeArguments();
      if (arrayOfType.length == 1)
        localJavaType = paramSerializerProvider.constructType(arrayOfType[0]);
    }
  }
  if ((localJavaType == null) && (this._elementType != null))
    localJavaType = this._elementType;
  if (localJavaType != null)
  {
    Class localClass = localJavaType.getRawClass();
    JsonNode localJsonNode = null;
    if (localClass != Object.class)
    {
      JsonSerializer localJsonSerializer = paramSerializerProvider.findValueSerializer(localJavaType, this._property);
      boolean bool = localJsonSerializer instanceof SchemaAware;
      localJsonNode = null;
      if (bool)
        localJsonNode = ((SchemaAware)localJsonSerializer).getSchema(paramSerializerProvider, null);
    }
    if (localJsonNode == null)
      localJsonNode = JsonSchema.getDefaultSchemaNode();
    localObjectNode.put("items", localJsonNode);
  }
  return localObjectNode;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:36,代码来源:ContainerSerializers.java

示例8: findSerializerByAddonType

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public final JsonSerializer<?> findSerializerByAddonType(SerializationConfig paramSerializationConfig, JavaType paramJavaType, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, boolean paramBoolean)
  throws JsonMappingException
{
  Class localClass = paramJavaType.getRawClass();
  if (Iterator.class.isAssignableFrom(localClass))
    return buildIteratorSerializer(paramSerializationConfig, paramJavaType, paramBasicBeanDescription, paramBeanProperty, paramBoolean);
  if (Iterable.class.isAssignableFrom(localClass))
    return buildIterableSerializer(paramSerializationConfig, paramJavaType, paramBasicBeanDescription, paramBeanProperty, paramBoolean);
  if (CharSequence.class.isAssignableFrom(localClass))
    return ToStringSerializer.instance;
  return null;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:13,代码来源:BasicSerializerFactory.java

示例9: findTypeMapping

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JavaType findTypeMapping(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType)
{
  Class localClass1 = paramJavaType.getRawClass();
  Class localClass2 = (Class)this._mappings.get(new ClassKey(localClass1));
  if (localClass2 == null)
    return null;
  return paramJavaType.narrowBy(localClass2);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:9,代码来源:SimpleAbstractTypeResolver.java

示例10: forCreation

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public BasicBeanDescription forCreation(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, ClassIntrospector.MixInResolver paramMixInResolver)
{
  boolean bool = paramDeserializationConfig.isAnnotationProcessingEnabled();
  AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
  Class localClass = paramJavaType.getRawClass();
  if (bool);
  while (true)
  {
    AnnotatedClass localAnnotatedClass = AnnotatedClass.construct(localClass, localAnnotationIntrospector, paramMixInResolver);
    localAnnotatedClass.resolveCreators(true);
    return new BasicBeanDescription(paramDeserializationConfig, paramJavaType, localAnnotatedClass);
    localAnnotationIntrospector = null;
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:15,代码来源:BasicClassIntrospector.java

示例11: mapAbstractType

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
protected JavaType mapAbstractType(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType)
  throws JsonMappingException
{
  while (true)
  {
    JavaType localJavaType = _mapAbstractType2(paramDeserializationConfig, paramJavaType);
    if (localJavaType == null)
      return paramJavaType;
    Class localClass1 = paramJavaType.getRawClass();
    Class localClass2 = localJavaType.getRawClass();
    if ((localClass1 == localClass2) || (!localClass1.isAssignableFrom(localClass2)))
      throw new IllegalArgumentException("Invalid abstract type resolution from " + paramJavaType + " to " + localJavaType + ": latter is not a subtype of former");
    paramJavaType = localJavaType;
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:16,代码来源:BeanDeserializerFactory.java

示例12: createCollectionDeserializer

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JsonDeserializer<?> createCollectionDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, CollectionType paramCollectionType, BeanProperty paramBeanProperty)
  throws JsonMappingException
{
  CollectionType localCollectionType1 = (CollectionType)mapAbstractType(paramDeserializationConfig, paramCollectionType);
  Object localObject = localCollectionType1.getRawClass();
  BasicBeanDescription localBasicBeanDescription = (BasicBeanDescription)paramDeserializationConfig.introspectClassAnnotations((Class)localObject);
  JsonDeserializer localJsonDeserializer1 = findDeserializerFromAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), paramBeanProperty);
  if (localJsonDeserializer1 != null)
    return localJsonDeserializer1;
  CollectionType localCollectionType2 = (CollectionType)modifyTypeByAnnotation(paramDeserializationConfig, localBasicBeanDescription.getClassInfo(), localCollectionType1, null);
  JavaType localJavaType = localCollectionType2.getContentType();
  JsonDeserializer localJsonDeserializer2 = (JsonDeserializer)localJavaType.getValueHandler();
  TypeDeserializer localTypeDeserializer = (TypeDeserializer)localJavaType.getTypeHandler();
  if (localTypeDeserializer == null)
    localTypeDeserializer = findTypeDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty);
  JsonDeserializer localJsonDeserializer3 = _findCustomCollectionDeserializer(localCollectionType2, paramDeserializationConfig, paramDeserializerProvider, localBasicBeanDescription, paramBeanProperty, localTypeDeserializer, localJsonDeserializer2);
  if (localJsonDeserializer3 != null)
    return localJsonDeserializer3;
  if (localJsonDeserializer2 == null)
  {
    if (EnumSet.class.isAssignableFrom((Class)localObject))
      return new EnumSetDeserializer(constructEnumResolver(localJavaType.getRawClass(), paramDeserializationConfig));
    localJsonDeserializer2 = paramDeserializerProvider.findValueDeserializer(paramDeserializationConfig, localJavaType, paramBeanProperty);
  }
  if ((localCollectionType2.isInterface()) || (localCollectionType2.isAbstract()))
  {
    Class localClass = (Class)_collectionFallbacks.get(((Class)localObject).getName());
    if (localClass == null)
      throw new IllegalArgumentException("Can not find a deserializer for non-concrete Collection type " + localCollectionType2);
    localObject = localClass;
  }
  Constructor localConstructor = ClassUtil.findConstructor((Class)localObject, paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS));
  if (localJavaType.getRawClass() == String.class)
    return new StringCollectionDeserializer(localCollectionType2, localJsonDeserializer2, localConstructor);
  return (JsonDeserializer<?>)new CollectionDeserializer(localCollectionType2, localJsonDeserializer2, localTypeDeserializer, localConstructor);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:37,代码来源:BasicDeserializerFactory.java

示例13: createTreeDeserializer

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JsonDeserializer<?> createTreeDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, JavaType paramJavaType, BeanProperty paramBeanProperty)
  throws JsonMappingException
{
  Class localClass = paramJavaType.getRawClass();
  JsonDeserializer localJsonDeserializer = _findCustomTreeNodeDeserializer(localClass, paramDeserializationConfig, paramBeanProperty);
  if (localJsonDeserializer != null)
    return localJsonDeserializer;
  return JsonNodeDeserializer.getDeserializer(localClass);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:10,代码来源:BasicDeserializerFactory.java

示例14: StdDeserializer

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
protected StdDeserializer(JavaType paramJavaType)
{
  if (paramJavaType == null);
  for (Class localClass = null; ; localClass = paramJavaType.getRawClass())
  {
    this._valueClass = localClass;
    return;
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:10,代码来源:StdDeserializer.java

示例15: createBeanDeserializer

import org.codehaus.jackson.type.JavaType; //导入方法依赖的package包/类
public JsonDeserializer<Object> createBeanDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, JavaType paramJavaType, BeanProperty paramBeanProperty)
  throws JsonMappingException
{
  ClassKey localClassKey = new ClassKey(paramJavaType.getRawClass());
  if (this._directClassMappings != null)
  {
    JsonDeserializer localJsonDeserializer = (JsonDeserializer)this._directClassMappings.get(localClassKey);
    if (localJsonDeserializer != null)
      return localJsonDeserializer;
  }
  return super.createBeanDeserializer(paramDeserializationConfig, paramDeserializerProvider, paramJavaType, paramBeanProperty);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:13,代码来源:CustomDeserializerFactory.java


注:本文中的org.codehaus.jackson.type.JavaType.getRawClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。