testsgen.wttools
Class CodeHints

java.lang.Object
  |
  +--testsgen.wttools.CodeHints

public class CodeHints
extends java.lang.Object

CodeHints.java contains methods for analysing some code constructions and generate hints to given code. Hint may be both ready to run code or some comments about testing this code or even comments what 'hintgen' think about this code.

I hope that it will be giving some useful information about posibility of unsave code or even may propose better algoritms for performing some actions. The simplest suggestion it can give is form example for expresion: String var = new String("Some text here"); it may suggest more simple construction: String var = "Some text here";.

Created: Tue Dec 18 15:31:22 2001

Version:
$Revision: 1.13 $
Author:
Artur Hefczyc, Patched by Peter M Kahle

Field Summary
static java.lang.Boolean[] TEST_BOOLEAN_VALUES
          Constant TEST_BOOLEAN_VALUES is an array with default values for both boolean and java.lang.Boolean types testing.
static java.lang.Byte[] TEST_BYTE_VALUES
          Constant TEST_BYTE_VALUES is an array with default values for both byte and java.lang.Byte types testing.
static java.lang.Character[] TEST_CHAR_VALUES
          Constant TEST_CHAR_VALUES is an array with default values for both char and java.lang.Character types testing.
static java.lang.String[] TEST_DOUBLE_CLASS_VALUES
          Constant TEST_DOUBLE_CLASS_VALUES is an array with default values for java.lang.Double type testing.
static java.lang.Double[] TEST_DOUBLE_VALUES
          Constant TEST_DOUBLE_VALUES is an array with default values for double type testing.
static java.lang.String[] TEST_FLOAT_CLASS_VALUES
          Constant TEST_FLOAT_CLASS_VALUES is an array with default values for java.lang.Float type testing.
static java.lang.Float[] TEST_FLOAT_VALUES
          Constant TEST_FLOAT_VALUES is an array with default values for float type testing.
static java.lang.String[] TEST_INT_CLASS_VALUES
           
static java.lang.Integer[] TEST_INT_VALUES
           
static java.lang.String[] TEST_LONG_CLASS_VALUES
           
static java.lang.String[] TEST_LONG_VALUES
           
static java.lang.Object[] TEST_OBJECT_VALUES
           
static java.lang.String[] TEST_SHORT_CLASS_VALUES
           
static java.lang.Short[] TEST_SHORT_VALUES
           
static java.lang.String[] TEST_STRING_VALUES
           
protected static java.util.Hashtable type_values
           
 
Constructor Summary
CodeHints()
           
 
Method Summary
protected static java.lang.String getExprExcs(java.lang.String expr, java.lang.String[] excs)
           
static java.lang.String getGetMethodCodeHints(MethodIfc meth, ParsedSourceIfc src)
           
static java.lang.String getSetMethodCodeHints(MethodIfc meth, ParsedSourceIfc src)
           
static java.lang.String getTestMethodCodeHints(MethodIfc meth, ParsedSourceIfc src)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_BOOLEAN_VALUES

public static final java.lang.Boolean[] TEST_BOOLEAN_VALUES
Constant TEST_BOOLEAN_VALUES is an array with default values for both boolean and java.lang.Boolean types testing.

TEST_BYTE_VALUES

public static final java.lang.Byte[] TEST_BYTE_VALUES
Constant TEST_BYTE_VALUES is an array with default values for both byte and java.lang.Byte types testing.

TEST_CHAR_VALUES

public static final java.lang.Character[] TEST_CHAR_VALUES
Constant TEST_CHAR_VALUES is an array with default values for both char and java.lang.Character types testing.

TEST_DOUBLE_CLASS_VALUES

public static final java.lang.String[] TEST_DOUBLE_CLASS_VALUES
Constant TEST_DOUBLE_CLASS_VALUES is an array with default values for java.lang.Double type testing.

TEST_DOUBLE_VALUES

public static final java.lang.Double[] TEST_DOUBLE_VALUES
Constant TEST_DOUBLE_VALUES is an array with default values for double type testing.

TEST_FLOAT_CLASS_VALUES

public static final java.lang.String[] TEST_FLOAT_CLASS_VALUES
Constant TEST_FLOAT_CLASS_VALUES is an array with default values for java.lang.Float type testing.

TEST_FLOAT_VALUES

public static final java.lang.Float[] TEST_FLOAT_VALUES
Constant TEST_FLOAT_VALUES is an array with default values for float type testing.

TEST_INT_VALUES

public static final java.lang.Integer[] TEST_INT_VALUES

TEST_INT_CLASS_VALUES

public static final java.lang.String[] TEST_INT_CLASS_VALUES

TEST_LONG_CLASS_VALUES

public static final java.lang.String[] TEST_LONG_CLASS_VALUES

TEST_LONG_VALUES

public static final java.lang.String[] TEST_LONG_VALUES

TEST_SHORT_CLASS_VALUES

public static final java.lang.String[] TEST_SHORT_CLASS_VALUES

TEST_SHORT_VALUES

public static final java.lang.Short[] TEST_SHORT_VALUES

TEST_STRING_VALUES

public static final java.lang.String[] TEST_STRING_VALUES

TEST_OBJECT_VALUES

public static final java.lang.Object[] TEST_OBJECT_VALUES

type_values

protected static java.util.Hashtable type_values
Constructor Detail

CodeHints

public CodeHints()
Method Detail

getGetMethodCodeHints

public static java.lang.String getGetMethodCodeHints(MethodIfc meth,
                                                     ParsedSourceIfc src)

getExprExcs

protected static java.lang.String getExprExcs(java.lang.String expr,
                                              java.lang.String[] excs)

getSetMethodCodeHints

public static java.lang.String getSetMethodCodeHints(MethodIfc meth,
                                                     ParsedSourceIfc src)

getTestMethodCodeHints

public static java.lang.String getTestMethodCodeHints(MethodIfc meth,
                                                      ParsedSourceIfc src)


Copyright © GNU, wttools developers Team.