protected SettableBeanProperty constructSettableProperty ( DeserializationConfig config , BeanDescription beanDesc , String name , AnnotatedMethod setter , JavaType type ) { // need to ensure method is callable (for non-public) if ( config . isEnabled ( MapperFeature . CAN_OVERRIDE_ACCESS_MODIFIERS ) ) { Method member = setter . getAnnotated ( ) ; if ( ! Modifier . isPublic ( member . getModifiers ( ) ) || ! Modifier . isPublic ( member . getDeclaringClass ( ) . getModifiers ( ) ) ) { member . setAccessible ( true ) ; } } /* * First: does the Method specify the deserializer to use? If so, let's * use it. */ TypeDeserializer typeDeser = type . getTypeHandler ( ) ; SettableBeanProperty prop = new MethodProperty ( SimpleBeanPropertyDefinition . construct ( config , setter ) , type , typeDeser , beanDesc . getClassAnnotations ( ) , setter ) ; // [JACKSON-235]: need to retain name of managed forward references: AnnotationIntrospector . ReferenceProperty ref = config . getAnnotationIntrospector ( ) . findReferenceType ( setter ) ; if ( ref != null && ref . isManagedReference ( ) ) { prop . setManagedReferenceName ( ref . getName ( ) ) ; } return prop ; }
Method copied from org . codehaus . jackson . map . deser . BeanDeserializerFactory