• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AnnotationIntrospector类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.codehaus.jackson.map.AnnotationIntrospector的典型用法代码示例。如果您正苦于以下问题:Java AnnotationIntrospector类的具体用法?Java AnnotationIntrospector怎么用?Java AnnotationIntrospector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AnnotationIntrospector类属于org.codehaus.jackson.map包,在下文中一共展示了AnnotationIntrospector类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: CustomObjectMapper

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
   public CustomObjectMapper()
{
	super();
	this.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
	this.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);
	this.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, false);
	
	this.setSerializationInclusion(JsonSerialize.Inclusion.NON_DEFAULT); 
	this.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
	this.setSerializationInclusion(JsonSerialize.Inclusion.NON_EMPTY);

	final AnnotationIntrospector introspector = new JaxbAnnotationIntrospector();
	
	// make deserializer use JAXB annotations (only)
	this.setAnnotationIntrospector(introspector);
	
	// TODO leverage NamingStrategy to make reponse attributes more Java-like
	//this.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
}
 
开发者ID:SAP,项目名称:SAP-cloud-dqm-sample-java,代码行数:23,代码来源:CustomObjectMapper.java


示例2: JsonModelSerializer

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
public JsonModelSerializer(boolean doNullValues, Class<T> serializedType) {
		super();
		objectMapper = new ObjectMapper();
		AnnotationIntrospector introspector = new JaxbAnnotationIntrospector();
		// make serializer use JAXB annotations (only)
		SerializationConfig sc = objectMapper.getSerializationConfig().withAnnotationIntrospector(introspector);
		sc.with(SerializationConfig.Feature.INDENT_OUTPUT);
		
		if (!doNullValues) {
			sc.without(SerializationConfig.Feature.WRITE_NULL_MAP_VALUES);
			sc.without(SerializationConfig.Feature.WRITE_EMPTY_JSON_ARRAYS);
			sc = sc.withSerializationInclusion(Inclusion.NON_EMPTY);
		}
		
		objectMapper.setSerializationConfig(sc);
//		if (!doNullValues) {
//			objectMapper.setSerializationInclusion(Inclusion.NON_EMPTY);
//		}
	}
 
开发者ID:ina-foss,项目名称:amalia-model,代码行数:20,代码来源:JsonModelSerializer.java


示例3: buildJson

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
private String buildJson(Object object) {

        ObjectMapper mapper = new ObjectMapper();
        SerializationConfig serializationConfig = mapper.getSerializationConfig();
        serializationConfig = serializationConfig.withSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
        AnnotationIntrospector introspector = new JaxbAnnotationIntrospector();
        mapper.setSerializationConfig(serializationConfig);
        mapper.setAnnotationIntrospector(introspector);

        try {
            return mapper.writeValueAsString(object);
        } catch (IOException e) {
            log.warn("Can't marshal search criteria.");
            throw new RuntimeException("Failed inFolder build criteria json.", e);
        }
    }
 
开发者ID:Jaspersoft,项目名称:jrs-rest-java-client,代码行数:17,代码来源:BatchJobsOperationsAdapter.java


示例4: main

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
public static void main(String[] args) throws JsonMappingException {
	ObjectMapper jsonMapper = new ObjectMapper();
    AnnotationIntrospector introspector = new AnnotationIntrospector.Pair(new JaxbAnnotationIntrospector(), 
    		new JacksonAnnotationIntrospector());
    jsonMapper.setAnnotationIntrospector(introspector);
    JsonSchema schema = jsonMapper.generateJsonSchema(Testi.class);
    if(Testi.class.getAnnotation(XmlRootElement.class)!=null
    		&& !Testi.class.getAnnotation(XmlRootElement.class).name().equals("##default"))
    	schema.getSchemaNode().put("name", Testi.class.getAnnotation(XmlRootElement.class).name());
    else if(Testi.class.getAnnotation(XmlType.class)!=null
    		&& !Testi.class.getAnnotation(XmlType.class).name().equals("##default"))
    	schema.getSchemaNode().put("name", Testi.class.getAnnotation(XmlType.class).name());
    else
    	schema.getSchemaNode().put("name", Testi.class.getSimpleName());
    String schemaJson = schema.toString();
	System.out.println(schemaJson);
}
 
开发者ID:sumeetchhetri,项目名称:test-html-generator-plugin,代码行数:18,代码来源:Testi.java


示例5: collectAndResolveSubtypes

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
public Collection<NamedType> collectAndResolveSubtypes(AnnotatedClass paramAnnotatedClass, MapperConfig<?> paramMapperConfig, AnnotationIntrospector paramAnnotationIntrospector)
{
  HashMap localHashMap = new HashMap();
  if (this._registeredSubtypes != null)
  {
    Class localClass = paramAnnotatedClass.getRawType();
    Iterator localIterator = this._registeredSubtypes.iterator();
    while (localIterator.hasNext())
    {
      NamedType localNamedType = (NamedType)localIterator.next();
      if (!localClass.isAssignableFrom(localNamedType.getType()))
        continue;
      _collectAndResolve(AnnotatedClass.constructWithoutSuperTypes(localNamedType.getType(), paramAnnotationIntrospector, paramMapperConfig), localNamedType, paramMapperConfig, paramAnnotationIntrospector, localHashMap);
    }
  }
  _collectAndResolve(paramAnnotatedClass, new NamedType(paramAnnotatedClass.getRawType(), null), paramMapperConfig, paramAnnotationIntrospector, localHashMap);
  return new ArrayList(localHashMap.values());
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:19,代码来源:StdSubtypeResolver.java


示例6: removeIgnorableTypes

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
protected <T extends AnnotatedMember> void removeIgnorableTypes(SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription, Map<String, T> paramMap)
{
  if (paramMap.isEmpty());
  while (true)
  {
    return;
    AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
    Iterator localIterator = paramMap.entrySet().iterator();
    HashMap localHashMap = new HashMap();
    while (localIterator.hasNext())
    {
      Class localClass = ((AnnotatedMember)((Map.Entry)localIterator.next()).getValue()).getRawType();
      Boolean localBoolean = (Boolean)localHashMap.get(localClass);
      if (localBoolean == null)
      {
        localBoolean = localAnnotationIntrospector.isIgnorableType(((BasicBeanDescription)paramSerializationConfig.introspectClassAnnotations(localClass)).getClassInfo());
        if (localBoolean == null)
          localBoolean = Boolean.FALSE;
        localHashMap.put(localClass, localBoolean);
      }
      if (!localBoolean.booleanValue())
        continue;
      localIterator.remove();
    }
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:27,代码来源:BeanSerializerFactory.java


示例7: forDeserialization

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
public BasicBeanDescription forDeserialization(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.resolveMemberMethods(getDeserializationMethodFilter(paramDeserializationConfig), true);
    localAnnotatedClass.resolveCreators(true);
    localAnnotatedClass.resolveFields(true);
    return new BasicBeanDescription(paramDeserializationConfig, paramJavaType, localAnnotatedClass);
    localAnnotationIntrospector = null;
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:17,代码来源:BasicClassIntrospector.java


示例8: findTypeDeserializer

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
public TypeDeserializer findTypeDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BeanProperty paramBeanProperty)
{
  AnnotatedClass localAnnotatedClass = ((BasicBeanDescription)paramDeserializationConfig.introspectClassAnnotations(paramJavaType.getRawClass())).getClassInfo();
  AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
  TypeResolverBuilder localTypeResolverBuilder = localAnnotationIntrospector.findTypeResolver(paramDeserializationConfig, localAnnotatedClass, paramJavaType);
  Collection localCollection;
  if (localTypeResolverBuilder == null)
  {
    localTypeResolverBuilder = paramDeserializationConfig.getDefaultTyper(paramJavaType);
    localCollection = null;
    if (localTypeResolverBuilder == null)
      return null;
  }
  else
  {
    localCollection = paramDeserializationConfig.getSubtypeResolver().collectAndResolveSubtypes(localAnnotatedClass, paramDeserializationConfig, localAnnotationIntrospector);
  }
  return localTypeResolverBuilder.buildTypeDeserializer(paramDeserializationConfig, paramJavaType, localCollection, paramBeanProperty);
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:20,代码来源:BasicDeserializerFactory.java


示例9: constructSettableProperty

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的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;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:21,代码来源:BeanDeserializerFactory.java


示例10: findDeserializerCreators

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的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;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:25,代码来源:BeanDeserializerFactory.java


示例11: constructFromName

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
public static EnumValues constructFromName(Class<Enum<?>> paramClass, AnnotationIntrospector paramAnnotationIntrospector)
{
  Enum[] arrayOfEnum = (Enum[])ClassUtil.findEnumType(paramClass).getEnumConstants();
  if (arrayOfEnum != null)
  {
    HashMap localHashMap = new HashMap();
    int i = arrayOfEnum.length;
    for (int j = 0; j < i; j++)
    {
      Enum localEnum = arrayOfEnum[j];
      localHashMap.put(localEnum, new SerializedString(paramAnnotationIntrospector.findEnumValue(localEnum)));
    }
    return new EnumValues(localHashMap);
  }
  throw new IllegalArgumentException("Can not determine enum constants for Class " + paramClass.getName());
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:17,代码来源:EnumValues.java


示例12: constructFromToString

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
public static EnumValues constructFromToString(Class<Enum<?>> paramClass, AnnotationIntrospector paramAnnotationIntrospector)
{
  Enum[] arrayOfEnum = (Enum[])ClassUtil.findEnumType(paramClass).getEnumConstants();
  if (arrayOfEnum != null)
  {
    HashMap localHashMap = new HashMap();
    int i = arrayOfEnum.length;
    for (int j = 0; j < i; j++)
    {
      Enum localEnum = arrayOfEnum[j];
      localHashMap.put(localEnum, new SerializedString(localEnum.toString()));
    }
    return new EnumValues(localHashMap);
  }
  throw new IllegalArgumentException("Can not determine enum constants for Class " + paramClass.getName());
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:17,代码来源:EnumValues.java


示例13: getObjectMapper

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
@Bean(name="defaultObjectMapper")
public ObjectMapper getObjectMapper() {
    if(defaultObjectMapper==null) {
        ObjectMapper mapper = new ObjectMapper();
        AnnotationIntrospector primary = new JaxbAnnotationIntrospector();
        AnnotationIntrospector secondary = new JacksonAnnotationIntrospector();
        AnnotationIntrospector pair = new AnnotationIntrospector.Pair(primary, secondary);
        mapper.getDeserializationConfig().setAnnotationIntrospector(pair);
        mapper.getDeserializationConfig().set(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        mapper.getSerializationConfig().setAnnotationIntrospector(pair);
        mapper.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
        mapper.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, false);
        mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT, true);
        this.defaultObjectMapper = mapper;
    }
    return defaultObjectMapper;
}
 
开发者ID:parekhparth,项目名称:SimpleJavaWS,代码行数:18,代码来源:ServiceConfiguration.java


示例14: forSerialization

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
public BasicBeanDescription forSerialization(SerializationConfig cfg,
                                             Class<?> c,
                                             MixInResolver r)
{
    AnnotationIntrospector ai = cfg.getAnnotationIntrospector();
    AnnotatedClass ac = AnnotatedClass.construct(c, ai, r);
    // False -> no need to collect ignorable member list
    ac.resolveMemberMethods(getSerializationMethodFilter(cfg), false);
    /* only the default constructor needed here (that's needed
     * in case we need to check default bean property values,
     * to omit them)
     */
    /* 31-Oct-2009, tatus: Actually, creator info will come in handy
     *   for resolving [JACKSON-170] as well
     */
    ac.resolveCreators(true);
    // False -> no need to collect ignorable field list
    ac.resolveFields(false);
    return new BasicBeanDescription(TypeFactory.type(c), ac, ai);
}
 
开发者ID:r00li,项目名称:RHome,代码行数:21,代码来源:BasicClassIntrospector.java


示例15: collectAndResolveSubtypes

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
public Collection<NamedType> collectAndResolveSubtypes(AnnotatedClass paramAnnotatedClass, MapperConfig<?> paramMapperConfig, AnnotationIntrospector paramAnnotationIntrospector)
{
  HashMap localHashMap = new HashMap();
  if (this._registeredSubtypes != null)
  {
    Class localClass = paramAnnotatedClass.getRawType();
    Iterator localIterator = this._registeredSubtypes.iterator();
    while (localIterator.hasNext())
    {
      NamedType localNamedType = (NamedType)localIterator.next();
      if (localClass.isAssignableFrom(localNamedType.getType()))
        _collectAndResolve(AnnotatedClass.constructWithoutSuperTypes(localNamedType.getType(), paramAnnotationIntrospector, paramMapperConfig), localNamedType, paramMapperConfig, paramAnnotationIntrospector, localHashMap);
    }
  }
  _collectAndResolve(paramAnnotatedClass, new NamedType(paramAnnotatedClass.getRawType(), null), paramMapperConfig, paramAnnotationIntrospector, localHashMap);
  return new ArrayList(localHashMap.values());
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:18,代码来源:StdSubtypeResolver.java


示例16: POJOPropertiesCollector

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
protected POJOPropertiesCollector(MapperConfig<?> paramMapperConfig, boolean paramBoolean, JavaType paramJavaType, AnnotatedClass paramAnnotatedClass)
{
  this._config = paramMapperConfig;
  this._forSerialization = paramBoolean;
  this._type = paramJavaType;
  this._classDef = paramAnnotatedClass;
  boolean bool = paramMapperConfig.isAnnotationProcessingEnabled();
  AnnotationIntrospector localAnnotationIntrospector = null;
  if (bool)
    localAnnotationIntrospector = this._config.getAnnotationIntrospector();
  this._annotationIntrospector = localAnnotationIntrospector;
  if (this._annotationIntrospector == null)
  {
    this._visibilityChecker = this._config.getDefaultVisibilityChecker();
    return;
  }
  this._visibilityChecker = this._annotationIntrospector.findAutoDetectVisibility(paramAnnotatedClass, this._config.getDefaultVisibilityChecker());
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:19,代码来源:POJOPropertiesCollector.java


示例17: _addInjectables

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
protected void _addInjectables()
{
  AnnotationIntrospector localAnnotationIntrospector = this._annotationIntrospector;
  if (localAnnotationIntrospector == null);
  while (true)
  {
    return;
    Iterator localIterator1 = this._classDef.fields().iterator();
    while (localIterator1.hasNext())
    {
      AnnotatedField localAnnotatedField = (AnnotatedField)localIterator1.next();
      _doAddInjectable(localAnnotationIntrospector.findInjectableValueId(localAnnotatedField), localAnnotatedField);
    }
    Iterator localIterator2 = this._classDef.memberMethods().iterator();
    while (localIterator2.hasNext())
    {
      AnnotatedMethod localAnnotatedMethod = (AnnotatedMethod)localIterator2.next();
      if (localAnnotatedMethod.getParameterCount() == 1)
        _doAddInjectable(localAnnotationIntrospector.findInjectableValueId(localAnnotatedMethod), localAnnotatedMethod);
    }
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:23,代码来源:POJOPropertiesCollector.java


示例18: constructDefaultValueInstantiator

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
protected ValueInstantiator constructDefaultValueInstantiator(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription)
{
  boolean bool = paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS);
  CreatorCollector localCreatorCollector = new CreatorCollector(paramBasicBeanDescription, bool);
  AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
  if (paramBasicBeanDescription.getType().isConcrete())
  {
    AnnotatedConstructor localAnnotatedConstructor = paramBasicBeanDescription.findDefaultConstructor();
    if (localAnnotatedConstructor != null)
    {
      if (bool)
        ClassUtil.checkAndFixAccess(localAnnotatedConstructor.getAnnotated());
      localCreatorCollector.setDefaultConstructor(localAnnotatedConstructor);
    }
  }
  VisibilityChecker localVisibilityChecker1 = paramDeserializationConfig.getDefaultVisibilityChecker();
  VisibilityChecker localVisibilityChecker2 = paramDeserializationConfig.getAnnotationIntrospector().findAutoDetectVisibility(paramBasicBeanDescription.getClassInfo(), localVisibilityChecker1);
  _addDeserializerFactoryMethods(paramDeserializationConfig, paramBasicBeanDescription, localVisibilityChecker2, localAnnotationIntrospector, localCreatorCollector);
  _addDeserializerConstructors(paramDeserializationConfig, paramBasicBeanDescription, localVisibilityChecker2, localAnnotationIntrospector, localCreatorCollector);
  return localCreatorCollector.constructValueInstantiator(paramDeserializationConfig);
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:22,代码来源:BeanDeserializerFactory.java


示例19: constructSettableProperty

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
protected SettableBeanProperty constructSettableProperty(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, String paramString, AnnotatedField paramAnnotatedField)
{
  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);
  Object localObject = new SettableBeanProperty.FieldProperty(paramString, localJavaType3, (TypeDeserializer)localJavaType3.getTypeHandler(), paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedField);
  if (localJsonDeserializer != null)
    localObject = ((SettableBeanProperty)localObject).withValueDeserializer(localJsonDeserializer);
  AnnotationIntrospector.ReferenceProperty localReferenceProperty = paramDeserializationConfig.getAnnotationIntrospector().findReferenceType(paramAnnotatedField);
  if ((localReferenceProperty != null) && (localReferenceProperty.isManagedReference()))
    ((SettableBeanProperty)localObject).setManagedReferenceName(localReferenceProperty.getName());
  return localObject;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:20,代码来源:BeanDeserializerFactory.java


示例20: JsonModelDeserializer

import org.codehaus.jackson.map.AnnotationIntrospector; //导入依赖的package包/类
public JsonModelDeserializer(Class<T> deserializedObjectType) {
	super();
	this.deserializedObjectType = deserializedObjectType;
	objectMapper = new ObjectMapper();
	AnnotationIntrospector introspector = new JaxbAnnotationIntrospector();
	// make serializer use JAXB annotations (only)
	objectMapper.setDeserializationConfig(objectMapper.getDeserializationConfig().withAnnotationIntrospector(introspector));
	objectTypeXmlTagName = deserializedObjectType.getAnnotation(XmlRootElement.class).name();

}
 
开发者ID:ina-foss,项目名称:amalia-model,代码行数:11,代码来源:JsonModelDeserializer.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SyncRuntimeException类代码示例发布时间:2022-05-21
下一篇:
Java Chromaticity类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap