private boolean isCandidate ( PropertyDescriptor property ) { if ( "class" . equals ( property . getName ( ) ) || property . getReadMethod ( ) == null || Modifier . isStatic ( property . getReadMethod ( ) . getModifiers ( ) ) ) { return false ; } Field field = getDeclaredField ( property ) ; if ( field == null && property . getWriteMethod ( ) == null ) { log . debug ( "Property " + property . getName ( ) + " has no setter method or private attribute. Skipping." ) ; return false ; } return property . getReadMethod ( ) . getAnnotation ( Transient . class ) == null && ( field == null || field . getAnnotation ( Transient . class ) == null ) ; }
Return true if the field is private or marked as transient