All Downloads are FREE. Search and download functionalities are using the official Maven repository.

liqp.ParseSettings Maven / Gradle / Ivy

Go to download

A Java implementation of the Liquid templating engine backed up by an ANTLR grammar.

There is a newer version: 0.9.1.3
Show newest version
package liqp;

import liqp.parser.Flavor;

public class ParseSettings {

    public final Flavor flavor;
    public final boolean stripSpacesAroundTags;

    public static class Builder {

        Flavor flavor;
        boolean stripSpacesAroundTags;

        public Builder() {
            this.flavor = Flavor.LIQUID;
            this.stripSpacesAroundTags = false;
        }

        public Builder withFlavor(Flavor flavor) {
            this.flavor = flavor;
            return this;
        }

        public Builder withStripSpaceAroundTags(boolean stripSpacesAroundTags) {
            this.stripSpacesAroundTags = stripSpacesAroundTags;
            return this;
        }

        public ParseSettings build() {
            return new ParseSettings(this.flavor, this.stripSpacesAroundTags);
        }
    }

    private ParseSettings(Flavor flavor, boolean stripSpacesAroundTags) {
        this.flavor = flavor;
        this.stripSpacesAroundTags = stripSpacesAroundTags;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy