public class SignatureChecker extends ClassFileVisitor
Modifier and Type | Field and Description |
---|---|
static String |
ANNOTATION_FQN
The fully qualified name of the annotation to use to annotate methods/fields/classes that are
to be ignored by animal sniffer.
|
static String |
PREVIOUS_ANNOTATION_FQN
Similar to
ANNOTATION_FQN . |
Constructor and Description |
---|
SignatureChecker(InputStream in,
Set<String> ignoredPackages,
Logger logger) |
Modifier and Type | Method and Description |
---|---|
boolean |
isSignatureBroken() |
static void |
main(String[] args) |
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) |
isCheckJars, process, process, processClassFile, processDirectory, processJarFile, setCheckJars
public static final String ANNOTATION_FQN
public static final String PREVIOUS_ANNOTATION_FQN
ANNOTATION_FQN
. Kept for backward compatibility reasonspublic SignatureChecker(InputStream in, Set<String> ignoredPackages, Logger logger) throws IOException
IOException
public void setAnnotationTypes(Collection<String> annotationTypes)
By default, the ANNOTATION_FQN
and PREVIOUS_ANNOTATION_FQN
are
used.
If you want to add an extra annotation types, make sure to add the standard one to the specified lists.
annotationTypes
- a list of the fully qualified name of the annotation types
to consider for ignoring annotated method, class and fieldprotected void process(String name, InputStream image) throws IOException
process
in class ClassFileVisitor
name
- Displayable name to identify what class file we are processingimage
- Class file image.IOException
public boolean isSignatureBroken()
Copyright © 2008–2017. All rights reserved.