class NegateLiterals extends SymbolVisitor<Void, Symbol> {

    private static final NegateLiterals INSTANCE = new NegateLiterals();

    private NegateLiterals() {
    }

    public static Symbol negate(Symbol symbol) {
        return symbol.accept(INSTANCE, null);
    }

    @Override
    public Literal<?> visitLiteral(Literal<?> symbol, Void context) {<FILL_FUNCTION_BODY>}
}

        Object value = symbol.value();
        if (value == null) {
            return symbol;
        }
        DataType<?> valueType = symbol.valueType();
        switch (valueType.id()) {
            case DoubleType.ID:
                return Literal.ofUnchecked(valueType, (Double) value * -1);
            case FloatType.ID:
                return Literal.ofUnchecked(valueType, (Double) value * -1);
            case ShortType.ID:
                return Literal.ofUnchecked(valueType, (Short) value * -1);
            case IntegerType.ID:
                return Literal.ofUnchecked(valueType, (Integer) value * -1);
            case LongType.ID:
                return Literal.ofUnchecked(valueType, (Long) value * -1);
            default:
                throw new UnsupportedOperationException(Symbols.format(
                    "Cannot negate %s. You may need to add explicit type casts", symbol));
        }
    
<methods>public non-sealed void <init>() ,public io.crate.expression.symbol.Symbol visitAggregation(io.crate.expression.symbol.Aggregation, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitAlias(io.crate.expression.symbol.AliasSymbol, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitDynamicReference(io.crate.expression.symbol.DynamicReference, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitFetchMarker(io.crate.expression.symbol.FetchMarker, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitFetchReference(io.crate.expression.symbol.FetchReference, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitFetchStub(io.crate.expression.symbol.FetchStub, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitField(io.crate.expression.symbol.ScopedSymbol, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitFunction(io.crate.expression.symbol.Function, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitInputColumn(io.crate.expression.symbol.InputColumn, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitLiteral(Literal<?>, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitMatchPredicate(io.crate.expression.symbol.MatchPredicate, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitOuterColumn(io.crate.expression.symbol.OuterColumn, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitParameterSymbol(io.crate.expression.symbol.ParameterSymbol, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitReference(io.crate.metadata.Reference, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitSelectSymbol(io.crate.expression.symbol.SelectSymbol, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitVoidReference(io.crate.expression.symbol.VoidReference, java.lang.Void) ,public io.crate.expression.symbol.Symbol visitWindowFunction(io.crate.expression.symbol.WindowFunction, java.lang.Void) <variables>