Skip Headers
SigTest User's Guide
Version 3.0
E19036-02
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

G Custom SigTest Tool Example

This appendix gives an example of creating a custom tool based on the SigTest tool and its APIs. The example tool checks two implementations of a set of Java classes for serialization compatibility. You can create similar tools based on this example.

This appendix contains the following topics:

G.1 Overview

The serialization tool is an example of using the SigTest APIs to create a new kind of tool. The serialization tool verifies that two implementations of one set of classes can successfully serialize and deserialize instances of each other. For a description of serialization, see http://docs.oracle.com/javase/7/docs/technotes/guides/serialization/index.html.

G.2 Usage

The serialization tool has two commands and is run much like the base SigTest tool.

Setup command:
$ java com.sun.tdk.sertest.SerSetup [options]
Test command:
$ java com.sun.tdk.sertest.SerTest [options]

Be certain that sigtestdev.jar and sertest.jar are in the classpath. Most SigTest tool options are valid for the serialization tool.

The serialization tool differs from the base SigTest tool in the following ways:

G.3 Implementation

The serialization tool is implemented in the com.sun.tdk.sertest package in SigTest-Directory/examples/sertest/. There are three classes:

SerSetup

Main class for setup command

SerTest

Main class for test command

SerUtil

Common code for setup and test commands

For implementation details, see the Javadoc in the SigTest-Directory/javadoc/ directory.