class FieldWriterDoubleMethod<T>
        extends FieldWriter<T> {
    protected FieldWriterDoubleMethod(
            String name,
            int ordinal,
            long features,
            String format,
            String label,
            Type fieldType,
            Class fieldClass,
            Field field,
            Method method
    ) {
        super(name, ordinal, features, format, null, label, fieldType, fieldClass, field, method);
    }

    @Override
    public Object getFieldValue(Object object) {
        try {
            return method.invoke(object);
        } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException e) {
            throw new JSONException("invoke getter method error, " + fieldName, e);
        }
    }

    @Override
    public boolean write(JSONWriter jsonWriter, T object) {
        Double value;
        try {
            value = (Double) getFieldValue(object);
        } catch (RuntimeException error) {
            if (jsonWriter.isIgnoreErrorGetter()) {
                return false;
            }
            throw error;
        }

        writeFieldName(jsonWriter);

        if (value == null) {
            jsonWriter.writeNumberNull();
        } else {
            double doubleValue = value;
            if (decimalFormat != null) {
                jsonWriter.writeDouble(doubleValue, decimalFormat);
            } else {
                if ((features & JSONWriter.Feature.WriteNonStringValueAsString.mask) != 0) {
                    jsonWriter.writeString(doubleValue);
                } else {
                    jsonWriter.writeDouble(doubleValue);
                }
            }
        }

        return true;
    }

    @Override
    public void writeValue(JSONWriter jsonWriter, T object) {<FILL_FUNCTION_BODY>}
}

        Double value = (Double) getFieldValue(object);

        if (value == null) {
            jsonWriter.writeNumberNull();
        } else {
            double doubleValue = value;
            if (decimalFormat != null) {
                jsonWriter.writeDouble(doubleValue, decimalFormat);
            } else {
                jsonWriter.writeDouble(doubleValue);
            }
        }
    
<methods>public int compareTo(java.lang.Object) ,public java.lang.Object getFieldValue(T) ,public Function#RAW getFunction() ,public ObjectWriter#RAW getInitWriter() ,public Class#RAW getItemClass() ,public java.lang.reflect.Type getItemType() ,public ObjectWriter#RAW getItemWriter(com.alibaba.fastjson2.JSONWriter, java.lang.reflect.Type) ,public ObjectWriter#RAW getObjectWriter(com.alibaba.fastjson2.JSONWriter, Class#RAW) ,public final com.alibaba.fastjson2.JSONWriter.Path getPath(com.alibaba.fastjson2.JSONWriter.Path) ,public final com.alibaba.fastjson2.JSONWriter.Path getRootParentPath() ,public boolean isDateFormatISO8601() ,public boolean isDateFormatMillis() ,public boolean isFieldClassSerializable() ,public java.lang.String toString() ,public boolean unwrapped() ,public abstract boolean write(com.alibaba.fastjson2.JSONWriter, T) ,public void writeBinary(com.alibaba.fastjson2.JSONWriter, byte[]) ,public void writeBool(com.alibaba.fastjson2.JSONWriter, boolean) ,public void writeBool(com.alibaba.fastjson2.JSONWriter, boolean[]) ,public void writeDate(com.alibaba.fastjson2.JSONWriter, boolean, java.util.Date) ,public void writeDate(com.alibaba.fastjson2.JSONWriter, long) ,public void writeDate(com.alibaba.fastjson2.JSONWriter, boolean, long) ,public void writeDouble(com.alibaba.fastjson2.JSONWriter, double) ,public void writeDouble(com.alibaba.fastjson2.JSONWriter, double[]) ,public void writeDouble(com.alibaba.fastjson2.JSONWriter, java.lang.Double) ,public void writeEnum(com.alibaba.fastjson2.JSONWriter, Enum#RAW) ,public void writeEnumJSONB(com.alibaba.fastjson2.JSONWriter, Enum#RAW) ,public final void writeFieldName(com.alibaba.fastjson2.JSONWriter) ,public final void writeFieldNameJSONB(com.alibaba.fastjson2.JSONWriter) ,public void writeFloat(com.alibaba.fastjson2.JSONWriter, float) ,public void writeFloat(com.alibaba.fastjson2.JSONWriter, float[]) ,public void writeInt16(com.alibaba.fastjson2.JSONWriter, short[]) ,public void writeInt32(com.alibaba.fastjson2.JSONWriter, int) ,public void writeInt64(com.alibaba.fastjson2.JSONWriter, long) ,public void writeList(com.alibaba.fastjson2.JSONWriter, List#RAW) ,public void writeListJSONB(com.alibaba.fastjson2.JSONWriter, List#RAW) ,public void writeListStr(com.alibaba.fastjson2.JSONWriter, boolean, List<java.lang.String>) ,public void writeListValue(com.alibaba.fastjson2.JSONWriter, List#RAW) ,public void writeListValueJSONB(com.alibaba.fastjson2.JSONWriter, List#RAW) ,public void writeString(com.alibaba.fastjson2.JSONWriter, java.lang.String) ,public void writeString(com.alibaba.fastjson2.JSONWriter, char[]) ,public abstract void writeValue(com.alibaba.fastjson2.JSONWriter, T) <variables>public final non-sealed java.text.DecimalFormat decimalFormat,java.lang.Object defaultValue,public final non-sealed long features,public final non-sealed java.lang.reflect.Field field,public final non-sealed Class#RAW fieldClass,final non-sealed boolean fieldClassSerializable,public final non-sealed java.lang.String fieldName,protected final non-sealed long fieldOffset,public final non-sealed java.lang.reflect.Type fieldType,public final non-sealed java.lang.String format,final non-sealed long hashCode,volatile ObjectWriter#RAW initObjectWriter,static final AtomicReferenceFieldUpdater<FieldWriter#RAW,ObjectWriter#RAW> initObjectWriterUpdater,public final non-sealed java.lang.String label,public final non-sealed java.util.Locale locale,public final non-sealed java.lang.reflect.Method method,final non-sealed byte[] nameJSONB,long nameSymbolCache,final non-sealed char[] nameWithColonUTF16,final non-sealed byte[] nameWithColonUTF8,public final non-sealed int ordinal,transient com.alibaba.fastjson2.JSONWriter.Path path,protected final non-sealed boolean primitive,final non-sealed boolean raw,final non-sealed com.alibaba.fastjson2.JSONWriter.Path rootParentPath,final non-sealed boolean symbol,final non-sealed boolean trim