class RefReplacer extends FunctionCopyVisitor<Function<? super Reference, ? extends Symbol>> {

    private static final RefReplacer REPLACER = new RefReplacer();

    private RefReplacer() {
        super();
    }

    /**
     * Applies {@code mapper} on all {@link Reference} instances within {@code tree}
     */
    public static Symbol replaceRefs(Symbol tree, Function<? super Reference, ? extends Symbol> mapper) {
        return tree.accept(REPLACER, mapper);
    }

    @Override
    public Symbol visitReference(Reference ref, Function<? super Reference, ? extends Symbol> mapper) {<FILL_FUNCTION_BODY>}
}

        return requireNonNull(mapper.apply(ref), "mapper function used in RefReplacer must not return null values");
    
<methods>public non-sealed void <init>() ,public io.crate.expression.symbol.Symbol visitAlias(io.crate.expression.symbol.AliasSymbol, Function<? super io.crate.metadata.Reference,? extends io.crate.expression.symbol.Symbol>) ,public io.crate.expression.symbol.Symbol visitDynamicReference(io.crate.expression.symbol.DynamicReference, Function<? super io.crate.metadata.Reference,? extends io.crate.expression.symbol.Symbol>) ,public io.crate.expression.symbol.Symbol visitFetchMarker(io.crate.expression.symbol.FetchMarker, Function<? super io.crate.metadata.Reference,? extends io.crate.expression.symbol.Symbol>) ,public io.crate.expression.symbol.Symbol visitFetchStub(io.crate.expression.symbol.FetchStub, Function<? super io.crate.metadata.Reference,? extends io.crate.expression.symbol.Symbol>) ,public io.crate.expression.symbol.Symbol visitFunction(io.crate.expression.symbol.Function, Function<? super io.crate.metadata.Reference,? extends io.crate.expression.symbol.Symbol>) ,public io.crate.expression.symbol.Symbol visitMatchPredicate(io.crate.expression.symbol.MatchPredicate, Function<? super io.crate.metadata.Reference,? extends io.crate.expression.symbol.Symbol>) ,public io.crate.expression.symbol.Symbol visitWindowFunction(io.crate.expression.symbol.WindowFunction, Function<? super io.crate.metadata.Reference,? extends io.crate.expression.symbol.Symbol>) <variables>