Class SignatureChecker

java.lang.Object
org.codehaus.mojo.animal_sniffer.ClassFileVisitor
org.codehaus.mojo.animal_sniffer.SignatureChecker

public class SignatureChecker extends ClassFileVisitor
Checks the signature against classes in this list.
Author:
Kohsuke Kawaguchi
  • Field Details

    • ANNOTATION_FQN

      public static final 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.
      See Also:
    • PREVIOUS_ANNOTATION_FQN

      public static final String PREVIOUS_ANNOTATION_FQN
      Similar to ANNOTATION_FQN. Kept for backward compatibility reasons
      See Also:
  • Constructor Details

  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • loadClasses

      public static Map<String,Clazz> loadClasses(InputStream in) throws IOException
      Throws:
      IOException
    • setSourcePath

      public void setSourcePath(List<File> sourcePath)
      Since:
      1.9
    • setAnnotationTypes

      public void setAnnotationTypes(Collection<String> annotationTypes)
      Sets the annotation type(s) that this checker should consider to ignore annotated methods, classes or fields.

      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.

      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

      protected void process(String name, InputStream image) throws IOException
      Specified by:
      process in class ClassFileVisitor
      Parameters:
      name - Displayable name to identify what class file we are processing
      image - Class file image.
      Throws:
      IOException
    • isSignatureBroken

      public boolean isSignatureBroken()