001///////////////////////////////////////////////////////////////////////////////////////////////
002// checkstyle: Checks Java source code and other text files for adherence to a set of rules.
003// Copyright (C) 2001-2024 the original author or authors.
004//
005// This library is free software; you can redistribute it and/or
006// modify it under the terms of the GNU Lesser General Public
007// License as published by the Free Software Foundation; either
008// version 2.1 of the License, or (at your option) any later version.
009//
010// This library is distributed in the hope that it will be useful,
011// but WITHOUT ANY WARRANTY; without even the implied warranty of
012// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013// Lesser General Public License for more details.
014//
015// You should have received a copy of the GNU Lesser General Public
016// License along with this library; if not, write to the Free Software
017// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
018///////////////////////////////////////////////////////////////////////////////////////////////
019
020package com.puppycrawl.tools.checkstyle.checks.imports;
021
022/**
023 * Represents the policy for checking import order statements.
024 *
025 * @see ImportOrderCheck
026 */
027public enum ImportOrderOption {
028
029    /**
030     * Represents the policy that static imports are all at the top.
031     * For example:
032     *
033     * <pre>
034     *  import static java.awt.Button.ABORT;
035     *  import static java.io.File.createTempFile;
036     *  import static javax.swing.WindowConstants.*;
037     *
038     *  import java.awt.Button;
039     *  import java.awt.event.ActionEvent;
040     * </pre>
041     */
042    TOP,
043
044    /**
045     * Represents the policy that static imports are above the local group.
046     * For example:
047     *
048     * <pre>
049     *  import static java.awt.Button.A;
050     *  import static javax.swing.WindowConstants.*;
051     *  import java.awt.Dialog;
052     *  import javax.swing.JComponent;
053     *
054     *  import static java.io.File.createTempFile;
055     *  import java.io.File;
056     *  import java.io.IOException;
057     * </pre>
058     */
059    ABOVE,
060
061    /**
062     * Represents the policy that static imports are processed like non static
063     * imports. For example:
064     *
065     * <pre>
066     *  import java.awt.Button;
067     *  import static java.awt.Button.ABORT;
068     *  import java.awt.Dialog;
069     *
070     *  import static javax.swing.WindowConstants.HIDE_ON_CLOSE;
071     *  import javax.swing.JComponent;
072     * </pre>
073     */
074    INFLOW,
075
076    /**
077     * Represents the policy that static imports are under the local group.
078     * For example:
079     *
080     * <pre>
081     *  import java.awt.Dialog;
082     *  import javax.swing.JComponent;
083     *  import static java.awt.Button.A;
084     *  import static javax.swing.WindowConstants.*;
085     *
086     *  import java.io.File;
087     *  import java.io.IOException;
088     *  import static java.io.File.createTempFile;
089     * </pre>
090     */
091    UNDER,
092
093    /**
094     * Represents the policy that static imports are all at the bottom.
095     * For example:
096     *
097     * <pre>
098     *  import java.awt.Button;
099     *  import java.awt.event.ActionEvent;
100     *
101     *  import static java.awt.Button.ABORT;
102     *  import static java.io.File.createTempFile;
103     *  import static javax.swing.WindowConstants.*;
104     * </pre>
105     */
106    BOTTOM,
107
108}