class FrameConverter<F> implements AutoCloseable {
    protected Frame frame;

    public abstract Frame convert(F f);
    public abstract F convert(Frame frame);

    @Override public void close() {<FILL_FUNCTION_BODY>}
}

        if (frame != null) {
            frame.close();
            frame = null;
        }
    
<no_super_class>