public static Method generateSetterMethod(Field field) {
        Method method = generateMethod(
                "set" + FormatTools.upFirstChar(field.getName()),
                JavaVisibility.PUBLIC,
                null,
                new Parameter(field.getType(), field.getName())
        );
        return generateMethodBody(method, "this." + field.getName() + " = " + field.getName() + ";");
    }
public static Method generateSetterMethod(Field field) {
        Method method = generateMethod(
                "set" + FormatTools.upFirstChar(field.getName()),
                JavaVisibility.PUBLIC,
                null,
                new Parameter(field.getType(), field.getName())
        );
        return generateMethodBody(method, "this." + field.getName() + " = " + field.getName() + ";");
    }
public static Method generateSetterMethod ( Field field ) { Method method = generateMethod ( "set" + FormatTools . upFirstChar ( field . getName ( ) ) , JavaVisibility . PUBLIC , null , new Parameter ( field . getType ( ) , field . getName ( ) ) ) ; return generateMethodBody ( method , "this." + field . getName ( ) + " = " + field . getName ( ) + ";" ) ; }
生成Filed的Set方法
@param field field
@return
生成Filed的Set方法