Package org.codehaus.mojo.animal_sniffer
Class SignatureChecker
java.lang.Object
org.codehaus.mojo.animal_sniffer.ClassFileVisitor
org.codehaus.mojo.animal_sniffer.SignatureChecker
Checks the signature against classes in this list.
- Author:
- Kohsuke Kawaguchi
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The fully qualified name of the annotation to use to annotate methods/fields/classes that are to be ignored by animal sniffer.static final String
Similar toANNOTATION_FQN
. -
Constructor Summary
ConstructorsConstructorDescriptionSignatureChecker
(InputStream in, Set<String> ignoredPackages, Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionboolean
static void
protected void
process
(String name, InputStream image) void
setAnnotationTypes
(Collection<String> annotationTypes) Sets the annotation type(s) that this checker should consider to ignore annotated methods, classes or fields.void
setSourcePath
(List<File> sourcePath) Methods inherited from class org.codehaus.mojo.animal_sniffer.ClassFileVisitor
isCheckJars, process, process, process, processClassFile, processDirectory, processJarFile, setCheckJars
-
Field Details
-
ANNOTATION_FQN
The fully qualified name of the annotation to use to annotate methods/fields/classes that are to be ignored by animal sniffer.- See Also:
-
PREVIOUS_ANNOTATION_FQN
Similar toANNOTATION_FQN
. Kept for backward compatibility reasons- See Also:
-
-
Constructor Details
-
SignatureChecker
public SignatureChecker(InputStream in, Set<String> ignoredPackages, Logger logger) throws IOException - Throws:
IOException
-
SignatureChecker
public SignatureChecker(Map<String, Clazz> classes, Set<String> ignoredPackages, Logger logger) throws IOException- Throws:
IOException
-
-
Method Details
-
main
- Throws:
Exception
-
loadClasses
- Throws:
IOException
-
setSourcePath
- Since:
- 1.9
-
setAnnotationTypes
Sets the annotation type(s) that this checker should consider to ignore annotated methods, classes or fields.By default, the
ANNOTATION_FQN
andPREVIOUS_ANNOTATION_FQN
are used.If you want to add an extra annotation types, make sure to add the standard one to the specified lists.
- Parameters:
annotationTypes
- a list of the fully qualified name of the annotation types to consider for ignoring annotated method, class and field- Since:
- 1.11
-
process
- Specified by:
process
in classClassFileVisitor
- Parameters:
name
- Displayable name to identify what class file we are processingimage
- Class file image.- Throws:
IOException
-
isSignatureBroken
public boolean isSignatureBroken()
-