public final class ModuleReflectionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Set<Class<?>> |
getCheckstyleModules(Collection<String> packages,
ClassLoader loader)
Gets checkstyle's modules (directly, not recursively) in the given packages.
|
static boolean |
isAuditListener(Class<?> clazz)
Checks whether a class may be considered as the checkstyle audit listener module.
|
static boolean |
isCheckstyleModule(Class<?> clazz)
Checks whether a class may be considered as a checkstyle module.
|
static boolean |
isCheckstyleTreeWalkerCheck(Class<?> clazz)
Checks whether a class may be considered as the checkstyle check
which has TreeWalker as a parent.
|
static boolean |
isFileFilterModule(Class<?> clazz)
Checks whether a class may be considered as the checkstyle file filter.
|
static boolean |
isFileSetModule(Class<?> clazz)
Checks whether a class may be considered as the checkstyle file set.
|
static boolean |
isFilterModule(Class<?> clazz)
Checks whether a class may be considered as the checkstyle filter.
|
static boolean |
isRootModule(Class<?> clazz)
Checks whether a class may be considered as the checkstyle root module.
|
static boolean |
isTreeWalkerFilterModule(Class<?> clazz)
Checks whether a class may be considered as the checkstyle
TreeWalker filter. |
static boolean |
isValidCheckstyleClass(Class<?> clazz)
Checks whether a class extends 'AutomaticBean', is non-abstract, and has a default
constructor.
|
public static Set<Class<?>> getCheckstyleModules(Collection<String> packages, ClassLoader loader) throws IOException
packages - the collection of package names to useloader - the class loader used to load Checkstyle package namesIOException - if the attempt to read class path resources failedisCheckstyleModule(Class)public static boolean isCheckstyleModule(Class<?> clazz)
TreeWalker filters, audit listener, or root module.clazz - class to check.public static boolean isValidCheckstyleClass(Class<?> clazz)
clazz - class to check.public static boolean isCheckstyleTreeWalkerCheck(Class<?> clazz)
clazz - class to check.public static boolean isFileSetModule(Class<?> clazz)
clazz - class to check.public static boolean isFilterModule(Class<?> clazz)
clazz - class to check.public static boolean isFileFilterModule(Class<?> clazz)
clazz - class to check.public static boolean isAuditListener(Class<?> clazz)
clazz - class to check.public static boolean isRootModule(Class<?> clazz)
clazz - class to check.public static boolean isTreeWalkerFilterModule(Class<?> clazz)
TreeWalker filter.
Checkstyle's TreeWalker filters are classes which implement 'TreeWalkerFilter'
interface.clazz - class to check.TreeWalker filter.Copyright © 2001–2018. All rights reserved.