public SettableBeanProperty(String paramString, JavaType paramJavaType, PropertyName paramPropertyName, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations, boolean paramBoolean) { if ((paramString == null) || (paramString.length() == 0)) this._propName = ""; else this._propName = InternCache.instance.intern(paramString); this._type = paramJavaType; this._wrapperName = paramPropertyName; this._isRequired = paramBoolean; this._contextAnnotations = paramAnnotations; this._viewMatcher = null; this._nullProvider = null; if (paramTypeDeserializer != null) paramTypeDeserializer = paramTypeDeserializer.forProperty(this); this._valueTypeDeserializer = paramTypeDeserializer; this._valueDeserializer = MISSING_VALUE_DESERIALIZER; }
protected SettableBeanProperty(String propName, JavaType type, TypeDeserializer typeDeser, Annotations contextAnnotations) { /* 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.length() == 0) { _propName = ""; } else { _propName = InternCache.instance.intern(propName); } _type = type; _contextAnnotations = contextAnnotations; _viewMatcher = null; // 30-Jan-2012, tatu: Important: contextualize TypeDeserializer now... if (typeDeser != null) { typeDeser = typeDeser.forProperty(this); } _valueTypeDeserializer = typeDeser; }
@SuppressWarnings("unchecked") public BeanPropertyWriter(BeanPropertyDefinition propDef, AnnotatedMember member, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, boolean suppressNulls, Object suppressableValue) { _member = member; _contextAnnotations = contextAnnotations; _name = new SerializedString(propDef.getName()); _wrapperName = propDef.getWrapperName(); _declaredType = declaredType; _serializer = (JsonSerializer<Object>) ser; _dynamicSerializers = (ser == null) ? PropertySerializerMap.emptyMap() : null; _typeSerializer = typeSer; _cfgSerializationType = serType; _metadata = propDef.getMetadata(); if (member instanceof AnnotatedField) { _accessorMethod = null; _field = (Field) member.getMember(); } else if (member instanceof AnnotatedMethod) { _accessorMethod = (Method) member.getMember(); _field = null; } else { throw new IllegalArgumentException("Can not pass member of type "+member.getClass().getName()); } _suppressNulls = suppressNulls; _suppressableValue = suppressableValue; _includeInViews = propDef.findViews(); // this will be resolved later on, unless nulls are to be suppressed _nullSerializer = null; }
public Std(String paramString, JavaType paramJavaType, PropertyName paramPropertyName, Annotations paramAnnotations, AnnotatedMember paramAnnotatedMember, boolean paramBoolean) { this._name = paramString; this._type = paramJavaType; this._wrapperName = paramPropertyName; this._isRequired = paramBoolean; this._member = paramAnnotatedMember; this._contextAnnotations = paramAnnotations; }
public BeanPropertyWriter(BeanPropertyDefinition paramBeanPropertyDefinition, AnnotatedMember paramAnnotatedMember, Annotations paramAnnotations, JavaType paramJavaType1, JsonSerializer<?> paramJsonSerializer, TypeSerializer paramTypeSerializer, JavaType paramJavaType2, boolean paramBoolean, Object paramObject) { this._member = paramAnnotatedMember; this._contextAnnotations = paramAnnotations; this._name = new SerializedString(paramBeanPropertyDefinition.getName()); this._wrapperName = paramBeanPropertyDefinition.getWrapperName(); this._declaredType = paramJavaType1; this._serializer = paramJsonSerializer; PropertySerializerMap localPropertySerializerMap; if (paramJsonSerializer == null) localPropertySerializerMap = PropertySerializerMap.emptyMap(); else localPropertySerializerMap = null; this._dynamicSerializers = localPropertySerializerMap; this._typeSerializer = paramTypeSerializer; this._cfgSerializationType = paramJavaType2; this._isRequired = paramBeanPropertyDefinition.isRequired(); if ((paramAnnotatedMember instanceof AnnotatedField)) { this._accessorMethod = null; this._field = ((Field)paramAnnotatedMember.getMember()); } else if ((paramAnnotatedMember instanceof AnnotatedMethod)) { this._accessorMethod = ((Method)paramAnnotatedMember.getMember()); this._field = null; } else { throw new IllegalArgumentException("Can not pass member of type " + paramAnnotatedMember.getClass().getName()); } this._suppressNulls = paramBoolean; this._suppressableValue = paramObject; this._includeInViews = paramBeanPropertyDefinition.findViews(); this._nullSerializer = null; }
protected CreatorProperty constructCreatorProperty(DeserializationContext paramDeserializationContext, BeanDescription paramBeanDescription, String paramString, int paramInt, AnnotatedParameter paramAnnotatedParameter, Object paramObject) { DeserializationConfig localDeserializationConfig = paramDeserializationContext.getConfig(); AnnotationIntrospector localAnnotationIntrospector = paramDeserializationContext.getAnnotationIntrospector(); Boolean localBoolean1; if (localAnnotationIntrospector == null) localBoolean1 = null; else localBoolean1 = localAnnotationIntrospector.hasRequiredMarker(paramAnnotatedParameter); Boolean localBoolean2 = localBoolean1; boolean bool1; if (localBoolean1 == null) bool1 = false; else bool1 = localBoolean2.booleanValue(); JavaType localJavaType1 = localDeserializationConfig.getTypeFactory().constructType(paramAnnotatedParameter.getParameterType(), paramBeanDescription.bindingsForBeanType()); BeanProperty.Std localStd = new BeanProperty.Std(paramString, localJavaType1, localAnnotationIntrospector.findWrapperName(paramAnnotatedParameter), paramBeanDescription.getClassAnnotations(), paramAnnotatedParameter, bool1); JavaType localJavaType2 = resolveType(paramDeserializationContext, paramBeanDescription, localJavaType1, paramAnnotatedParameter); if (localJavaType2 != localJavaType1) localStd = localStd.withType(localJavaType2); JsonDeserializer localJsonDeserializer = findDeserializerFromAnnotation(paramDeserializationContext, paramAnnotatedParameter); JavaType localJavaType3 = modifyTypeByAnnotation(paramDeserializationContext, paramAnnotatedParameter, localJavaType2); TypeDeserializer localTypeDeserializer1 = (TypeDeserializer)localJavaType3.getTypeHandler(); TypeDeserializer localTypeDeserializer2 = localTypeDeserializer1; if (localTypeDeserializer1 == null) localTypeDeserializer2 = findTypeDeserializer(localDeserializationConfig, localJavaType3); PropertyName localPropertyName = localStd.getWrapperName(); Annotations localAnnotations = paramBeanDescription.getClassAnnotations(); boolean bool2 = localStd.isRequired(); CreatorProperty localCreatorProperty = new CreatorProperty(paramString, localJavaType3, localPropertyName, localTypeDeserializer2, localAnnotations, paramAnnotatedParameter, paramInt, paramObject, bool2); if (localJsonDeserializer != null) localCreatorProperty = localCreatorProperty.withValueDeserializer(localJsonDeserializer); return localCreatorProperty; }
public CreatorProperty(String paramString, JavaType paramJavaType, PropertyName paramPropertyName, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations, AnnotatedParameter paramAnnotatedParameter, int paramInt, Object paramObject, boolean paramBoolean) { super(paramString, paramJavaType, paramPropertyName, paramTypeDeserializer, paramAnnotations, paramBoolean); this._annotated = paramAnnotatedParameter; this._creatorIndex = paramInt; this._injectableValueId = paramObject; }
public ManagedReferenceProperty(SettableBeanProperty paramSettableBeanProperty1, String paramString, SettableBeanProperty paramSettableBeanProperty2, Annotations paramAnnotations, boolean paramBoolean) { super(paramSettableBeanProperty1.getName(), paramSettableBeanProperty1.getType(), paramSettableBeanProperty1.getWrapperName(), paramSettableBeanProperty1.getValueTypeDeserializer(), paramAnnotations, paramSettableBeanProperty1.isRequired()); this._referenceName = paramString; this._managedProperty = paramSettableBeanProperty1; this._backProperty = paramSettableBeanProperty2; this._isContainer = paramBoolean; }
public Std(String name, JavaType type, Annotations contextAnnotations, AnnotatedMember member) { _name = name; _type = type; _member = member; _contextAnnotations = contextAnnotations; }
@SuppressWarnings("unchecked") public BeanPropertyWriter(BeanPropertyDefinition propDef, AnnotatedMember member, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, boolean suppressNulls, Object suppressableValue) { _member = member; _contextAnnotations = contextAnnotations; _name = new SerializedString(propDef.getName()); _declaredType = declaredType; _serializer = (JsonSerializer<Object>) ser; _dynamicSerializers = (ser == null) ? PropertySerializerMap.emptyMap() : null; _typeSerializer = typeSer; _cfgSerializationType = serType; if (member instanceof AnnotatedField) { _accessorMethod = null; _field = (Field) member.getMember(); } else if (member instanceof AnnotatedMethod) { _accessorMethod = (Method) member.getMember(); _field = null; } else { throw new IllegalArgumentException("Can not pass member of type "+member.getClass().getName()); } _suppressNulls = suppressNulls; _suppressableValue = suppressableValue; _includeInViews = propDef.findViews(); // this will be resolved later on, unless nulls are to be suppressed _nullSerializer = null; }
public void addInjectable(String propertyName, JavaType propertyType, Annotations contextAnnotations, AnnotatedMember member, Object valueId) { if (_injectables == null) { _injectables = new ArrayList<ValueInjector>(); } _injectables.add(new ValueInjector(propertyName, propertyType, contextAnnotations, member, valueId)); }
public FieldProperty(BeanPropertyDefinition propDef, JavaType type, TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedField field) { super(propDef, type, typeDeser, contextAnnotations); _annotated = field; _field = field.getAnnotated(); }
public MethodProperty(BeanPropertyDefinition propDef, JavaType type, TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedMethod method) { super(propDef, type, typeDeser, contextAnnotations); _annotated = method; _setter = method.getAnnotated(); }
public SetterlessProperty(BeanPropertyDefinition propDef, JavaType type, TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedMethod method) { super(propDef, type, typeDeser, contextAnnotations); _annotated = method; _getter = method.getAnnotated(); }
public ValueInjector(String propertyName, JavaType type, Annotations contextAnnotations, AnnotatedMember mutator, Object valueId) { super(propertyName, type, contextAnnotations, mutator); _valueId = valueId; }
public ManagedReferenceProperty(SettableBeanProperty forward, String refName, SettableBeanProperty backward, Annotations contextAnnotations, boolean isContainer) { super(forward.getName(), forward.getType(), forward.getValueTypeDeserializer(), contextAnnotations); _referenceName = refName; _managedProperty = forward; _backProperty = backward; _isContainer = isContainer; }
public Annotations getClassAnnotations() { return this._beanDesc.getClassAnnotations(); }
public Annotations getClassAnnotations() { return this._classInfo.getAnnotations(); }
public final Annotations getAnnotations() { if (this._classAnnotations == null) resolveClassAnnotations(); return this._classAnnotations; }
public SettableBeanProperty(BeanPropertyDefinition paramBeanPropertyDefinition, JavaType paramJavaType, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations) { this(paramBeanPropertyDefinition.getName(), paramJavaType, paramBeanPropertyDefinition.getWrapperName(), paramTypeDeserializer, paramAnnotations, paramBeanPropertyDefinition.isRequired()); }
@Deprecated protected SettableBeanProperty(String paramString, JavaType paramJavaType, PropertyName paramPropertyName, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations) { this(paramString, paramJavaType, paramPropertyName, paramTypeDeserializer, paramAnnotations, false); }
public void addInjectable(String paramString, JavaType paramJavaType, Annotations paramAnnotations, AnnotatedMember paramAnnotatedMember, Object paramObject) { if (this._injectables == null) this._injectables = new ArrayList(); this._injectables.add(new ValueInjector(paramString, paramJavaType, paramAnnotations, paramAnnotatedMember, paramObject)); }
@Deprecated public CreatorProperty(String paramString, JavaType paramJavaType, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations, AnnotatedParameter paramAnnotatedParameter, int paramInt, Object paramObject) { this(paramString, paramJavaType, null, paramTypeDeserializer, paramAnnotations, paramAnnotatedParameter, paramInt, paramObject, true); }
public FieldProperty(BeanPropertyDefinition paramBeanPropertyDefinition, JavaType paramJavaType, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations, AnnotatedField paramAnnotatedField) { super(paramBeanPropertyDefinition, paramJavaType, paramTypeDeserializer, paramAnnotations); this._annotated = paramAnnotatedField; this._field = paramAnnotatedField.getAnnotated(); }
public MethodProperty(BeanPropertyDefinition paramBeanPropertyDefinition, JavaType paramJavaType, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations, AnnotatedMethod paramAnnotatedMethod) { super(paramBeanPropertyDefinition, paramJavaType, paramTypeDeserializer, paramAnnotations); this._annotated = paramAnnotatedMethod; this._setter = paramAnnotatedMethod.getAnnotated(); }
public SetterlessProperty(BeanPropertyDefinition paramBeanPropertyDefinition, JavaType paramJavaType, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations, AnnotatedMethod paramAnnotatedMethod) { super(paramBeanPropertyDefinition, paramJavaType, paramTypeDeserializer, paramAnnotations); this._annotated = paramAnnotatedMethod; this._getter = paramAnnotatedMethod.getAnnotated(); }
public ValueInjector(String paramString, JavaType paramJavaType, Annotations paramAnnotations, AnnotatedMember paramAnnotatedMember, Object paramObject) { super(paramString, paramJavaType, null, paramAnnotations, paramAnnotatedMember, false); this._valueId = paramObject; }
protected SettableBeanProperty _resolveManagedReferenceProperty(DeserializationContext paramDeserializationContext, SettableBeanProperty paramSettableBeanProperty) { String str1 = paramSettableBeanProperty.getManagedReferenceName(); if (str1 == null) return paramSettableBeanProperty; JsonDeserializer localJsonDeserializer1 = paramSettableBeanProperty.getValueDeserializer(); SettableBeanProperty localSettableBeanProperty; boolean bool; if ((localJsonDeserializer1 instanceof BeanDeserializerBase)) { localSettableBeanProperty = ((BeanDeserializerBase)localJsonDeserializer1).findBackReference(str1); bool = false; } else if ((localJsonDeserializer1 instanceof ContainerDeserializerBase)) { JsonDeserializer localJsonDeserializer2 = ((ContainerDeserializerBase)localJsonDeserializer1).getContentDeserializer(); if (!(localJsonDeserializer2 instanceof BeanDeserializerBase)) { String str2; if (localJsonDeserializer2 == null) str2 = "NULL"; else str2 = localJsonDeserializer2.getClass().getName(); throw new IllegalArgumentException("Can not handle managed/back reference '" + str1 + "': value deserializer is of type ContainerDeserializerBase, but content type is not handled by a BeanDeserializer (instead it's of type " + str2 + ")"); } localSettableBeanProperty = ((BeanDeserializerBase)localJsonDeserializer2).findBackReference(str1); bool = true; } else if ((localJsonDeserializer1 instanceof AbstractDeserializer)) { localSettableBeanProperty = ((AbstractDeserializer)localJsonDeserializer1).findBackReference(str1); bool = false; } else { throw new IllegalArgumentException("Can not handle managed/back reference '" + str1 + "': type for value deserializer is not BeanDeserializer or ContainerDeserializerBase, but " + localJsonDeserializer1.getClass().getName()); } if (localSettableBeanProperty == null) throw new IllegalArgumentException("Can not handle managed/back reference '" + str1 + "': no back reference property found from type " + paramSettableBeanProperty.getType()); JavaType localJavaType1 = this._beanType; JavaType localJavaType2 = localSettableBeanProperty.getType(); if (!localJavaType2.getRawClass().isAssignableFrom(localJavaType1.getRawClass())) throw new IllegalArgumentException("Can not handle managed/back reference '" + str1 + "': back reference type (" + localJavaType2.getRawClass().getName() + ") not compatible with managed type (" + localJavaType1.getRawClass().getName() + ")"); Annotations localAnnotations = this._classAnnotations; return new ManagedReferenceProperty(paramSettableBeanProperty, str1, localSettableBeanProperty, localAnnotations, bool); }
@Override public Annotations getClassAnnotations() { return _classInfo.getAnnotations(); }
public Annotations getAnnotations() { if (_classAnnotations == null) { resolveClassAnnotations(); } return _classAnnotations; }
protected SettableBeanProperty(BeanPropertyDefinition propDef, JavaType type, TypeDeserializer typeDeser, Annotations contextAnnotations) { this(propDef.getName(), type, typeDeser, contextAnnotations); }
/** * @param name Name of the logical property * @param type Type of the property, used to find deserializer * @param typeDeser Type deserializer to use for handling polymorphic type * information, if one is needed * @param contextAnnotations Contextual annotations (usually by class that * declares creator [constructor, factory method] that includes * this property) * @param param Representation of property, constructor or factory * method parameter; used for accessing annotations of the property * @param index Index of this property within creator invocatino */ public CreatorProperty(String name, JavaType type, TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedParameter param, int index, Object injectableValueId) { super(name, type, typeDeser, contextAnnotations); _annotated = param; _creatorIndex = index; _injectableValueId = injectableValueId; }
/** * Method for accessing collection of annotations the bean * class has. */ public abstract Annotations getClassAnnotations();
public abstract Annotations getClassAnnotations();