Package org.kohsuke.accmod.impl
Class Checker
- java.lang.Object
-
- org.kohsuke.accmod.impl.Checker
-
public class Checker extends Object
Performs check.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description ClassLoader
dependencies
Where dependencies are loaded.
-
Constructor Summary
Constructors Constructor Description Checker(ClassLoader dependencies, ErrorListener errorListener, Properties properties, org.apache.maven.plugin.logging.Log log)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
check(File f)
Checks a single class file or a directory full of class files (recursively.)void
checkClass(File clazz)
Inspects a class for the restriction violations.ErrorListener
getErrorListener()
void
loadRestrictions(ClassLoader cl, boolean isInTheInspectedModule)
Loads an additional restriction from the specified "META-INF/services/annotations/org.kohsuke.accmod.Restricted" file.
-
-
-
Field Detail
-
dependencies
public final ClassLoader dependencies
Where dependencies are loaded. We don't actually load classes, but this is used to search for class files and indexed restrictions.
-
-
Constructor Detail
-
Checker
public Checker(ClassLoader dependencies, ErrorListener errorListener, Properties properties, org.apache.maven.plugin.logging.Log log) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getErrorListener
public ErrorListener getErrorListener()
-
check
public void check(File f) throws IOException
Checks a single class file or a directory full of class files (recursively.)- Throws:
IOException
-
loadRestrictions
public void loadRestrictions(ClassLoader cl, boolean isInTheInspectedModule) throws IOException
Loads an additional restriction from the specified "META-INF/services/annotations/org.kohsuke.accmod.Restricted" file.- Parameters:
isInTheInspectedModule
- This value shows up inRestrictedElement.isInTheInspectedModule()
.- Throws:
IOException
-
checkClass
public void checkClass(File clazz) throws IOException
Inspects a class for the restriction violations.- Throws:
IOException
-
-