001/*
002 * Minify Maven Plugin
003 * https://github.com/samaxes/minify-maven-plugin
004 *
005 * Copyright (c) 2009 samaxes.com
006 *
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 * You may obtain a copy of the License at
010 *
011 *      http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 */
019package com.samaxes.maven.minify.common;
020
021/**
022 * <a href="http://yui.github.io/yuicompressor/">YUI Compressor</a> configuration.
023 */
024public class YuiConfig {
025
026    private final int lineBreak;
027
028    private final boolean munge;
029
030    private final boolean preserveSemicolons;
031
032    private final boolean disableOptimizations;
033
034    /**
035     * Init YuiConfig values.
036     *
037     * @param lineBreak            split long lines after a specific column
038     * @param munge                obfuscate local symbols
039     * @param preserveSemicolons   preserve unnecessary semicolons
040     * @param disableOptimizations disable all the built-in micro-optimizations
041     */
042    public YuiConfig(int lineBreak, boolean munge, boolean preserveSemicolons, boolean disableOptimizations) {
043        this.lineBreak = lineBreak;
044        this.munge = munge;
045        this.preserveSemicolons = preserveSemicolons;
046        this.disableOptimizations = disableOptimizations;
047    }
048
049    /**
050     * Gets the lineBreak.
051     *
052     * @return the lineBreak
053     */
054    public int getLineBreak() {
055        return lineBreak;
056    }
057
058    /**
059     * Gets the munge.
060     *
061     * @return the munge
062     */
063    public boolean isMunge() {
064        return munge;
065    }
066
067    /**
068     * Gets the preserveSemicolons.
069     *
070     * @return the preserveSemicolons
071     */
072    public boolean isPreserveSemicolons() {
073        return preserveSemicolons;
074    }
075
076    /**
077     * Gets the disableOptimizations.
078     *
079     * @return the disableOptimizations
080     */
081    public boolean isDisableOptimizations() {
082        return disableOptimizations;
083    }
084}