PMD规则之Import Statement Rules

·  DuplicateImports: Avoid duplicate import statements.

翻译  重复的引入:避免重复的import

·  DontImportJavaLang: Avoid importing anything from the package 'java.lang'. These classes are automatically imported (JLS 7.5.3).

翻译  不要引入java.lang:避免从’java.lang’包引入任何东西,它里面的类是自动引入的

·  UnusedImports: Avoid unused import statements.

翻译  未使用的imports:去掉不使用的import

·  ImportFromSamePackage: No need to import a type that lives in the same package.

翻译  从同一个包引入:不需要从同一包引入类型

·  TooManyStaticImports: If you overuse the static import feature, it can make your program unreadable and unmaintainable, polluting its namespace with all the static members you import. Readers of your code (including you, a few months after you wrote it) will not know which class a static member comes from (Sun 1.5 Language Guide).

翻译  太多的静态引入:如果滥用静态引入特性,会使你的程序不具有可读性和可维护性,你引入的太多的静态成员污染

你可能感兴趣的:(其它,JAVA)