randoop.util
Class ClassFileConstants

Object
  extended by ClassFileConstants

public class ClassFileConstants
extends Object

Reads literals from a class file, including from the constant pool and from bytecodes that take immediate arguments.


Nested Class Summary
Modifier and Type Class and Description
static class ClassFileConstants.ConstantSet
           
 
Constructor Summary
Constructor and Description
ClassFileConstants()
           
 
Method Summary
Modifier and Type Method and Description
static ClassFileConstants.ConstantSet getConstants(String classname)
          Returns all the constants found in the given class.
static ClassFileConstants.ConstantSet getConstants(String classname, ClassFileConstants.ConstantSet result)
          Adds all the constants found in the given class into the given ConstantSet, and returns it.
static void main(String[] args)
          A simple driver program that prints output literals file format.
static MultiMap<Class<?>,PrimitiveOrStringOrNullDecl> toMap(Collection<ClassFileConstants.ConstantSet> constantSets)
          Convert a collection of ConstantSets to the format expected by GenTest.addClassLiterals.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFileConstants

public ClassFileConstants()
Method Detail

main

public static void main(String[] args)
                 throws IOException
A simple driver program that prints output literals file format.

Throws:
IOException
See Also:
LiteralFileReader

getConstants

public static ClassFileConstants.ConstantSet getConstants(String classname)
Returns all the constants found in the given class.

See Also:
getConstants(String,ConstantSet)

getConstants

public static ClassFileConstants.ConstantSet getConstants(String classname,
                                                          ClassFileConstants.ConstantSet result)
Adds all the constants found in the given class into the given ConstantSet, and returns it.

See Also:
getConstants(String)

toMap

public static MultiMap<Class<?>,PrimitiveOrStringOrNullDecl> toMap(Collection<ClassFileConstants.ConstantSet> constantSets)
Convert a collection of ConstantSets to the format expected by GenTest.addClassLiterals.