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

Java SettableBeanProperty类代码示例

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

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



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

示例1: resolve

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
public void resolve(DeserializationContext paramDeserializationContext)
{
  if (this._valueInstantiator.canCreateUsingDelegate())
  {
    JavaType localJavaType = this._valueInstantiator.getDelegateType(paramDeserializationContext.getConfig());
    if (localJavaType == null)
      throw new IllegalArgumentException("Invalid delegate-creator definition for " + this._mapType + ": value instantiator (" + this._valueInstantiator.getClass().getName() + ") returned true for 'canCreateUsingDelegate()', but null for 'getDelegateType()'");
    this._delegateDeserializer = findDeserializer(paramDeserializationContext, localJavaType, null);
  }
  if (this._valueInstantiator.canCreateFromObjectWith())
  {
    SettableBeanProperty[] arrayOfSettableBeanProperty = this._valueInstantiator.getFromObjectArguments(paramDeserializationContext.getConfig());
    this._propertyBasedCreator = PropertyBasedCreator.construct(paramDeserializationContext, this._valueInstantiator, arrayOfSettableBeanProperty);
  }
  this._standardStringKey = _isStdKeyDeser(this._mapType, this._keyDeserializer);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:17,代码来源:MapDeserializer.java


示例2: BeanPropertyMap

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
public BeanPropertyMap(Collection<SettableBeanProperty> paramCollection)
{
  this._size = paramCollection.size();
  int i = findSize(this._size);
  this._hashMask = (i - 1);
  Bucket[] arrayOfBucket = new Bucket[i];
  Iterator localIterator = paramCollection.iterator();
  while (localIterator.hasNext())
  {
    SettableBeanProperty localSettableBeanProperty = (SettableBeanProperty)localIterator.next();
    String str = localSettableBeanProperty.getName();
    int j = str.hashCode() & this._hashMask;
    Bucket localBucket = arrayOfBucket[j];
    int k = this._nextBucketIndex;
    this._nextBucketIndex = (k + 1);
    arrayOfBucket[j] = new Bucket(localBucket, str, localSettableBeanProperty, k);
  }
  this._buckets = arrayOfBucket;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:20,代码来源:BeanPropertyMap.java


示例3: find

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
public final SettableBeanProperty find(String paramString)
{
  int i = paramString.hashCode() & this._hashMask;
  Bucket localBucket1 = this._buckets[i];
  Object localObject = localBucket1;
  if (localBucket1 == null)
    return null;
  if (((Bucket)localObject).key == paramString)
    return ((Bucket)localObject).value;
  do
  {
    Bucket localBucket2 = ((Bucket)localObject).next;
    localObject = localBucket2;
    if (localBucket2 == null)
      break;
  }
  while (((Bucket)localObject).key != paramString);
  return ((Bucket)localObject).value;
  return _findWithEquals(paramString, i);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:21,代码来源:BeanPropertyMap.java


示例4: renameAll

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
public final BeanPropertyMap renameAll(NameTransformer paramNameTransformer)
{
  if ((paramNameTransformer == null) || (paramNameTransformer == NameTransformer.NOP))
    return this;
  Iterator localIterator = iterator();
  ArrayList localArrayList = new ArrayList();
  while (localIterator.hasNext())
  {
    SettableBeanProperty localSettableBeanProperty1 = (SettableBeanProperty)localIterator.next();
    SettableBeanProperty localSettableBeanProperty2 = localSettableBeanProperty1.withName(paramNameTransformer.transform(localSettableBeanProperty1.getName()));
    SettableBeanProperty localSettableBeanProperty3 = localSettableBeanProperty2;
    JsonDeserializer localJsonDeserializer1 = localSettableBeanProperty2.getValueDeserializer();
    if (localJsonDeserializer1 != null)
    {
      JsonDeserializer localJsonDeserializer2 = localJsonDeserializer1.unwrappingDeserializer(paramNameTransformer);
      if (localJsonDeserializer2 != localJsonDeserializer1)
        localSettableBeanProperty3 = localSettableBeanProperty3.withValueDeserializer(localJsonDeserializer2);
    }
    localArrayList.add(localSettableBeanProperty3);
  }
  return new BeanPropertyMap(localArrayList);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:23,代码来源:BeanPropertyMap.java


示例5: toString

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
public final String toString()
{
  StringBuilder localStringBuilder = new StringBuilder();
  localStringBuilder.append("Properties=[");
  int i = 0;
  for (SettableBeanProperty localSettableBeanProperty : getPropertiesInInsertionOrder())
    if (localSettableBeanProperty != null)
    {
      int m = i;
      i++;
      if (m > 0)
        localStringBuilder.append(", ");
      localStringBuilder.append(localSettableBeanProperty.getName());
      localStringBuilder.append('(');
      localStringBuilder.append(localSettableBeanProperty.getType());
      localStringBuilder.append(')');
    }
  localStringBuilder.append(']');
  return localStringBuilder.toString();
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:21,代码来源:BeanPropertyMap.java


示例6: withProperty

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
public final BeanPropertyMap withProperty(SettableBeanProperty paramSettableBeanProperty)
{
  int i = this._buckets.length;
  Bucket[] arrayOfBucket = new Bucket[i];
  System.arraycopy(this._buckets, 0, arrayOfBucket, 0, i);
  String str = paramSettableBeanProperty.getName();
  if (find(paramSettableBeanProperty.getName()) == null)
  {
    int j = str.hashCode() & this._hashMask;
    Bucket localBucket = arrayOfBucket[j];
    int k = this._nextBucketIndex;
    this._nextBucketIndex = (k + 1);
    arrayOfBucket[j] = new Bucket(localBucket, str, paramSettableBeanProperty, k);
    return new BeanPropertyMap(arrayOfBucket, 1 + this._size, this._nextBucketIndex);
  }
  BeanPropertyMap localBeanPropertyMap = new BeanPropertyMap(arrayOfBucket, i, this._nextBucketIndex);
  localBeanPropertyMap.replace(paramSettableBeanProperty);
  return localBeanPropertyMap;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:20,代码来源:BeanPropertyMap.java


示例7: next

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
public final SettableBeanProperty next()
{
  BeanPropertyMap.Bucket localBucket1 = this._currentBucket;
  if (localBucket1 == null)
    throw new NoSuchElementException();
  BeanPropertyMap.Bucket[] arrayOfBucket;
  int i;
  for (BeanPropertyMap.Bucket localBucket2 = localBucket1.next; (localBucket2 == null) && (this._nextBucketIndex < this._buckets.length); localBucket2 = arrayOfBucket[i])
  {
    arrayOfBucket = this._buckets;
    i = this._nextBucketIndex;
    this._nextBucketIndex = (i + 1);
  }
  this._currentBucket = localBucket2;
  return localBucket1.value;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:17,代码来源:BeanPropertyMap.java


示例8: PropertyBasedCreator

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
protected PropertyBasedCreator(ValueInstantiator paramValueInstantiator, SettableBeanProperty[] paramArrayOfSettableBeanProperty, Object[] paramArrayOfObject)
{
  this._valueInstantiator = paramValueInstantiator;
  this._properties = new HashMap();
  SettableBeanProperty[] arrayOfSettableBeanProperty = null;
  int i = paramArrayOfSettableBeanProperty.length;
  this._propertyCount = i;
  for (int j = 0; j < i; j++)
  {
    SettableBeanProperty localSettableBeanProperty = paramArrayOfSettableBeanProperty[j];
    this._properties.put(localSettableBeanProperty.getName(), localSettableBeanProperty);
    if (localSettableBeanProperty.getInjectableValueId() != null)
    {
      if (arrayOfSettableBeanProperty == null)
        arrayOfSettableBeanProperty = new SettableBeanProperty[i];
      arrayOfSettableBeanProperty[j] = localSettableBeanProperty;
    }
  }
  this._defaultValues = paramArrayOfObject;
  this._propertiesWithInjectables = arrayOfSettableBeanProperty;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:22,代码来源:PropertyBasedCreator.java


示例9: renameAll

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
public UnwrappedPropertyHandler renameAll(NameTransformer paramNameTransformer)
{
  ArrayList localArrayList = new ArrayList(this._properties.size());
  Iterator localIterator = this._properties.iterator();
  while (localIterator.hasNext())
  {
    SettableBeanProperty localSettableBeanProperty1 = (SettableBeanProperty)localIterator.next();
    SettableBeanProperty localSettableBeanProperty2 = localSettableBeanProperty1.withName(paramNameTransformer.transform(localSettableBeanProperty1.getName()));
    SettableBeanProperty localSettableBeanProperty3 = localSettableBeanProperty2;
    JsonDeserializer localJsonDeserializer1 = localSettableBeanProperty2.getValueDeserializer();
    if (localJsonDeserializer1 != null)
    {
      JsonDeserializer localJsonDeserializer2 = localJsonDeserializer1.unwrappingDeserializer(paramNameTransformer);
      if (localJsonDeserializer2 != localJsonDeserializer1)
        localSettableBeanProperty3 = localSettableBeanProperty3.withValueDeserializer(localJsonDeserializer2);
    }
    localArrayList.add(localSettableBeanProperty3);
  }
  return new UnwrappedPropertyHandler(localArrayList);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:21,代码来源:UnwrappedPropertyHandler.java


示例10: withProperty

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
/**
 * Fluent copy method that creates a new instance that is a copy
 * of this instance except for one additional property that is
 * passed as the argument.
 * Note that method does not modify this instance but constructs
 * and returns a new one.
 * 
 * @since 2.0
 */
public BeanPropertyMap withProperty(SettableBeanProperty newProperty)
{
	// first things first: can just copy hash area:
	final int bcount = _buckets.length;
    Bucket[] newBuckets = new Bucket[bcount];
    System.arraycopy(_buckets, 0, newBuckets, 0, bcount);
    final String propName = newProperty.getName();
    // and then see if it's add or replace:
	SettableBeanProperty oldProp = find(newProperty.getName());
	if (oldProp == null) { // add
	    // first things first: add or replace?
	    // can do a straight copy, since all additions are at the front
	    // and then insert the new property:
	    int index = propName.hashCode() & _hashMask;
	    newBuckets[index] = new Bucket(newBuckets[index],
	            propName, newProperty, _nextBucketIndex++);
	    return new BeanPropertyMap(newBuckets, _size+1, _nextBucketIndex);
	}
	// replace: easy, close + replace
	BeanPropertyMap newMap = new BeanPropertyMap(newBuckets, bcount, _nextBucketIndex);
	newMap.replace(newProperty);
	return newMap;
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:33,代码来源:BeanPropertyMap.java


示例11: renameAll

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
/**
 * Factory method for constructing a map where all entries use given
 * prefix
 */
public BeanPropertyMap renameAll(NameTransformer transformer)
{
    if (transformer == null || (transformer == NameTransformer.NOP)) {
        return this;
    }
    Iterator<SettableBeanProperty> it = iterator();
    ArrayList<SettableBeanProperty> newProps = new ArrayList<SettableBeanProperty>();
    while (it.hasNext()) {
        SettableBeanProperty prop = it.next();
        String newName = transformer.transform(prop.getName());
        prop = prop.withName(newName);
        JsonDeserializer<?> deser = prop.getValueDeserializer();
        if (deser != null) {
            @SuppressWarnings("unchecked")
            JsonDeserializer<Object> newDeser = (JsonDeserializer<Object>)
                deser.unwrappingDeserializer(transformer);
            if (newDeser != deser) {
                prop = prop.withValueDeserializer(newDeser);
            }
        }
        newProps.add(prop);
    }
    // should we try to re-index? Ordering probably changed but called probably doesn't want changes...
    return new BeanPropertyMap(newProps);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:30,代码来源:BeanPropertyMap.java


示例12: find

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
public SettableBeanProperty find(String key)
{
    int index = key.hashCode() & _hashMask;
    Bucket bucket = _buckets[index];
    // Let's unroll first lookup since that is null or match in 90+% cases
    if (bucket == null) {
        return null;
    }
    // Primarily we do just identity comparison as keys should be interned
    if (bucket.key == key) {
        return bucket.value;
    }
    while ((bucket = bucket.next) != null) {
        if (bucket.key == key) {
            return bucket.value;
        }
    }
    // Do we need fallback for non-interned Strings?
    return _findWithEquals(key, index);
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:21,代码来源:BeanPropertyMap.java


示例13: remove

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
/**
 * Specialized method for removing specified existing entry.
 * NOTE: entry MUST exist, otherwise an exception is thrown.
 */
public void remove(SettableBeanProperty property)
{
    // Mostly this is the same as code with 'replace', just bit simpler...
    String name = property.getName();
    int index = name.hashCode() & (_buckets.length-1);
    Bucket tail = null;
    boolean found = false;
    // slightly complex just because chain is immutable, must recreate
    for (Bucket bucket = _buckets[index]; bucket != null; bucket = bucket.next) {
        // match to remove?
        if (!found && bucket.key.equals(name)) {
            found = true;
        } else {
            tail = new Bucket(tail, bucket.key, bucket.value, bucket.index);
        }
    }
    if (!found) { // must be found
        throw new NoSuchElementException("No entry '"+property+"' found, can't remove");
    }
    _buckets[index] = tail;
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:26,代码来源:BeanPropertyMap.java


示例14: handleIdValue

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
/**
 * Helper method called to handle Object Id value collected earlier, if any
 */
public Object handleIdValue(final DeserializationContext ctxt, Object bean)
    throws IOException
{
    if (_objectIdReader != null) {
        if (_idValue != null) {
            ReadableObjectId roid = ctxt.findObjectId(_idValue, _objectIdReader.generator);
            roid.bindItem(bean);
            // also: may need to set a property value as well
            SettableBeanProperty idProp = _objectIdReader.idProperty;
            if (idProp != null) {
                return idProp.setAndReturn(bean, _idValue);
            }
        } else {
            // TODO: is this an error case?
        }
    }
    return bean;
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:22,代码来源:PropertyValueBuffer.java


示例15: PropertyBasedCreator

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
protected PropertyBasedCreator(ValueInstantiator valueInstantiator,
        SettableBeanProperty[] creatorProps, Object[] defaultValues)
{
    _valueInstantiator = valueInstantiator;
    _properties = new HashMap<String, SettableBeanProperty>();
    SettableBeanProperty[] propertiesWithInjectables = null;
    final int len = creatorProps.length;
    _propertyCount = len;
    for (int i = 0; i < len; ++i) {
        SettableBeanProperty prop = creatorProps[i];
        _properties.put(prop.getName(), prop);
        Object injectableValueId = prop.getInjectableValueId();
        if (injectableValueId != null) {
            if (propertiesWithInjectables == null) {
                propertiesWithInjectables = new SettableBeanProperty[len];
            }
            propertiesWithInjectables[i] = prop;
        }
    }
    _defaultValues = defaultValues;
    _propertiesWithInjectables = propertiesWithInjectables;
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:23,代码来源:PropertyBasedCreator.java


示例16: complete

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
public Object complete(JsonParser jp, DeserializationContext ctxt, Object bean)
    throws IOException, JsonProcessingException
{
    for (int i = 0, len = _properties.length; i < len; ++i) {
        if (_typeIds[i] == null) {
            // let's allow missing both type and property (may already have been set, too)
            if (_tokens[i] == null) {
                continue;
            }
            // but not just one
            throw ctxt.mappingException("Missing external type id property '"+_properties[i].getTypePropertyName());
        } else if (_tokens[i] == null) {
            SettableBeanProperty prop = _properties[i].getProperty();
            throw ctxt.mappingException("Missing property '"+prop.getName()+"' for external type id '"+_properties[i].getTypePropertyName());
        }
        _deserializeAndSet(jp, ctxt, bean, i);
    }
    return bean;
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:20,代码来源:ExternalTypeHandler.java


示例17: renameAll

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
public void renameAll(NameTransformer transformer)
{
    ArrayList<SettableBeanProperty> oldProps = new ArrayList<SettableBeanProperty>(_properties);
    Iterator<SettableBeanProperty> it = oldProps.iterator();
    _properties.clear();
    while (it.hasNext()) {
        SettableBeanProperty prop = it.next();
        String newName = transformer.transform(prop.getName());
        prop = prop.withName(newName);
        JsonDeserializer<?> deser = prop.getValueDeserializer();
        if (deser != null) {
            @SuppressWarnings("unchecked")
            JsonDeserializer<Object> newDeser = (JsonDeserializer<Object>)
                deser.unwrappingDeserializer(transformer);
            if (newDeser != deser) {
                prop = prop.withValueDeserializer(newDeser);
            }
        }
        _properties.add(prop);
    }
}
 
开发者ID:joyplus,项目名称:joyplus-tv,代码行数:22,代码来源:UnwrappedPropertyHandler.java


示例18: ErrorReportingSettableBeanProperty

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
/**
 * Creates a new instance with the given delegate and error consumer
 *  
 * @param delegate The delegate
 * @param jsonErrorConsumer The consumer for {@link JsonError}s. If
 * this is <code>null</code>, then errors will be ignored.
 */
ErrorReportingSettableBeanProperty(
    SettableBeanProperty delegate, 
    Consumer<? super JsonError> jsonErrorConsumer)
{
    super(delegate);
    this.delegate = delegate;
    this.jsonErrorConsumer = jsonErrorConsumer;
}
 
开发者ID:javagl,项目名称:JglTF,代码行数:16,代码来源:ErrorReportingSettableBeanProperty.java


示例19: withValueDeserializer

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
@Override
public SettableBeanProperty
    withValueDeserializer(JsonDeserializer<?> deser)
{
    return new ErrorReportingSettableBeanProperty(
        delegate.withValueDeserializer(deser), jsonErrorConsumer);
}
 
开发者ID:javagl,项目名称:JglTF,代码行数:8,代码来源:ErrorReportingSettableBeanProperty.java


示例20: createErrorHandlingBeanDeserializerModifier

import com.fasterxml.jackson.databind.deser.SettableBeanProperty; //导入依赖的package包/类
/**
 * Creates a BeanDeserializerModifier that replaces the 
 * SettableBeanProperties in the BeanDeserializerBuilder with
 * ErrorReportingSettableBeanProperty instances that forward
 * information about errors when setting bean properties to the
 * given consumer. (Don't ask ... )  
 * 
 * @param jsonErrorConsumer The consumer for {@link JsonError}s.
 * If this is <code>null</code>, then no errors will be reported.
 * @return The modifier
 */
private static BeanDeserializerModifier 
    createErrorHandlingBeanDeserializerModifier(
        Consumer<? super JsonError> jsonErrorConsumer)
{
    return new BeanDeserializerModifier()
    {
        @Override
        public BeanDeserializerBuilder updateBuilder(
            DeserializationConfig config,
            BeanDescription beanDesc,
            BeanDeserializerBuilder builder)
        {
            Iterator<SettableBeanProperty> propertiesIterator =
                builder.getProperties();
            while (propertiesIterator.hasNext())
            {
                SettableBeanProperty property = propertiesIterator.next();
                SettableBeanProperty wrappedProperty =
                    new ErrorReportingSettableBeanProperty(
                        property, jsonErrorConsumer);
                builder.addOrReplaceProperty(wrappedProperty, true);
            }
            return builder;
        }
    };    
}
 
开发者ID:javagl,项目名称:JglTF,代码行数:38,代码来源:JacksonUtils.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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