public class CheckSer extends Object
serialVersionUID
fields.Constructor and Description |
---|
CheckSer() |
Modifier and Type | Method and Description |
---|---|
static void |
check(String dir,
int strip)
Checks the class file directory hierarchy starting from the specified
directory.
|
static void |
main(String[] args)
Checks class file directory hierarchies for serializable classes
that do not have explicit
serialVersionUID fields,
and prints the names of such classes to the standard output stream. |
public static void main(String[] args)
serialVersionUID
fields,
and prints the names of such classes to the standard output stream.
The only options are zero or more filenames that specify the roots
of directory hierarchies; if no filenames are specified, the single
root /vob/jive/classes
is used. In those hierarchies,
each file with a name ending in the suffix .class
is
treated as a class file; the corresponding class name is obtained
from the filename by stripping off both the original prefix root
filename and the .class
suffix, and replacing each file
separator character with a period (.
). Each such class
is loaded from the class loader of this tool. If the class is not an
interface, directly or indirectly implements Serializable
,
and does not have a declared static
final
field named serialVersionUID
, then the name of the class
is printed to the standard output stream.args
- the roots of directory hierarchiespublic static void check(String dir, int strip)
.class
is treated as a class file; the
corresponding class name is obtained from the filename by stripping
off the first strip
characters of prefix and the
.class
suffix, and replacing each file separator
character with a period (.
). Each such class is loaded
from the class loader of this tool. If the class is not an interface,
directly or indirectly implements Serializable
, and does not
have a declared static
final
field named
serialVersionUID
, then the name of the class is printed
to the standard output stream.dir
- directory hierarchy rootstrip
- number of characters of prefix to strip from each
class file nameCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.