|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tdk.signaturetest.Result
com.sun.tdk.signaturetest.SigTest
com.sun.tdk.signaturetest.SignatureTest
public class SignatureTest
SignatureTest is the main class of signature test.
The main purpose of signature test is to ensure that programs written in Java using the class libraries of one Java implementation of a specific API version (ie. 1.1, 1.2, etc.) can rely on having the same and only the same Java APIs available in other implementations of the same API version. This is a more stringent requirement than simple binary compatibility as defined in the Java Language Specification, chapter 13. It is in essence a two-way binary compatibility requirement. Therefore, third party implementations of the Java API library must retain binary compatibility with the JavaSoft API. Also, the JavaSoft API implementation must retain binary compatibility with the Java API library under test.
SignatureTest implements the standard JavaTest 3.0
com.sun.javatest.Test
interface and uses the standard
main()
method implementation. SignatureTest allows
to check only specified by command line the package or packages. SignatureTest tracks the following aspects of binary compatibility:
SignatureTest tracks all of the public and protected class members for each public class and interface.
For each constructor or method tracked, SignatureTest tracks all modifiers except native and synchronized. It also tracks other attributes for constructors and methods: method name, argument types and order, return type, and the declared throwables.
For each field tracked, SignatureTest tracks all modifiers except transient. It also tracks these other attributes for fields: data type, and field name.
Usage:
java com.sun.tdk.signaturetest.SignatureTest
<options>where <options> includes:
-TestURL
<URL>
-FileName
<n>
-Package
<package>
-PackageWithoutSubpackages
<package>
-Exclude
<package_or_class_name>
-Package
or by
-PackageWithoutSubpackages
options.
If the specified parameter names a package, all its subpackages are implied
to be also excluded.
Such option should be included for each package (but subpackages) or class,
which is not required to be traced.
-FormatPlain
-AllPublic
-Classpath
<path>
java.io.File.pathSeparator
to separate directory and/or
zip-file names in the specified path.
Only classes from <path> will be used for tracking adding classes.
-static
-Version
<version>
getProperty("java.version")
.
-CheckValue
- Check values of primitive constant. This option can be used in static mode only.
-Verbose
- Enable error diagnostic for inherited class members.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.sun.tdk.signaturetest.plugin.PluginAPI |
---|
PluginAPI.InjectionPoint |
Field Summary | |
---|---|
static java.lang.String |
BINARY_MODE
|
static java.lang.String |
CHECKVALUE_OPTION
|
static java.lang.String |
ENABLESUPERSET_OPTION
|
protected Exclude |
exclude
|
static java.lang.String |
FILES_OPTION
|
static java.lang.String |
MODE_OPTION
|
static java.lang.String |
NOCHECKVALUE_OPTION
|
static java.lang.String |
NOMERGE_OPTION
|
static java.lang.String |
UPDATE_FILE_OPTION
|
static java.lang.String |
WRITE_OPTION
|
Fields inherited from class com.sun.tdk.signaturetest.Result |
---|
NO_EXIT |
Fields inherited from interface com.sun.tdk.signaturetest.plugin.PluginAPI |
---|
AFTER_BUILD_MEMBERS, AFTER_CLASS_CORRECTOR, BEFORE_TEST, CLASS_CORRECTOR, IS_CLASS_ACCESSIBLE, ON_CLASS_LOAD |
Constructor Summary | |
---|---|
SignatureTest()
|
Method Summary | |
---|---|
protected boolean |
allowMissingSuperclasses()
|
void |
decodeOptions(java.lang.String optionName,
java.lang.String[] args)
|
protected java.lang.String |
getComponentName()
|
protected static SignatureTest |
getInstance()
|
protected boolean |
isAPICheckMode()
|
static void |
main(java.lang.String[] args)
Run the test using command-line; return status via numeric exit code. |
protected boolean |
normalizeReq()
|
void |
run(java.lang.String[] args,
java.io.PrintWriter log,
java.io.PrintWriter ref)
This is the gate to run the test with the JavaTest application. |
protected void |
setupLoaders(ClassDescriptionLoader loader,
ClassDescriptionLoader second)
|
protected void |
usage()
Prints help text. |
boolean |
useErasurator()
|
Methods inherited from class com.sun.tdk.signaturetest.SigTest |
---|
addFormat, addInherited, decodeCommonOptions, getClassDescrLoader, getContext, getFileManager, getFilter, getLog, getNumErrors, getNumWarnings, getTransformer, initErrors, isPackageMember, load, loadPlugin, normalizeArrayParaemeters, printErrors, removeUndocumentedAnnotations, setClassDescrLoader, setFilter, setFormat, setLog, setTransformer, setupProblem, storeError, storeWarning |
Methods inherited from class com.sun.tdk.signaturetest.Result |
---|
error, exit, failed, getReason, isPassed, notrun, passed, passed, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CHECKVALUE_OPTION
public static final java.lang.String NOCHECKVALUE_OPTION
public static final java.lang.String MODE_OPTION
public static final java.lang.String ENABLESUPERSET_OPTION
public static final java.lang.String FILES_OPTION
public static final java.lang.String NOMERGE_OPTION
public static final java.lang.String WRITE_OPTION
public static final java.lang.String UPDATE_FILE_OPTION
public static final java.lang.String BINARY_MODE
protected Exclude exclude
Constructor Detail |
---|
public SignatureTest()
Method Detail |
---|
public static void main(java.lang.String[] args)
run(String[],PrintWriter,PrintWriter)
protected static SignatureTest getInstance()
public void run(java.lang.String[] args, java.io.PrintWriter log, java.io.PrintWriter ref)
log
- This log-file is used for error messages.ref
- This reference-file is ignored here.main(String[])
public void decodeOptions(java.lang.String optionName, java.lang.String[] args) throws CommandLineParserException
CommandLineParserException
protected void usage()
usage
in class SigTest
protected java.lang.String getComponentName()
getComponentName
in class SigTest
public boolean useErasurator()
useErasurator
in class SigTest
protected boolean allowMissingSuperclasses()
protected boolean normalizeReq()
protected boolean isAPICheckMode()
protected void setupLoaders(ClassDescriptionLoader loader, ClassDescriptionLoader second)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |