@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); }
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)); }
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)); } } }
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())); }
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; }
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"); }
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(); } }
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; }
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; }
/** * 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); }
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); } }
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)); }
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)); } } }
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; }
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; }
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; }
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; }
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); }
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; }
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; }
public NumberBased(Class<?> paramClass, AnnotatedConstructor paramAnnotatedConstructor1, AnnotatedMethod paramAnnotatedMethod1, AnnotatedConstructor paramAnnotatedConstructor2, AnnotatedMethod paramAnnotatedMethod2) { this._valueClass = paramClass; Constructor localConstructor1; Constructor localConstructor2; label30: Method localMethod1; label43: Method localMethod2; if (paramAnnotatedConstructor1 == null) { localConstructor1 = null; this._intCtor = localConstructor1; if (paramAnnotatedConstructor2 != null) break label73; localConstructor2 = null; this._longCtor = localConstructor2; if (paramAnnotatedMethod1 != null) break label83; localMethod1 = null; this._intFactoryMethod = localMethod1; localMethod2 = null; if (paramAnnotatedMethod2 != null) break label92; } while (true) { this._longFactoryMethod = localMethod2; return; localConstructor1 = paramAnnotatedConstructor1.getAnnotated(); break; label73: localConstructor2 = paramAnnotatedConstructor2.getAnnotated(); break label30; label83: localMethod1 = paramAnnotatedMethod1.getAnnotated(); break label43; label92: localMethod2 = paramAnnotatedMethod2.getAnnotated(); } }
protected AnnotatedMethod verifyNonDup(AnnotatedMethod newOne, AnnotatedMethod oldOne, String type) { if (oldOne != null) { throw new IllegalArgumentException("Conflicting "+type+" factory methods: already had "+oldOne+", encountered "+newOne); } if (_canFixAccess) { ClassUtil.checkAndFixAccess(newOne.getAnnotated()); } return newOne; }
public StringBased(Class<?> valueClass, AnnotatedConstructor ctor, AnnotatedMethod factoryMethod) { _valueClass = valueClass; _ctor = (ctor == null) ? null : ctor.getAnnotated(); _factoryMethod = (factoryMethod == null) ? null : factoryMethod.getAnnotated(); }
public NumberBased(Class<?> valueClass, AnnotatedConstructor intCtor, AnnotatedMethod ifm, AnnotatedConstructor longCtor, AnnotatedMethod lfm) { _valueClass = valueClass; _intCtor = (intCtor == null) ? null : intCtor.getAnnotated(); _longCtor = (longCtor == null) ? null : longCtor.getAnnotated(); _intFactoryMethod = (ifm == null) ? null : ifm.getAnnotated(); _longFactoryMethod = (lfm == null) ? null : lfm.getAnnotated(); }
public Delegating(AnnotatedConstructor ctor, AnnotatedMethod factory) { if (ctor != null) { _ctor = ctor.getAnnotated(); _factoryMethod = null; _valueType = TypeFactory.type(ctor.getParameterType(0)); } else if (factory != null) { _ctor = null; _factoryMethod = factory.getAnnotated(); _valueType = TypeFactory.type(factory.getParameterType(0)); } else { throw new IllegalArgumentException("Internal error: neither delegating constructor nor factory method passed"); } }
protected List<BeanPropertyWriter> findBeanProperties(SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription) { List localList = paramBasicBeanDescription.findProperties(); AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector(); removeIgnorableTypes(paramSerializationConfig, paramBasicBeanDescription, localList); if (paramSerializationConfig.isEnabled(SerializationConfig.Feature.REQUIRE_SETTERS_FOR_GETTERS)) removeSetterlessGetters(paramSerializationConfig, paramBasicBeanDescription, localList); if (localList.isEmpty()) return null; boolean bool = usesStaticTyping(paramSerializationConfig, paramBasicBeanDescription, null, null); PropertyBuilder localPropertyBuilder = constructPropertyBuilder(paramSerializationConfig, paramBasicBeanDescription); ArrayList localArrayList = new ArrayList(localList.size()); TypeBindings localTypeBindings = paramBasicBeanDescription.bindingsForBeanType(); Iterator localIterator = localList.iterator(); while (localIterator.hasNext()) { BeanPropertyDefinition localBeanPropertyDefinition = (BeanPropertyDefinition)localIterator.next(); AnnotatedMember localAnnotatedMember = localBeanPropertyDefinition.getAccessor(); AnnotationIntrospector.ReferenceProperty localReferenceProperty = localAnnotationIntrospector.findReferenceType(localAnnotatedMember); if ((localReferenceProperty == null) || (!localReferenceProperty.isBackReference())) { String str = localBeanPropertyDefinition.getName(); if ((localAnnotatedMember instanceof AnnotatedMethod)) localArrayList.add(_constructWriter(paramSerializationConfig, localTypeBindings, localPropertyBuilder, bool, str, (AnnotatedMethod)localAnnotatedMember)); else localArrayList.add(_constructWriter(paramSerializationConfig, localTypeBindings, localPropertyBuilder, bool, str, (AnnotatedField)localAnnotatedMember)); } } return localArrayList; }