Class CheckSezpoz


  • @Deprecated
    public final class CheckSezpoz
    extends Object
    Deprecated.
    Deprecated class.
    Author:
    Johannes Schindelin
    • Method Detail

      • check

        @Deprecated
        public static boolean check​(boolean checkJars)
                             throws IOException
        Deprecated.
        Checks the annotations of all CLASSPATH components. Optionally, it only checks the non-.jar components of the CLASSPATH. This is for Eclipse. Eclipse fails to run the annotation processor at each incremental build. In contrast to Maven, Eclipse usually does not build .jar files, though, so we can have a very quick check at startup if the annotation processor was not run correctly and undo the damage.
        Parameters:
        checkJars - whether to inspect .jar components of the CLASSPATH
        Returns:
        false, when the annotation processor had to be run
        Throws:
        IOException
        See Also:
        EclipseHelper
      • check

        @Deprecated
        public static boolean check​(File file)
                             throws IOException
        Deprecated.
        Checks the annotations of a CLASSPATH component.
        Parameters:
        file - the CLASSPATH component (.jar file or directory)
        Returns:
        false, when the annotation processor had to be run
        Throws:
        IOException
        See Also:
        EclipseHelper
      • checkDirectory

        @Deprecated
        public static boolean checkDirectory​(File classes)
                                      throws IOException
        Deprecated.
        Checks the annotations of a directory in the CLASSPATH.
        Parameters:
        classes - the CLASSPATH component directory
        Returns:
        false, when the annotation processor had to be run
        Throws:
        IOException
        See Also:
        EclipseHelper
      • checkDirectory

        @Deprecated
        public static boolean checkDirectory​(File classes,
                                             File source,
                                             long youngerThan)
                                      throws IOException
        Deprecated.
        Checks whether the annotations are possibly out-of-date.

        This method looks whether there are any .class files older than their corresponding .java files, or whether there are .class files that were generated since last time we checked.

        Parameters:
        classes - the classes/ directory where Maven puts the .class files
        source - the src/main/java/ directory where Maven expects the .java files
        youngerThan - the date/time when we last checked
        Throws:
        IOException
        See Also:
        EclipseHelper
      • checkJar

        @Deprecated
        public static void checkJar​(File file)
                             throws IOException
        Deprecated.
        Checks a .jar file for stale annotations.

        This method is broken at the moment since there is no good way to verify that SezPoz ran before the .jar file was packaged.

        Parameters:
        file - the .jar file
        Throws:
        IOException
        See Also:
        EclipseHelper
      • fix

        @Deprecated
        public static boolean fix​(File classes,
                                  File sources)
        Deprecated.
        Runs SezPoz on the sources, writing the annotations into the classes' META-INF/annotations/ directory.
        Parameters:
        classes - the output directory
        sources - the directory containing the source files
        Returns:
        whether anything in META-INF/annotations/* changed
        See Also:
        EclipseHelper