Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jini.tool
Class CheckSer

    java.lang.Object
      com.sun.jini.tool.CheckSer

public class CheckSer
extends Object

Tool to check for serializable classes that do not have explicit `serialVersionUID` fields.

Constructor Summary
`CheckSer()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CheckSer

    public CheckSer()

Method Detail

### main

    public 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. 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.

  Parameters:
    `args` - the roots of directory hierarchies

### check

    public static void check(String dir,
                             int strip)

  Checks the class file directory hierarchy starting from the specified directory. In the hierarchy, 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 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.

  Parameters:
    `dir` - directory hierarchy root
    `strip` - number of characters of prefix to strip from each class file name

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Sun Microsystems, Inc. All rights reserved