public static Method getSetterMethod(Class clazz, Field field) {
        String name = "set" + StringUtils.capitalize(field.getName());
        try {
            Method declaredMethod = clazz.getDeclaredMethod(name, field.getType());
            declaredMethod.setAccessible(true);
            return declaredMethod;
        } catch (NoSuchMethodException e) {
            return null;
        }
    }
The main internal logic of page model extractor.

@author code4crafter@gmail.com <br>
@since 0.2.0
webmagic-extension/src/main/java/us/codecraft/webmagic/model/PageModelExtractor.java