public final class ModuleReflectionUtil extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
ModuleReflectionUtil()
Prevent instantiation.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.Set<java.lang.Class<?>> |
getCheckstyleModules(java.util.Collection<java.lang.String> packages,
java.lang.ClassLoader loader)
Gets checkstyle's modules (directly, not recursively) in the given packages.
|
private static boolean |
hasDefaultConstructor(java.lang.Class<?> clazz)
Checks if the class has a default constructor.
|
static boolean |
isAuditListener(java.lang.Class<?> clazz)
Checks whether a class may be considered as the checkstyle audit listener module.
|
static boolean |
isCheckstyleModule(java.lang.Class<?> clazz)
Checks whether a class may be considered as a checkstyle module.
|
static boolean |
isCheckstyleTreeWalkerCheck(java.lang.Class<?> clazz)
Checks whether a class may be considered as the checkstyle check
which has TreeWalker as a parent.
|
static boolean |
isFileFilterModule(java.lang.Class<?> clazz)
Checks whether a class may be considered as the checkstyle file filter.
|
static boolean |
isFileSetModule(java.lang.Class<?> clazz)
Checks whether a class may be considered as the checkstyle file set.
|
static boolean |
isFilterModule(java.lang.Class<?> clazz)
Checks whether a class may be considered as the checkstyle filter.
|
private static boolean |
isNotXpathFileGenerator(java.lang.Class<?> clazz)
Checks whether a class is
XpathFileGeneratorAstFilter or
XpathFileGeneratorAuditListener. |
static boolean |
isRootModule(java.lang.Class<?> clazz)
Checks whether a class may be considered as the checkstyle root module.
|
static boolean |
isTreeWalkerFilterModule(java.lang.Class<?> clazz)
Checks whether a class may be considered as the checkstyle
TreeWalker filter. |
static boolean |
isValidCheckstyleClass(java.lang.Class<?> clazz)
Checks whether a class extends 'AutomaticBean', is non-abstract, and has a default
constructor.
|
private ModuleReflectionUtil()
public static java.util.Set<java.lang.Class<?>> getCheckstyleModules(java.util.Collection<java.lang.String> packages, java.lang.ClassLoader loader) throws java.io.IOException
packages - the collection of package names to useloader - the class loader used to load Checkstyle package namesjava.io.IOException - if the attempt to read class path resources failedisCheckstyleModule(Class)public static boolean isCheckstyleModule(java.lang.Class<?> clazz)
TreeWalker filters, audit listener, or root module.clazz - class to check.public static boolean isValidCheckstyleClass(java.lang.Class<?> clazz)
clazz - class to check.private static boolean hasDefaultConstructor(java.lang.Class<?> clazz)
clazz - class to checkpublic static boolean isCheckstyleTreeWalkerCheck(java.lang.Class<?> clazz)
clazz - class to check.public static boolean isFileSetModule(java.lang.Class<?> clazz)
clazz - class to check.public static boolean isFilterModule(java.lang.Class<?> clazz)
clazz - class to check.public static boolean isFileFilterModule(java.lang.Class<?> clazz)
clazz - class to check.public static boolean isAuditListener(java.lang.Class<?> clazz)
clazz - class to check.public static boolean isRootModule(java.lang.Class<?> clazz)
clazz - class to check.public static boolean isTreeWalkerFilterModule(java.lang.Class<?> clazz)
TreeWalker filter.
Checkstyle's TreeWalker filters are classes which implement 'TreeWalkerFilter'
interface.clazz - class to check.TreeWalker filter.private static boolean isNotXpathFileGenerator(java.lang.Class<?> clazz)
XpathFileGeneratorAstFilter or
XpathFileGeneratorAuditListener.
See issue #102 https://github.com/checkstyle/checkstyle/issues/102clazz - class to check.Copyright © 2001-2022. All Rights Reserved.