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

Java AnnotatedMethod类代码示例

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

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



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

示例1: findGettablePropertyName

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
@Override
public String findGettablePropertyName(AnnotatedMethod am)
{
    Method uniqueIdMethod = ResourceInspector.findUniqueIdMethod(am.getDeclaringClass());
    if (uniqueIdMethod != null && uniqueIdMethod.equals(am.getMember()))
    {
        {
            String uniqueIdPropertyName = ResourceInspector.findUniqueIdName(uniqueIdMethod);
            if (logger.isDebugEnabled())
            {
                logger.debug("Changing the name of property: "+am.getFullName()+" to "+uniqueIdPropertyName);
            }
            
            return uniqueIdPropertyName;
        }
    }
    return super.findGettablePropertyName(am);
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:19,代码来源:CustomAnnotationIntrospector.java


示例2: createEnumDeserializer

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的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


示例3: addReferenceProperties

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
protected void addReferenceProperties(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, BeanDeserializerBuilder paramBeanDeserializerBuilder)
  throws JsonMappingException
{
  Map localMap = paramBasicBeanDescription.findBackReferenceProperties();
  if (localMap != null)
  {
    Iterator localIterator = localMap.entrySet().iterator();
    while (localIterator.hasNext())
    {
      Map.Entry localEntry = (Map.Entry)localIterator.next();
      String str = (String)localEntry.getKey();
      AnnotatedMember localAnnotatedMember = (AnnotatedMember)localEntry.getValue();
      if ((localAnnotatedMember instanceof AnnotatedMethod))
      {
        paramBeanDeserializerBuilder.addBackReferenceProperty(str, constructSettableProperty(paramDeserializationConfig, paramBasicBeanDescription, localAnnotatedMember.getName(), (AnnotatedMethod)localAnnotatedMember));
        continue;
      }
      paramBeanDeserializerBuilder.addBackReferenceProperty(str, constructSettableProperty(paramDeserializationConfig, paramBasicBeanDescription, localAnnotatedMember.getName(), (AnnotatedField)localAnnotatedMember));
    }
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:22,代码来源:BeanDeserializerFactory.java


示例4: constructAnySetter

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


示例5: constructSettableProperty

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
protected SettableBeanProperty constructSettableProperty(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, String paramString, AnnotatedMethod paramAnnotatedMethod)
  throws JsonMappingException
{
  if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
    paramAnnotatedMethod.fixAccess();
  JavaType localJavaType1 = paramBasicBeanDescription.bindingsForBeanType().resolveType(paramAnnotatedMethod.getParameterType(0));
  BeanProperty.Std localStd = new BeanProperty.Std(paramString, localJavaType1, paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedMethod);
  JavaType localJavaType2 = resolveType(paramDeserializationConfig, paramBasicBeanDescription, localJavaType1, paramAnnotatedMethod, localStd);
  if (localJavaType2 != localJavaType1)
    localStd = localStd.withType(localJavaType2);
  JsonDeserializer localJsonDeserializer = findDeserializerFromAnnotation(paramDeserializationConfig, paramAnnotatedMethod, localStd);
  JavaType localJavaType3 = modifyTypeByAnnotation(paramDeserializationConfig, paramAnnotatedMethod, localJavaType2, paramString);
  SettableBeanProperty.MethodProperty localMethodProperty = new SettableBeanProperty.MethodProperty(paramString, localJavaType3, (TypeDeserializer)localJavaType3.getTypeHandler(), paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedMethod);
  if (localJsonDeserializer != null)
    localMethodProperty.setValueDeserializer(localJsonDeserializer);
  AnnotationIntrospector.ReferenceProperty localReferenceProperty = paramDeserializationConfig.getAnnotationIntrospector().findReferenceType(paramAnnotatedMethod);
  if ((localReferenceProperty != null) && (localReferenceProperty.isManagedReference()))
    localMethodProperty.setManagedReferenceName(localReferenceProperty.getName());
  return localMethodProperty;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:21,代码来源:BeanDeserializerFactory.java


示例6: Delegating

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
public Delegating(BasicBeanDescription paramBasicBeanDescription, AnnotatedConstructor paramAnnotatedConstructor, AnnotatedMethod paramAnnotatedMethod)
{
  TypeBindings localTypeBindings = paramBasicBeanDescription.bindingsForBeanType();
  if (paramAnnotatedConstructor != null)
  {
    this._creator = paramAnnotatedConstructor;
    this._ctor = paramAnnotatedConstructor.getAnnotated();
    this._factoryMethod = null;
    this._valueType = localTypeBindings.resolveType(paramAnnotatedConstructor.getParameterType(0));
    return;
  }
  if (paramAnnotatedMethod != null)
  {
    this._creator = paramAnnotatedMethod;
    this._ctor = null;
    this._factoryMethod = paramAnnotatedMethod.getAnnotated();
    this._valueType = localTypeBindings.resolveType(paramAnnotatedMethod.getParameterType(0));
    return;
  }
  throw new IllegalArgumentException("Internal error: neither delegating constructor nor factory method passed");
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:22,代码来源:Creator.java


示例7: StringBased

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
public StringBased(Class<?> paramClass, AnnotatedConstructor paramAnnotatedConstructor, AnnotatedMethod paramAnnotatedMethod)
{
  this._valueClass = paramClass;
  Constructor localConstructor;
  Method localMethod;
  if (paramAnnotatedConstructor == null)
  {
    localConstructor = null;
    this._ctor = localConstructor;
    localMethod = null;
    if (paramAnnotatedMethod != null)
      break label45;
  }
  while (true)
  {
    this._factoryMethod = localMethod;
    return;
    localConstructor = paramAnnotatedConstructor.getAnnotated();
    break;
    label45: localMethod = paramAnnotatedMethod.getAnnotated();
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:23,代码来源:Creator.java


示例8: findGettablePropertyName

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
public String findGettablePropertyName(AnnotatedMethod paramAnnotatedMethod)
{
  String str1 = this._primary.findGettablePropertyName(paramAnnotatedMethod);
  if (str1 == null)
    str1 = this._secondary.findGettablePropertyName(paramAnnotatedMethod);
  String str2;
  do
  {
    do
      return str1;
    while (str1.length() != 0);
    str2 = this._secondary.findGettablePropertyName(paramAnnotatedMethod);
  }
  while (str2 == null);
  return str2;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:17,代码来源:AnnotationIntrospector.java


示例9: findSettablePropertyName

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
public String findSettablePropertyName(AnnotatedMethod paramAnnotatedMethod)
{
  String str1 = this._primary.findSettablePropertyName(paramAnnotatedMethod);
  if (str1 == null)
    str1 = this._secondary.findSettablePropertyName(paramAnnotatedMethod);
  String str2;
  do
  {
    do
      return str1;
    while (str1.length() != 0);
    str2 = this._secondary.findSettablePropertyName(paramAnnotatedMethod);
  }
  while (str2 == null);
  return str2;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:17,代码来源:AnnotationIntrospector.java


示例10: findBeanSerializer

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
/**
 * Method that will try to construct a {@link BeanSerializer} for
 * given class. Returns null if no properties are found.
 */
public JsonSerializer<Object> findBeanSerializer(JavaType type, SerializationConfig config,
                                                 BasicBeanDescription beanDesc)
{
    // First things first: we know some types are not beans...
    if (!isPotentialBeanType(type.getRawClass())) {
        return null;
    }
    // [JACKSON-80]: Support @JsonValue, alternative to bean method introspection.
    AnnotatedMethod valueMethod = beanDesc.findJsonValueMethod();
    if (valueMethod != null) {
        /* Further, method itself may also be annotated to indicate
         * exact JsonSerializer to use for whatever value is returned...
         */
        JsonSerializer<Object> ser = findSerializerFromAnnotation(config, valueMethod);
        return new JsonValueSerializer(valueMethod.getAnnotated(), ser);
    }
    return constructBeanSerializer(config, beanDesc);
}
 
开发者ID:r00li,项目名称:RHome,代码行数:23,代码来源:BeanSerializerFactory.java


示例11: PropertyBased

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
public PropertyBased(AnnotatedConstructor ctor, SettableBeanProperty[] ctorProps,
                            AnnotatedMethod factory, SettableBeanProperty[] factoryProps)
{
    // We will only use one: and constructor has precedence over factory
    SettableBeanProperty[] props;
    if (ctor != null) {
        _ctor = ctor.getAnnotated();
        _factoryMethod = null;
        props = ctorProps;
    } else if (factory != null) {
        _ctor = null;
        _factoryMethod = factory.getAnnotated();
        props = factoryProps;
    } else {
        throw new IllegalArgumentException("Internal error: neither delegating constructor nor factory method passed");
    }
    _properties = new HashMap<String, SettableBeanProperty>();
    for (SettableBeanProperty prop : props) {
        _properties.put(prop.getPropertyName(), prop);
    }
}
 
开发者ID:r00li,项目名称:RHome,代码行数:22,代码来源:Creator.java


示例12: createEnumDeserializer

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
public JsonDeserializer<?> createEnumDeserializer(DeserializationConfig paramDeserializationConfig, DeserializerProvider paramDeserializerProvider, JavaType paramJavaType, BeanProperty paramBeanProperty)
{
  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))
    {
      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:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:24,代码来源:BasicDeserializerFactory.java


示例13: addReferenceProperties

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
protected void addReferenceProperties(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, BeanDeserializerBuilder paramBeanDeserializerBuilder)
{
  Map localMap = paramBasicBeanDescription.findBackReferenceProperties();
  if (localMap != null)
  {
    Iterator localIterator = localMap.entrySet().iterator();
    while (localIterator.hasNext())
    {
      Map.Entry localEntry = (Map.Entry)localIterator.next();
      String str = (String)localEntry.getKey();
      AnnotatedMember localAnnotatedMember = (AnnotatedMember)localEntry.getValue();
      if ((localAnnotatedMember instanceof AnnotatedMethod))
        paramBeanDeserializerBuilder.addBackReferenceProperty(str, constructSettableProperty(paramDeserializationConfig, paramBasicBeanDescription, localAnnotatedMember.getName(), (AnnotatedMethod)localAnnotatedMember));
      else
        paramBeanDeserializerBuilder.addBackReferenceProperty(str, constructSettableProperty(paramDeserializationConfig, paramBasicBeanDescription, localAnnotatedMember.getName(), (AnnotatedField)localAnnotatedMember));
    }
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:19,代码来源:BeanDeserializerFactory.java


示例14: constructSettableProperty

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
protected SettableBeanProperty constructSettableProperty(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, String paramString, AnnotatedMethod paramAnnotatedMethod)
{
  if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
    paramAnnotatedMethod.fixAccess();
  JavaType localJavaType1 = paramBasicBeanDescription.bindingsForBeanType().resolveType(paramAnnotatedMethod.getParameterType(0));
  BeanProperty.Std localStd = new BeanProperty.Std(paramString, localJavaType1, paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedMethod);
  JavaType localJavaType2 = resolveType(paramDeserializationConfig, paramBasicBeanDescription, localJavaType1, paramAnnotatedMethod, localStd);
  if (localJavaType2 != localJavaType1)
    localStd = localStd.withType(localJavaType2);
  JsonDeserializer localJsonDeserializer = findDeserializerFromAnnotation(paramDeserializationConfig, paramAnnotatedMethod, localStd);
  JavaType localJavaType3 = modifyTypeByAnnotation(paramDeserializationConfig, paramAnnotatedMethod, localJavaType2, paramString);
  Object localObject = new SettableBeanProperty.MethodProperty(paramString, localJavaType3, (TypeDeserializer)localJavaType3.getTypeHandler(), paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedMethod);
  if (localJsonDeserializer != null)
    localObject = ((SettableBeanProperty)localObject).withValueDeserializer(localJsonDeserializer);
  AnnotationIntrospector.ReferenceProperty localReferenceProperty = paramDeserializationConfig.getAnnotationIntrospector().findReferenceType(paramAnnotatedMethod);
  if ((localReferenceProperty != null) && (localReferenceProperty.isManagedReference()))
    ((SettableBeanProperty)localObject).setManagedReferenceName(localReferenceProperty.getName());
  return localObject;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:20,代码来源:BeanDeserializerFactory.java


示例15: isCglibGetCallbacks

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
protected static boolean isCglibGetCallbacks(AnnotatedMethod paramAnnotatedMethod)
{
  Class localClass = paramAnnotatedMethod.getRawType();
  if ((localClass == null) || (!localClass.isArray()));
  String str;
  do
  {
    Package localPackage;
    do
    {
      return false;
      localPackage = localClass.getComponentType().getPackage();
    }
    while (localPackage == null);
    str = localPackage.getName();
  }
  while ((!str.startsWith("net.sf.cglib")) && (!str.startsWith("org.hibernate.repackage.cglib")));
  return true;
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:20,代码来源:BeanUtil.java


示例16: findSerializerByPrimaryType

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
public final JsonSerializer<?> findSerializerByPrimaryType(JavaType paramJavaType, SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty, boolean paramBoolean)
  throws JsonMappingException
{
  Class localClass = paramJavaType.getRawClass();
  Object localObject;
  if (JsonSerializable.class.isAssignableFrom(localClass))
    if (JsonSerializableWithType.class.isAssignableFrom(localClass))
      localObject = StdSerializers.SerializableWithTypeSerializer.instance;
  do
  {
    return localObject;
    return StdSerializers.SerializableSerializer.instance;
    AnnotatedMethod localAnnotatedMethod = paramBasicBeanDescription.findJsonValueMethod();
    if (localAnnotatedMethod != null)
    {
      JsonSerializer localJsonSerializer = findSerializerFromAnnotation(paramSerializationConfig, localAnnotatedMethod, paramBeanProperty);
      return new JsonValueSerializer(localAnnotatedMethod.getAnnotated(), localJsonSerializer, paramBeanProperty);
    }
    if (InetAddress.class.isAssignableFrom(localClass))
      return InetAddressSerializer.instance;
    if (TimeZone.class.isAssignableFrom(localClass))
      return TimeZoneSerializer.instance;
    localObject = this.optionalHandlers.findSerializer(paramSerializationConfig, paramJavaType);
  }
  while (localObject != null);
  if (Number.class.isAssignableFrom(localClass))
    return StdSerializers.NumberSerializer.instance;
  if (Enum.class.isAssignableFrom(localClass))
    return EnumSerializer.construct(localClass, paramSerializationConfig, paramBasicBeanDescription);
  if (Calendar.class.isAssignableFrom(localClass))
    return StdSerializers.CalendarSerializer.instance;
  if (java.util.Date.class.isAssignableFrom(localClass))
    return StdSerializers.UtilDateSerializer.instance;
  return (JsonSerializer<?>)null;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:36,代码来源:BasicSerializerFactory.java


示例17: verifyNonDup

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
protected AnnotatedMethod verifyNonDup(AnnotatedMethod paramAnnotatedMethod1, AnnotatedMethod paramAnnotatedMethod2, String paramString)
{
  if (paramAnnotatedMethod2 != null)
    throw new IllegalArgumentException("Conflicting " + paramString + " factory methods: already had " + paramAnnotatedMethod2 + ", encountered " + paramAnnotatedMethod1);
  if (this._canFixAccess)
    ClassUtil.checkAndFixAccess(paramAnnotatedMethod1.getAnnotated());
  return paramAnnotatedMethod1;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:9,代码来源:CreatorContainer.java


示例18: deserializerForCreator

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


示例19: buildThrowableDeserializer

import org.codehaus.jackson.map.introspect.AnnotatedMethod; //导入依赖的package包/类
public JsonDeserializer<Object> buildThrowableDeserializer(DeserializationConfig paramDeserializationConfig, JavaType paramJavaType, BasicBeanDescription paramBasicBeanDescription, BeanProperty paramBeanProperty)
  throws JsonMappingException
{
  BeanDeserializerBuilder localBeanDeserializerBuilder = constructBeanDeserializerBuilder(paramBasicBeanDescription);
  localBeanDeserializerBuilder.setCreators(findDeserializerCreators(paramDeserializationConfig, paramBasicBeanDescription));
  addBeanProps(paramDeserializationConfig, paramBasicBeanDescription, localBeanDeserializerBuilder);
  AnnotatedMethod localAnnotatedMethod = paramBasicBeanDescription.findMethod("initCause", INIT_CAUSE_PARAMS);
  if (localAnnotatedMethod != null)
  {
    SettableBeanProperty localSettableBeanProperty = constructSettableProperty(paramDeserializationConfig, paramBasicBeanDescription, "cause", localAnnotatedMethod);
    if (localSettableBeanProperty != null)
      localBeanDeserializerBuilder.addProperty(localSettableBeanProperty);
  }
  localBeanDeserializerBuilder.addIgnorable("localizedMessage");
  localBeanDeserializerBuilder.addIgnorable("message");
  if (this._factoryConfig.hasDeserializerModifiers())
  {
    Iterator localIterator2 = this._factoryConfig.deserializerModifiers().iterator();
    while (localIterator2.hasNext())
      localBeanDeserializerBuilder = ((BeanDeserializerModifier)localIterator2.next()).updateBuilder(paramDeserializationConfig, paramBasicBeanDescription, localBeanDeserializerBuilder);
  }
  Object localObject = localBeanDeserializerBuilder.build(paramBeanProperty);
  if ((localObject instanceof BeanDeserializer))
    localObject = new ThrowableDeserializer((BeanDeserializer)localObject);
  if (this._factoryConfig.hasDeserializerModifiers())
  {
    Iterator localIterator1 = this._factoryConfig.deserializerModifiers().iterator();
    while (localIterator1.hasNext())
      localObject = ((BeanDeserializerModifier)localIterator1.next()).modifyDeserializer(paramDeserializationConfig, paramBasicBeanDescription, (JsonDeserializer)localObject);
  }
  return (JsonDeserializer<Object>)localObject;
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:33,代码来源:BeanDeserializerFactory.java


示例20: constructSetterlessProperty

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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