class NullLongAdapter extends TypeAdapter<Long> {
    private JsonProps jsonProps;

    public NullLongAdapter(JsonProps jsonProps) {
        this.jsonProps = jsonProps;
    }

    @Override
    public void write(JsonWriter out, Long number) throws IOException {<FILL_FUNCTION_BODY>}

    @Override
    public Long read(JsonReader jsonReader) throws IOException {
        return null;
    }
}

        if (jsonProps.longAsString) {
            if (number == null) {
                out.value("0");
            } else {
                out.value(number.toString());
            }
        } else {
            if (number == null) {
                out.value(0);
            } else {
                out.value(number);
            }
        }
    
<methods>public void <init>() ,public final java.lang.Long fromJson(java.io.Reader) throws java.io.IOException,public final java.lang.Long fromJson(java.lang.String) throws java.io.IOException,public final java.lang.Long fromJsonTree(com.google.gson.JsonElement) ,public final TypeAdapter<java.lang.Long> nullSafe() ,public abstract java.lang.Long read(com.google.gson.stream.JsonReader) throws java.io.IOException,public final java.lang.String toJson(java.lang.Long) ,public final void toJson(java.io.Writer, java.lang.Long) throws java.io.IOException,public final com.google.gson.JsonElement toJsonTree(java.lang.Long) ,public abstract void write(com.google.gson.stream.JsonWriter, java.lang.Long) throws java.io.IOException<variables>