<?xml version="1.0"?>
<!DOCTYPE import-control PUBLIC
    "-//Puppy Crawl//DTD Import Control 1.1//EN"
    "http://www.puppycrawl.com/dtds/import_control_1_1.dtd">

<import-control pkg="com.puppycrawl.tools.checkstyle">

  <allow pkg="antlr"/>
  <allow pkg="com.google.common.base"/>
  <allow pkg="com.google.common.collect"/>
  <allow pkg="com.puppycrawl.tools.checkstyle.api"/>
  <allow pkg="java.io"/>
  <allow pkg="java.net"/>
  <allow pkg="java.nio"/>
  <allow pkg="java.util"/>
  <allow pkg="javax.xml.parsers"/>
  <allow pkg="org.apache.commons.beanutils"/>
  <allow pkg="org.apache.commons.logging"/>
  <allow pkg="org.xml.sax"/>

  <!-- The local ones -->
  <allow class="java.security.MessageDigest" local-only="true"/>
  <allow pkg="com.puppycrawl.tools.checkstyle.grammars" local-only="true"/>
  <allow pkg="org.apache.commons.cli" local-only="true"/>
  <allow pkg="org.apache.tools.ant" local-only="true"/>

  <subpackage name="api">
    <allow pkg="java.beans"/>
    <allow pkg="java.lang.reflect"/>
    <allow pkg="java.text"/>
    <allow class="com.puppycrawl.tools.checkstyle.grammars.CommentListener"
           local-only="true"/>
    <allow class="com.puppycrawl.tools.checkstyle.grammars.GeneratedJavaTokenTypes"
           local-only="true"/>
  </subpackage>

  <subpackage name="checks">
    <allow pkg="com.puppycrawl.tools.checkstyle.checks"/>
    <allow class="com.puppycrawl.tools.checkstyle.Defn"/>
    <allow pkg="java.math"/>

    <subpackage name="indentation">
      <allow pkg="java.lang.reflect"/>
    </subpackage>
    <subpackage name="header">
      <allow class="java.nio.charset.Charset" local-only="true"/>
    </subpackage>
  </subpackage>

  <subpackage name="doclets">
    <allow pkg="com.sun.javadoc"/>
  </subpackage>

  <subpackage name="filters">
    <allow pkg="java.lang.ref"/>
  </subpackage>

  <subpackage name="gui">
    <allow pkg="java.awt"/>
    <allow pkg="javax.swing"/>
  </subpackage>
</import-control>
