Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 253d50e0122b162d839c0c787af1f0d6 > files > 12

checkstyle-manual-4.4-0.0.1mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!-- Content Stylesheet for Site -->

    
    

    
<!-- start the processing -->
    <!-- ====================================================================== -->
    <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
    <!-- Main Page Section -->
    <!-- ====================================================================== -->
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />

                          <meta name="author" content="Checkstyle Development Team">
            <meta name="email" content="$au.getAttributeValue("email")">
    
    
            
        
    <title>Checkstyle - Imports</title>

    <style type="text/css" media="all">
      @import url("./css/cs-layout.css");
      @import url("./css/cs-style.css");
    </style>
  </head>

  <body>
    <div class="csTopBar">
      <div class="csTopBarContents">
        <div class="csLeft">
          <h1>Imports</h1>
        </div>
        <div class="csRight">
          <a href="http://checkstyle.sourceforge.net/">
            <img src="images/logo.png" alt="Checkstyle Logo" height="70"/>
          </a>
        </div>
      </div>
    </div>


    <div class="csMiddleContainer">
      <div class="csLeftBar">
        <div class="csLeftBarContents">
            <!-- ============================================================ -->
  <!-- start makeNavigationBar -->
  
  <ul>
          <li>
        <strong>About</strong>
      </li>
                        <li>    <a href="./index.html">Checkstyle</a>
</li>
                    
  
          <li>
        <strong>Documentation</strong>
      </li>
                        <li>    <a href="./releasenotes.html">Release Notes</a>
</li>
                    
                  <li>    <a href="./config.html">Configuration</a>
</li>
                                    <li>    <a href="./property_types.html">&nbsp;&nbsp;&nbsp;Property Types</a>
</li>
                    
  
                  <li>    <a href="./running.html">Running</a>
</li>
                                    <li>    <a href="./anttask.html">&nbsp;&nbsp;&nbsp;Ant Task</a>
</li>
                    
                  <li>    <a href="./cmdline.html">&nbsp;&nbsp;&nbsp;Command Line</a>
</li>
                    
  
                  <li>    <a href="./availablechecks.html">Available Checks</a>
</li>
                    
                  <li>    <a href="./checks.html">Standard Checks</a>
</li>
                                    <li>    <a href="./config_javadoc.html">&nbsp;&nbsp;&nbsp;Javadoc Comments</a>
</li>
                    
                  <li>    <a href="./config_naming.html">&nbsp;&nbsp;&nbsp;Naming Conventions</a>
</li>
                    
                  <li>    <a href="./config_header.html">&nbsp;&nbsp;&nbsp;Headers</a>
</li>
                    
                  <li><b>    <a href="./config_imports.html">&nbsp;&nbsp;&nbsp;Imports</a>
</b></li>
                                                      <li><a href="#AvoidStarImport">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AvoidStarImport</a></li>
                                                        <li><a href="#IllegalImport">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IllegalImport</a></li>
                                                        <li><a href="#RedundantImport">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RedundantImport</a></li>
                                                        <li><a href="#UnusedImports">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;UnusedImports</a></li>
                                                        <li><a href="#ImportOrder">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ImportOrder</a></li>
                                                        <li><a href="#ImportControl">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ImportControl</a></li>
                                      
                  <li>    <a href="./config_sizes.html">&nbsp;&nbsp;&nbsp;Size Violations</a>
</li>
                    
                  <li>    <a href="./config_whitespace.html">&nbsp;&nbsp;&nbsp;Whitespace</a>
</li>
                    
                  <li>    <a href="./config_modifier.html">&nbsp;&nbsp;&nbsp;Modifiers</a>
</li>
                    
                  <li>    <a href="./config_blocks.html">&nbsp;&nbsp;&nbsp;Block Checks</a>
</li>
                    
                  <li>    <a href="./config_coding.html">&nbsp;&nbsp;&nbsp;Coding</a>
</li>
                    
                  <li>    <a href="./config_design.html">&nbsp;&nbsp;&nbsp;Class Design</a>
</li>
                    
                  <li>    <a href="./config_duplicates.html">&nbsp;&nbsp;&nbsp;Duplicate Code</a>
</li>
                    
                  <li>    <a href="./config_metrics.html">&nbsp;&nbsp;&nbsp;Metrics</a>
</li>
                    
                  <li>    <a href="./config_misc.html">&nbsp;&nbsp;&nbsp;Miscellaneous</a>
</li>
                    
  
                  <li>    <a href="./optional.html">Optional Checks</a>
</li>
                                    <li>    <a href="./config_j2ee.html">&nbsp;&nbsp;&nbsp;J2EE Checks</a>
</li>
                    
  
                  <li>    <a href="./extending.html">Extending Checkstyle</a>
</li>
                                    <li>    <a href="./writingchecks.html">&nbsp;&nbsp;&nbsp;Writing checks</a>
</li>
                    
                  <li>    <a href="./writingfilters.html">&nbsp;&nbsp;&nbsp;Writing filters</a>
</li>
                    
                  <li>    <a href="./writinglisteners.html">&nbsp;&nbsp;&nbsp;Writing listeners</a>
</li>
                    
  
                  <li>    <a href="./api/index.html">Javadoc</a>
</li>
                    
  
          <li>
        <strong>SourceForge</strong>
      </li>
                        <li>    <a href="http://sourceforge.net/mail/?group_id=29721">Mailing Lists</a>
</li>
                    
                  <li>    <a href="http://sourceforge.net/tracker/?atid=397078&group_id=29721&func=browse">Bug Database</a>
</li>
                    
                  <li>    <a href="http://sourceforge.net/tracker/?atid=397081&group_id=29721&func=browse">Feature Requests</a>
</li>
                    
  
          <li>
        <strong>Developers</strong>
      </li>
                        <li>    <a href="http://sourceforge.net/projects/checkstyle">Project Page</a>
</li>
                    
                  <li>    <a href="http://checkstyle.svn.sourceforge.net/viewvc/checkstyle/">SVN Repository</a>
</li>
                    
                  <li>    <a href="./contributing.html">Contributing</a>
</li>
                    
  
      </ul>

  <ul>
    <li>
      <strong>Hosted by:</strong>
      <div align="center">
        <p><a href="http://sourceforge.net">
        <img src="http://sourceforge.net/sflogo.php?group_id=29721&amp;type=1" width="88" height="31" alt="SourceForge Logo"/></a>
         </p>
       </div>
    </li>
  </ul>

  <!-- end makeNavigationBar -->
  <!-- ============================================================ -->
        </div>
      </div>

      <div class="csMain">
                          <a id="AvoidStarImport"></a>
  <h2>AvoidStarImport</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks that there are no import statements that use the * notation.
        </p>
                                                <p>
          Rationale: Importing all classes from a package leads to tight
          coupling between packages and might lead to problems when a new
          version of a library introduces name clashes.
        </p>
                                                                            <h3>Properties</h3>
                                    <table>
                                            <tr class="even">
                        <th valign="top" align="left"
>
                name
        </th>
                                <th valign="top" align="left"
>
                description
        </th>
                                <th valign="top" align="left"
>
                type
        </th>
                                <th valign="top" align="left"
>
                default value
        </th>
            </tr>
                                                <tr class="odd">
                        <td class="odd"
>
                excludes
        </td>
                                <td class="odd"
>
                
              packages where star imports are allowed. Note that this property
              is not recursive, subpackages of excluded packages are not
              automatically excluded.
            
        </td>
                                <td class="odd"
>
                &nbsp;
        </td>
                                <td class="odd"
>
                &nbsp;
        </td>
            </tr>
            </table>
                                                                            <h3>Example</h3>
                                    <p>
          An example how to configure the check so that star imports from
          java.io and java.net are allowed:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;AvoidStarImport&quot;&gt;
   &lt;property name=&quot;excludes&quot; value=&quot;java.io,java.net&quot;/&gt;
&lt;/module&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p> com.puppycrawl.tools.checkstyle.checks.imports </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="IllegalImport"></a>
  <h2>IllegalImport</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks for imports from a set of illegal packages. By default, the
          check rejects all <span class="code">sun.*</span> packages since
          programs that contain direct calls to the <span class="code">sun.*</span> packages are <a href="http://java.sun.com/products/jdk/faq/faq-sun-packages.html">not
          100% Pure Java</a>. To reject other packages, set property <span class="code"> illegalPkgs</span> to a list of the illegal packages.
        </p>
                                                                            <h3>Properties</h3>
                                    <table>
                                            <tr class="even">
                        <th valign="top" align="left"
>
                name
        </th>
                                <th valign="top" align="left"
>
                description
        </th>
                                <th valign="top" align="left"
>
                type
        </th>
                                <th valign="top" align="left"
>
                default value
        </th>
            </tr>
                                                <tr class="odd">
                        <td class="odd"
>
                illegalPkgs
        </td>
                                <td class="odd"
>
                packages to reject
        </td>
                                <td class="odd"
>
                &nbsp;
        </td>
                                <td class="odd"
>
                &nbsp;
        </td>
            </tr>
            </table>
                                                                            <h3>Examples</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;IllegalImport&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                <p>
          To configure the check so that it rejects packages <span class="code">java.io.*</span> and <span class="code">java.sql.*</span>:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;IllegalImport&quot;&gt;
    &lt;property name=&quot;illegalPkgs&quot; value=&quot;java.io, java.sql&quot;/&gt;
&lt;/module&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.imports
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="RedundantImport"></a>
  <h2>RedundantImport</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks for redundant import statements. An import statement is
          considered redundant if:
        </p>
                                                <ul>
          <li>
            It is a duplicate of another import. This is, when a class is
            imported more than once.
          </li>
          <li>
            The class imported is from the <span class="code">java.lang</span>
            package, e.g.  importing <span class="code">java.lang.String</span>.
          </li>
          <li>
            The class imported is from the same package.
          </li>
        </ul>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;RedundantImport&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.imports
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="UnusedImports"></a>
  <h2>UnusedImports</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks for unused import statements. Checkstyle uses a simple but
          very reliable algorithm to report on unused import statements. An
          import statement is considered unused if:
        </p>
                                                <ul>
          <li>
            It is not referenced in the file. The algorithm does not support
            wild-card imports like <span class="code">import
            java.io.*;</span>. Most IDE's provide very sophisticated checks
            for imports that handle wild-card imports.
          </li>

          <li>
            It is a duplicate of another import. This is when a class is
            imported more than once.
          </li>

          <li>
            The class imported is from the <span class="code">java.lang</span>
            package. For example importing <span class="code">java.lang.String</span>.
          </li>

          <li>
            The class imported is from the same package.
          </li>
        </ul>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;UnusedImports&quot;/&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.imports
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="ImportOrder"></a>
  <h2>ImportOrder</h2>
                                            <h3>Description</h3>
                                    <p>
          Checks the ordering/grouping of imports.  Ensures that groups of
          imports come in a specific order (e.g., java. comes first,
          javax. comes first, then everything else) and imports within each
          group are in lexicographic order.
          Static imports must be at the end of a group and in lexicographic
          order amongst themselves.
        </p>
                                                                            <h3>Properties</h3>
                                    <table>
                                            <tr class="even">
                        <th valign="top" align="left"
>
                name
        </th>
                                <th valign="top" align="left"
>
                description
        </th>
                                <th valign="top" align="left"
>
                type
        </th>
                                <th valign="top" align="left"
>
                default value
        </th>
            </tr>
                                                <tr class="odd">
                        <td class="odd"
>
                groups
        </td>
                                <td class="odd"
>
                
              list of imports groups (every group identified by string it's
              started)
            
        </td>
                                <td class="odd"
>
                &nbsp;
        </td>
                                <td class="odd"
>
                &nbsp;
        </td>
            </tr>
                                                <tr class="even">
                        <td class="even"
>
                ordered
        </td>
                                <td class="even"
>
                whether imports within group should be sorted
        </td>
                                <td class="even"
>
                &nbsp;
        </td>
                                <td class="even"
>
                true
        </td>
            </tr>
                                                <tr class="odd">
                        <td class="odd"
>
                separated
        </td>
                                <td class="odd"
>
                
              whether imports groups should be separated by, at least, one
              blank line
            
        </td>
                                <td class="odd"
>
                &nbsp;
        </td>
                                <td class="odd"
>
                false
        </td>
            </tr>
                                                <tr class="even">
                        <td class="even"
>
                caseSensitive
        </td>
                                <td class="even"
>
                whether string comparision should be case sensitive or not
        </td>
                                <td class="even"
>
                &nbsp;
        </td>
                                <td class="even"
>
                true
        </td>
            </tr>
            </table>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check so that it requires "java" packages
          first, than "javax" and than all other imports, imports
          will be sorted in the groups and groups are separated by, at least,
          on blank line:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;ImportOrder&quot;&gt;
    &lt;property name=&quot;groups&quot; value=&quot;java,javax&quot;/&gt;
    &lt;property name=&quot;ordered&quot; value=&quot;true&quot;/&gt;
    &lt;property name=&quot;separated&quot; value=&quot;true&quot;/&gt;
&lt;/module&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.imports
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                                          <a id="ImportControl"></a>
  <h2>ImportControl</h2>
                                            <h3>Description</h3>
                                    <p>
          Controls what can be imported in each package. Useful for
          ensuring that application layering rules are not violated,
          especially on large projects.
        </p>
                                                <p>
          The DTD for a import control XML document is at <a href="http://www.puppycrawl.com/dtds/import_control_1_0.dtd">http://www.puppycrawl.com/dtds/import_control_1_0.dtd</a>. It
          contains documentation on each of the elements and attributes.
        </p>
                                                <p>
          The check validates a XML document when it loads the document.
          To validate against the above DTD, include the following
          document type declaration in your XML document:
        </p>
                                                <pre>
&lt;!DOCTYPE import-control PUBLIC
    "-//Puppy Crawl//DTD Import Control 1.0//EN"
    "http://www.puppycrawl.com/dtds/import_control_1_0.dtd"&gt;
        </pre>
                                                                            <h3>Properties</h3>
                                    <table>
                                            <tr class="even">
                        <th valign="top" align="left"
>
                name
        </th>
                                <th valign="top" align="left"
>
                description
        </th>
                                <th valign="top" align="left"
>
                type
        </th>
                                <th valign="top" align="left"
>
                default value
        </th>
            </tr>
                                                <tr class="odd">
                        <td class="odd"
>
                file
        </td>
                                <td class="odd"
>
                
              name of the file containing the import control configuration.
            
        </td>
                                <td class="odd"
>
                &nbsp;
        </td>
                                <td class="odd"
>
                &nbsp;
        </td>
            </tr>
                                                <tr class="even">
                        <td class="even"
>
                url
        </td>
                                <td class="even"
>
                
              url of the file containing the import control configuration.
            
        </td>
                                <td class="even"
>
                &nbsp;
        </td>
                                <td class="even"
>
                &nbsp;
        </td>
            </tr>
            </table>
                                                                            <h3>Example</h3>
                                    <p>
          To configure the check using a import control file called
          "import-control.xml", then have the following:
        </p>
                                                    <div align="left">
    <table cellspacing="4" cellpadding="0" border="0">
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#ffffff"><pre>&lt;module name=&quot;ImportControl&quot;&gt;
    &lt;property name=&quot;file&quot; value=&quot;import-control.xml&quot;/&gt;
&lt;/module&gt;</pre></td>
      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    <tr>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
    </tr>
    </table>
    </div>
                                                <p>
          For an example import control file, look at the file called <a href="http://checkstyle.svn.sourceforge.net/viewvc/checkstyle/trunk/checkstyle/import-control.xml?view=markup">import-control.xml</a>
          which is part of the Checkstyle distribution.
        </p>
                                                                            <h3>Package</h3>
                                    <p>
          com.puppycrawl.tools.checkstyle.checks.imports
        </p>
                                                                            <h3>Parent Module</h3>
                                    <p>
          <a href="config.html#treewalker">TreeWalker</a>
        </p>
                                                            </div>
    </div>

    <div class="csBottomBar">
      <div class="csBottomBarContents">
        Copyright &copy; 2001-2007, Oliver Burn
      </div>
    </div>
  </body>
</html>

<!-- end the processing -->