Coverage Report - com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderOption
 
Classes in this File Line Coverage Branch Coverage Complexity
ImportOrderOption
100%
6/6
N/A
0
 
 1  
 ////////////////////////////////////////////////////////////////////////////////
 2  
 // checkstyle: Checks Java source code for adherence to a set of rules.
 3  
 // Copyright (C) 2001-2017 the original author or authors.
 4  
 //
 5  
 // This library is free software; you can redistribute it and/or
 6  
 // modify it under the terms of the GNU Lesser General Public
 7  
 // License as published by the Free Software Foundation; either
 8  
 // version 2.1 of the License, or (at your option) any later version.
 9  
 //
 10  
 // This library is distributed in the hope that it will be useful,
 11  
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 13  
 // Lesser General Public License for more details.
 14  
 //
 15  
 // You should have received a copy of the GNU Lesser General Public
 16  
 // License along with this library; if not, write to the Free Software
 17  
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 18  
 ////////////////////////////////////////////////////////////////////////////////
 19  
 
 20  
 package com.puppycrawl.tools.checkstyle.checks.imports;
 21  
 
 22  
 /**
 23  
  * Represents the policy for checking import order statements.
 24  
  * @author David DIDIER
 25  
  * @see ImportOrderCheck
 26  
  */
 27  51
 public enum ImportOrderOption {
 28  
     /**
 29  
      * Represents the policy that static imports are all at the top.
 30  
      * For example:
 31  
      *
 32  
      * <pre>
 33  
         import static java.awt.Button.ABORT;
 34  
         import static java.io.File.createTempFile;
 35  
         import static javax.swing.WindowConstants.*;
 36  
 
 37  
         import java.awt.Button;
 38  
         import java.awt.event.ActionEvent;
 39  
      * </pre>
 40  
      */
 41  2
     TOP,
 42  
 
 43  
     /**
 44  
      * Represents the policy that static imports are above the local group.
 45  
      * For example:
 46  
      *
 47  
      * <pre>
 48  
         import static java.awt.Button.A;
 49  
         import static javax.swing.WindowConstants.*;
 50  
         import java.awt.Dialog;
 51  
         import javax.swing.JComponent;
 52  
 
 53  
         import static java.io.File.createTempFile;
 54  
         import java.io.File;
 55  
         import java.io.IOException;
 56  
      * </pre>
 57  
      */
 58  2
     ABOVE,
 59  
 
 60  
     /**
 61  
      * Represents the policy that static imports are processed like non static
 62  
      * imports. For example:
 63  
      *
 64  
      * <pre>
 65  
         import java.awt.Button;
 66  
         import static java.awt.Button.ABORT;
 67  
         import java.awt.Dialog;
 68  
 
 69  
         import static javax.swing.WindowConstants.HIDE_ON_CLOSE;
 70  
         import javax.swing.JComponent;
 71  
      * </pre>
 72  
      */
 73  2
     INFLOW,
 74  
 
 75  
     /**
 76  
      * Represents the policy that static imports are under the local group.
 77  
      * For example:
 78  
      *
 79  
      * <pre>
 80  
         import java.awt.Dialog;
 81  
         import javax.swing.JComponent;
 82  
         import static java.awt.Button.A;
 83  
         import static javax.swing.WindowConstants.*;
 84  
 
 85  
         import java.io.File;
 86  
         import java.io.IOException;
 87  
         import static java.io.File.createTempFile;
 88  
      * </pre>
 89  
      */
 90  2
     UNDER,
 91  
 
 92  
     /**
 93  
      * Represents the policy that static imports are all at the bottom.
 94  
      * For example:
 95  
      *
 96  
      * <pre>
 97  
         import java.awt.Button;
 98  
         import java.awt.event.ActionEvent;
 99  
 
 100  
         import static java.awt.Button.ABORT;
 101  
         import static java.io.File.createTempFile;
 102  
         import static javax.swing.WindowConstants.*;
 103  
      * </pre>
 104  
      */
 105  2
     BOTTOM
 106  
 }