001////////////////////////////////////////////////////////////////////////////////
002// checkstyle: Checks Java source code for adherence to a set of rules.
003// Copyright (C) 2001-2014  Oliver Burn
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////////////////////////////////////////////////////////////////////////////////
019package com.puppycrawl.tools.checkstyle.checks.imports;
020
021/**
022 * Represents the policy for checking import order statements.
023 * @see com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck
024 * @author David DIDIER
025 */
026public enum ImportOrderOption
027{
028    /**
029     * Represents the policy that static imports are all at the top.
030     * For example:
031     *
032     * <pre>
033        import static java.awt.Button.ABORT;
034        import static java.io.File.createTempFile;
035        import static javax.swing.WindowConstants.*;
036
037        import java.awt.Button;
038        import java.awt.event.ActionEvent;
039     * </pre>
040     */
041    TOP,
042
043    /**
044     * Represents the policy that static imports are above the local group.
045     * For example:
046     *
047     * <pre>
048        import static java.awt.Button.A;
049        import static javax.swing.WindowConstants.*;
050        import java.awt.Dialog;
051        import javax.swing.JComponent;
052
053        import static java.io.File.createTempFile;
054        import java.io.File;
055        import java.io.IOException;
056     * </pre>
057     */
058    ABOVE,
059
060    /**
061     * Represents the policy that static imports are processed like non static
062     * imports. For example:
063     *
064     * <pre>
065        import java.awt.Button;
066        import static java.awt.Button.ABORT;
067        import java.awt.Dialog;
068
069        import static javax.swing.WindowConstants.HIDE_ON_CLOSE;
070        import javax.swing.JComponent;
071     * </pre>
072     */
073    INFLOW,
074
075    /**
076     * Represents the policy that static imports are under the local group.
077     * For example:
078     *
079     * <pre>
080        import java.awt.Dialog;
081        import javax.swing.JComponent;
082        import static java.awt.Button.A;
083        import static javax.swing.WindowConstants.*;
084
085        import java.io.File;
086        import java.io.IOException;
087        import static java.io.File.createTempFile;
088     * </pre>
089     */
090    UNDER,
091
092    /**
093     * Represents the policy that static imports are all at the bottom.
094     * For example:
095     *
096     * <pre>
097        import java.awt.Button;
098        import java.awt.event.ActionEvent;
099
100        import static java.awt.Button.ABORT;
101        import static java.io.File.createTempFile;
102        import static javax.swing.WindowConstants.*;
103     * </pre>
104     */
105    BOTTOM;
106}