コード例 #1
0
  protected SettableBeanProperty(
      PropertyName propName,
      JavaType type,
      PropertyName wrapper,
      TypeDeserializer typeDeser,
      Annotations contextAnnotations,
      PropertyMetadata metadata) {
    // 09-Jan-2009, tatu: Intern()ing makes sense since Jackson parsed
    //  field names are (usually) interned too, hence lookups will be faster.
    // 23-Oct-2009, tatu: should this be disabled wrt [JACKSON-180]?
    //   Probably need not, given that namespace of field/method names
    //   is not unbounded, unlike potential JSON names.
    if (propName == null) {
      _propName = PropertyName.NO_NAME;
    } else {
      _propName = propName.internSimpleName();
    }
    _type = type;
    _wrapperName = wrapper;
    _metadata = metadata;
    _contextAnnotations = contextAnnotations;
    _viewMatcher = null;
    _nullProvider = null;

    // 30-Jan-2012, tatu: Important: contextualize TypeDeserializer now...
    if (typeDeser != null) {
      typeDeser = typeDeser.forProperty(this);
    }
    _valueTypeDeserializer = typeDeser;
    _valueDeserializer = MISSING_VALUE_DESERIALIZER;
  }
コード例 #2
0
 /**
  * Constructor only used by {@link ObjectIdValueProperty}.
  *
  * @since 2.3
  */
 protected SettableBeanProperty(
     PropertyName propName,
     JavaType type,
     PropertyMetadata metadata,
     JsonDeserializer<Object> valueDeser) {
   // as with above ctor, intern()ing probably fine
   if (propName == null) {
     _propName = PropertyName.NO_NAME;
   } else {
     _propName = propName.internSimpleName();
   }
   _type = type;
   _wrapperName = null;
   _metadata = metadata;
   _contextAnnotations = null;
   _viewMatcher = null;
   _nullProvider = null;
   _valueTypeDeserializer = null;
   _valueDeserializer = valueDeser;
 }