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


Java PropertyName.getSimpleName方法代码示例

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


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

示例1: _renameWithWrappers

import com.fasterxml.jackson.databind.PropertyName; //导入方法依赖的package包/类
protected void _renameWithWrappers()
{
  Iterator localIterator1 = this._properties.entrySet().iterator();
  LinkedList localLinkedList = null;
  while (localIterator1.hasNext())
  {
    POJOPropertyBuilder localPOJOPropertyBuilder3 = (POJOPropertyBuilder)((Map.Entry)localIterator1.next()).getValue();
    AnnotatedMember localAnnotatedMember = localPOJOPropertyBuilder3.getPrimaryMember();
    if (localAnnotatedMember != null)
    {
      PropertyName localPropertyName = this._annotationIntrospector.findWrapperName(localAnnotatedMember);
      if ((localPropertyName != null) && (localPropertyName.hasSimpleName()))
      {
        String str2 = localPropertyName.getSimpleName();
        if (!str2.equals(localPOJOPropertyBuilder3.getName()))
        {
          if (localLinkedList == null)
            localLinkedList = new LinkedList();
          localLinkedList.add(localPOJOPropertyBuilder3.withName(str2));
          localIterator1.remove();
        }
      }
    }
  }
  if (localLinkedList != null)
  {
    Iterator localIterator2 = localLinkedList.iterator();
    while (localIterator2.hasNext())
    {
      POJOPropertyBuilder localPOJOPropertyBuilder1 = (POJOPropertyBuilder)localIterator2.next();
      String str1 = localPOJOPropertyBuilder1.getName();
      POJOPropertyBuilder localPOJOPropertyBuilder2 = (POJOPropertyBuilder)this._properties.get(str1);
      if (localPOJOPropertyBuilder2 == null)
        this._properties.put(str1, localPOJOPropertyBuilder1);
      else
        localPOJOPropertyBuilder2.addAll(localPOJOPropertyBuilder1);
    }
  }
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:40,代码来源:POJOPropertiesCollector.java

示例2: findRootName

import com.fasterxml.jackson.databind.PropertyName; //导入方法依赖的package包/类
public SerializedString findRootName(Class<?> paramClass, MapperConfig<?> paramMapperConfig)
{
  try
  {
    ClassKey localClassKey = new ClassKey(paramClass);
    if (this._rootNames == null)
    {
      this._rootNames = new LRUMap(20, 200);
    }
    else
    {
      SerializedString localSerializedString1 = (SerializedString)this._rootNames.get(localClassKey);
      if (localSerializedString1 != null)
        return localSerializedString1;
    }
    BeanDescription localBeanDescription = paramMapperConfig.introspectClassAnnotations(paramClass);
    PropertyName localPropertyName = paramMapperConfig.getAnnotationIntrospector().findRootName(localBeanDescription.getClassInfo());
    String str;
    if ((localPropertyName == null) || (!localPropertyName.hasSimpleName()))
      str = paramClass.getSimpleName();
    else
      str = localPropertyName.getSimpleName();
    SerializedString localSerializedString2 = new SerializedString(str);
    this._rootNames.put(localClassKey, localSerializedString2);
    return localSerializedString2;
  }
  finally
  {
  }
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:31,代码来源:RootNameLookup.java

示例3: findCreatorPropertyNames

import com.fasterxml.jackson.databind.PropertyName; //导入方法依赖的package包/类
public List<String> findCreatorPropertyNames()
{
  ArrayList localArrayList = null;
  for (int i = 0; i < 2; i++)
  {
    List localList;
    if (i == 0)
      localList = getConstructors();
    else
      localList = getFactoryMethods();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      AnnotatedWithParams localAnnotatedWithParams = (AnnotatedWithParams)localIterator.next();
      int j = localAnnotatedWithParams.getParameterCount();
      if (j > 0)
      {
        PropertyName localPropertyName1 = this._annotationIntrospector.findNameForDeserialization(localAnnotatedWithParams.getParameter(0));
        if (localPropertyName1 != null)
        {
          if (localArrayList == null)
            localArrayList = new ArrayList();
          localArrayList.add(localPropertyName1.getSimpleName());
          for (int k = 1; k < j; k++)
          {
            PropertyName localPropertyName2 = this._annotationIntrospector.findNameForDeserialization(localAnnotatedWithParams.getParameter(k));
            String str;
            if (localPropertyName2 == null)
              str = null;
            else
              str = localPropertyName2.getSimpleName();
            localArrayList.add(str);
          }
        }
      }
    }
  }
  if (localArrayList == null)
    return Collections.emptyList();
  return localArrayList;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:42,代码来源:BasicBeanDescription.java

示例4: _addCreators

import com.fasterxml.jackson.databind.PropertyName; //导入方法依赖的package包/类
protected void _addCreators()
{
  AnnotationIntrospector localAnnotationIntrospector = this._annotationIntrospector;
  if (localAnnotationIntrospector == null)
    return;
  Iterator localIterator1 = this._classDef.getConstructors().iterator();
  while (localIterator1.hasNext())
  {
    AnnotatedConstructor localAnnotatedConstructor = (AnnotatedConstructor)localIterator1.next();
    if (this._creatorProperties == null)
      this._creatorProperties = new LinkedList();
    int k = 0;
    int m = localAnnotatedConstructor.getParameterCount();
    while (k < m)
    {
      AnnotatedParameter localAnnotatedParameter2 = localAnnotatedConstructor.getParameter(k);
      PropertyName localPropertyName2 = localAnnotationIntrospector.findNameForDeserialization(localAnnotatedParameter2);
      String str3;
      if (localPropertyName2 == null)
        str3 = null;
      else
        str3 = localPropertyName2.getSimpleName();
      String str4 = str3;
      if (str3 != null)
      {
        POJOPropertyBuilder localPOJOPropertyBuilder2 = _property(str4);
        localPOJOPropertyBuilder2.addCtor(localAnnotatedParameter2, str4, true, false);
        this._creatorProperties.add(localPOJOPropertyBuilder2);
      }
      k++;
    }
  }
  Iterator localIterator2 = this._classDef.getStaticMethods().iterator();
  while (localIterator2.hasNext())
  {
    AnnotatedMethod localAnnotatedMethod = (AnnotatedMethod)localIterator2.next();
    if (this._creatorProperties == null)
      this._creatorProperties = new LinkedList();
    int i = 0;
    int j = localAnnotatedMethod.getParameterCount();
    while (i < j)
    {
      AnnotatedParameter localAnnotatedParameter1 = localAnnotatedMethod.getParameter(i);
      PropertyName localPropertyName1 = localAnnotationIntrospector.findNameForDeserialization(localAnnotatedParameter1);
      String str1;
      if (localPropertyName1 == null)
        str1 = null;
      else
        str1 = localPropertyName1.getSimpleName();
      String str2 = str1;
      if (str1 != null)
      {
        POJOPropertyBuilder localPOJOPropertyBuilder1 = _property(str2);
        localPOJOPropertyBuilder1.addCtor(localAnnotatedParameter1, str2, true, false);
        this._creatorProperties.add(localPOJOPropertyBuilder1);
      }
      i++;
    }
  }
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:61,代码来源:POJOPropertiesCollector.java

示例5: _addFields

import com.fasterxml.jackson.databind.PropertyName; //导入方法依赖的package包/类
protected void _addFields()
{
  AnnotationIntrospector localAnnotationIntrospector = this._annotationIntrospector;
  int i;
  if ((!this._forSerialization) && (!this._config.isEnabled(MapperFeature.ALLOW_FINAL_FIELDS_AS_MUTATORS)))
    i = 1;
  else
    i = 0;
  Iterator localIterator = this._classDef.fields().iterator();
  while (localIterator.hasNext())
  {
    AnnotatedField localAnnotatedField = (AnnotatedField)localIterator.next();
    String str1 = localAnnotatedField.getName();
    String str2;
    if (localAnnotationIntrospector == null)
    {
      str2 = null;
    }
    else if (this._forSerialization)
    {
      PropertyName localPropertyName2 = localAnnotationIntrospector.findNameForSerialization(localAnnotatedField);
      if (localPropertyName2 == null)
        str2 = null;
      else
        str2 = localPropertyName2.getSimpleName();
    }
    else
    {
      PropertyName localPropertyName1 = localAnnotationIntrospector.findNameForDeserialization(localAnnotatedField);
      if (localPropertyName1 == null)
        str2 = null;
      else
        str2 = localPropertyName1.getSimpleName();
    }
    if ("".equals(str2))
      str2 = str1;
    boolean bool1;
    if (str2 != null)
      bool1 = true;
    else
      bool1 = false;
    boolean bool2 = bool1;
    if (!bool1)
      bool2 = this._visibilityChecker.isFieldVisible(localAnnotatedField);
    boolean bool3;
    if ((localAnnotationIntrospector != null) && (localAnnotationIntrospector.hasIgnoreMarker(localAnnotatedField)))
      bool3 = true;
    else
      bool3 = false;
    if ((i == 0) || (str2 != null) || (bool3) || (!Modifier.isFinal(localAnnotatedField.getModifiers())))
      _property(str1).addField(localAnnotatedField, str2, bool2, bool3);
  }
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:54,代码来源:POJOPropertiesCollector.java

示例6: _addGetterMethod

import com.fasterxml.jackson.databind.PropertyName; //导入方法依赖的package包/类
protected void _addGetterMethod(AnnotatedMethod paramAnnotatedMethod, AnnotationIntrospector paramAnnotationIntrospector)
{
  if (paramAnnotationIntrospector != null)
  {
    if (paramAnnotationIntrospector.hasAnyGetterAnnotation(paramAnnotatedMethod))
    {
      if (this._anyGetters == null)
        this._anyGetters = new LinkedList();
      this._anyGetters.add(paramAnnotatedMethod);
      return;
    }
    if (paramAnnotationIntrospector.hasAsValueAnnotation(paramAnnotatedMethod))
    {
      if (this._jsonValueGetters == null)
        this._jsonValueGetters = new LinkedList();
      this._jsonValueGetters.add(paramAnnotatedMethod);
      return;
    }
  }
  PropertyName localPropertyName1;
  if (paramAnnotationIntrospector == null)
    localPropertyName1 = null;
  else
    localPropertyName1 = paramAnnotationIntrospector.findNameForSerialization(paramAnnotatedMethod);
  PropertyName localPropertyName2 = localPropertyName1;
  String str1;
  if (localPropertyName1 == null)
    str1 = null;
  else
    str1 = localPropertyName2.getSimpleName();
  Object localObject1 = str1;
  Object localObject2;
  boolean bool1;
  if (str1 == null)
  {
    String str3 = BeanUtil.okNameForRegularGetter(paramAnnotatedMethod, paramAnnotatedMethod.getName());
    localObject2 = str3;
    if (str3 == null)
    {
      String str4 = BeanUtil.okNameForIsGetter(paramAnnotatedMethod, paramAnnotatedMethod.getName());
      localObject2 = str4;
      if (str4 == null)
        return;
      bool1 = this._visibilityChecker.isIsGetterVisible(paramAnnotatedMethod);
    }
    else
    {
      bool1 = this._visibilityChecker.isGetterVisible(paramAnnotatedMethod);
    }
  }
  else
  {
    String str2 = BeanUtil.okNameForGetter(paramAnnotatedMethod);
    localObject2 = str2;
    if (str2 == null)
      localObject2 = paramAnnotatedMethod.getName();
    if (((String)localObject1).length() == 0)
      localObject1 = localObject2;
    bool1 = true;
  }
  boolean bool2;
  if (paramAnnotationIntrospector == null)
    bool2 = false;
  else
    bool2 = paramAnnotationIntrospector.hasIgnoreMarker(paramAnnotatedMethod);
  _property((String)localObject2).addGetter(paramAnnotatedMethod, (String)localObject1, bool1, bool2);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:68,代码来源:POJOPropertiesCollector.java

示例7: _addSetterMethod

import com.fasterxml.jackson.databind.PropertyName; //导入方法依赖的package包/类
protected void _addSetterMethod(AnnotatedMethod paramAnnotatedMethod, AnnotationIntrospector paramAnnotationIntrospector)
{
  PropertyName localPropertyName1;
  if (paramAnnotationIntrospector == null)
    localPropertyName1 = null;
  else
    localPropertyName1 = paramAnnotationIntrospector.findNameForDeserialization(paramAnnotatedMethod);
  PropertyName localPropertyName2 = localPropertyName1;
  String str1;
  if (localPropertyName1 == null)
    str1 = null;
  else
    str1 = localPropertyName2.getSimpleName();
  Object localObject1 = str1;
  Object localObject2;
  boolean bool1;
  if (str1 == null)
  {
    String str3 = BeanUtil.okNameForMutator(paramAnnotatedMethod, this._mutatorPrefix);
    localObject2 = str3;
    if (str3 == null)
      return;
    bool1 = this._visibilityChecker.isSetterVisible(paramAnnotatedMethod);
  }
  else
  {
    String str2 = BeanUtil.okNameForMutator(paramAnnotatedMethod, this._mutatorPrefix);
    localObject2 = str2;
    if (str2 == null)
      localObject2 = paramAnnotatedMethod.getName();
    if (((String)localObject1).length() == 0)
      localObject1 = localObject2;
    bool1 = true;
  }
  boolean bool2;
  if (paramAnnotationIntrospector == null)
    bool2 = false;
  else
    bool2 = paramAnnotationIntrospector.hasIgnoreMarker(paramAnnotatedMethod);
  _property((String)localObject2).addSetter(paramAnnotatedMethod, (String)localObject1, bool1, bool2);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:42,代码来源:POJOPropertiesCollector.java

示例8: _addDeserializerFactoryMethods

import com.fasterxml.jackson.databind.PropertyName; //导入方法依赖的package包/类
protected void _addDeserializerFactoryMethods(DeserializationContext paramDeserializationContext, BeanDescription paramBeanDescription, VisibilityChecker<?> paramVisibilityChecker, AnnotationIntrospector paramAnnotationIntrospector, CreatorCollector paramCreatorCollector)
{
  DeserializationConfig localDeserializationConfig = paramDeserializationContext.getConfig();
  Iterator localIterator = paramBeanDescription.getFactoryMethods().iterator();
  while (localIterator.hasNext())
  {
    AnnotatedMethod localAnnotatedMethod = (AnnotatedMethod)localIterator.next();
    boolean bool = paramAnnotationIntrospector.hasCreatorAnnotation(localAnnotatedMethod);
    int i = localAnnotatedMethod.getParameterCount();
    if (i == 0)
    {
      if (bool)
        paramCreatorCollector.setDefaultCreator(localAnnotatedMethod);
    }
    else if (i == 1)
    {
      AnnotatedParameter localAnnotatedParameter2 = localAnnotatedMethod.getParameter(0);
      PropertyName localPropertyName3;
      if (localAnnotatedParameter2 == null)
        localPropertyName3 = null;
      else
        localPropertyName3 = paramAnnotationIntrospector.findNameForDeserialization(localAnnotatedParameter2);
      PropertyName localPropertyName4 = localPropertyName3;
      String str2;
      if (localPropertyName3 == null)
        str2 = null;
      else
        str2 = localPropertyName4.getSimpleName();
      if ((paramAnnotationIntrospector.findInjectableValueId(localAnnotatedParameter2) == null) && ((str2 == null) || (str2.length() == 0)))
        _handleSingleArgumentFactory(localDeserializationConfig, paramBeanDescription, paramVisibilityChecker, paramAnnotationIntrospector, paramCreatorCollector, localAnnotatedMethod, bool);
      else;
    }
    else if (paramAnnotationIntrospector.hasCreatorAnnotation(localAnnotatedMethod))
    {
      Object localObject1 = null;
      CreatorProperty[] arrayOfCreatorProperty = new CreatorProperty[i];
      int j = 0;
      int k = 0;
      for (int m = 0; m < i; m++)
      {
        AnnotatedParameter localAnnotatedParameter1 = localAnnotatedMethod.getParameter(m);
        PropertyName localPropertyName1;
        if (localAnnotatedParameter1 == null)
          localPropertyName1 = null;
        else
          localPropertyName1 = paramAnnotationIntrospector.findNameForDeserialization(localAnnotatedParameter1);
        PropertyName localPropertyName2 = localPropertyName1;
        String str1;
        if (localPropertyName1 == null)
          str1 = null;
        else
          str1 = localPropertyName2.getSimpleName();
        Object localObject2 = paramAnnotationIntrospector.findInjectableValueId(localAnnotatedParameter1);
        if ((str1 != null) && (str1.length() > 0))
        {
          j++;
          arrayOfCreatorProperty[m] = constructCreatorProperty(paramDeserializationContext, paramBeanDescription, str1, m, localAnnotatedParameter1, localObject2);
        }
        else if (localObject2 != null)
        {
          k++;
          arrayOfCreatorProperty[m] = constructCreatorProperty(paramDeserializationContext, paramBeanDescription, str1, m, localAnnotatedParameter1, localObject2);
        }
        else if (localObject1 == null)
        {
          localObject1 = localAnnotatedParameter1;
        }
      }
      if ((bool) || (j > 0) || (k > 0))
        if (j + k == i)
          paramCreatorCollector.addPropertyCreator(localAnnotatedMethod, arrayOfCreatorProperty);
        else if ((j == 0) && (k + 1 == i))
          paramCreatorCollector.addDelegatingCreator(localAnnotatedMethod, arrayOfCreatorProperty);
        else
          throw new IllegalArgumentException("Argument #" + localObject1.getIndex() + " of factory method " + localAnnotatedMethod + " has no property name annotation; must have name when multiple-paramater constructor annotated as Creator");
    }
  }
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:79,代码来源:BasicDeserializerFactory.java

示例9: _handleSingleArgumentConstructor

import com.fasterxml.jackson.databind.PropertyName; //导入方法依赖的package包/类
protected boolean _handleSingleArgumentConstructor(DeserializationContext paramDeserializationContext, BeanDescription paramBeanDescription, VisibilityChecker<?> paramVisibilityChecker, AnnotationIntrospector paramAnnotationIntrospector, CreatorCollector paramCreatorCollector, AnnotatedConstructor paramAnnotatedConstructor, boolean paramBoolean1, boolean paramBoolean2, String paramString)
{
  AnnotatedParameter localAnnotatedParameter = paramAnnotatedConstructor.getParameter(0);
  if (paramString == null)
  {
    PropertyName localPropertyName1;
    if (localAnnotatedParameter == null)
      localPropertyName1 = null;
    else
      localPropertyName1 = paramAnnotationIntrospector.findNameForDeserialization(localAnnotatedParameter);
    PropertyName localPropertyName2 = localPropertyName1;
    if (localPropertyName1 == null)
      paramString = null;
    else
      paramString = localPropertyName2.getSimpleName();
  }
  Object localObject = paramAnnotationIntrospector.findInjectableValueId(localAnnotatedParameter);
  if ((localObject != null) || ((paramString != null) && (paramString.length() > 0)))
  {
    CreatorProperty[] arrayOfCreatorProperty = new CreatorProperty[1];
    arrayOfCreatorProperty[0] = constructCreatorProperty(paramDeserializationContext, paramBeanDescription, paramString, 0, localAnnotatedParameter, localObject);
    paramCreatorCollector.addPropertyCreator(paramAnnotatedConstructor, arrayOfCreatorProperty);
    return true;
  }
  Class localClass = paramAnnotatedConstructor.getRawParameterType(0);
  if (localClass == String.class)
  {
    if ((paramBoolean1) || (paramBoolean2))
      paramCreatorCollector.addStringCreator(paramAnnotatedConstructor);
    return true;
  }
  if ((localClass == Integer.TYPE) || (localClass == Integer.class))
  {
    if ((paramBoolean1) || (paramBoolean2))
      paramCreatorCollector.addIntCreator(paramAnnotatedConstructor);
    return true;
  }
  if ((localClass == Long.TYPE) || (localClass == Long.class))
  {
    if ((paramBoolean1) || (paramBoolean2))
      paramCreatorCollector.addLongCreator(paramAnnotatedConstructor);
    return true;
  }
  if ((localClass == Double.TYPE) || (localClass == Double.class))
  {
    if ((paramBoolean1) || (paramBoolean2))
      paramCreatorCollector.addDoubleCreator(paramAnnotatedConstructor);
    return true;
  }
  if (paramBoolean1)
  {
    paramCreatorCollector.addDelegatingCreator(paramAnnotatedConstructor, null);
    return true;
  }
  return false;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:57,代码来源:BasicDeserializerFactory.java


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