public static Method findSetMethod ( Field field , DatabaseType databaseType , boolean throwExceptions ) throws IllegalArgumentException { Method fieldSetMethod = findMethodFromNames ( field , false , throwExceptions , methodFromField ( field , "set" , databaseType , true ) , methodFromField ( field , "set" , databaseType , false ) ) ; if ( fieldSetMethod == null ) { return null ; } if ( fieldSetMethod . getReturnType ( ) != void . class ) { if ( throwExceptions ) { throw new IllegalArgumentException ( "Return type of set method " + fieldSetMethod . getName ( ) + " returns " + fieldSetMethod . getReturnType ( ) + " instead of void" ) ; } else { return null ; } } return fieldSetMethod ; }
Find and return the appropriate setter method for field .