Dresden OCL Toolkit

tudresden.ocl.injection.lib
Class TypeTracer

java.lang.Object
  extended bytudresden.ocl.injection.lib.TypeTracer

public final class TypeTracer
extends Object

Contains the log of object types found in a collection. Additionally provides static methods traceTypes(String,Collection) and traceTypes(String,Map) to be called from generated code. These logs are continuesly written to a log file, see log for the file format.


Field Summary
static char ADD_ALL
          An askeriks ('*').
static char ADD_MINIMA
          The plus character.
private  String attr
           
static char COMMENT
          The # character.
private static HashMap element_types
           
private static HashMap key_types
           
private static PrintStream log
          The information gathered by all type tracers is written to this stream.
static char REMOVE_MINIMA
          The minus character.
static char SEPARATOR
          A tabulator.
static String TRACE_TYPES
           
private  HashSet types_all
          Contains all types ever been in the collection.
private  HashSet types_minima
          Contains the minimal subset of types_all, whose subtype extension contains all elements of types_all.
 
Constructor Summary
private TypeTracer(String attr)
           
 
Method Summary
private  void traceTypes(Iterator iterator, String kind)
           
static void traceTypes(String attr, Collection c)
           
private static void traceTypes(String attr, Iterator i, HashMap types, String kind)
           
static void traceTypes(String attr, Map m)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE_TYPES

public static final String TRACE_TYPES
See Also:
Constant Field Values

element_types

private static final HashMap element_types

key_types

private static final HashMap key_types

attr

private String attr

types_all

private HashSet types_all
Contains all types ever been in the collection.


types_minima

private HashSet types_minima
Contains the minimal subset of types_all, whose subtype extension contains all elements of types_all.


SEPARATOR

public static final char SEPARATOR
A tabulator. Used for the file format written to log.

See Also:
Constant Field Values

ADD_ALL

public static final char ADD_ALL
An askeriks ('*'). Used for the file format written to log.

See Also:
Constant Field Values

ADD_MINIMA

public static final char ADD_MINIMA
The plus character. Used for the file format written to log.

See Also:
Constant Field Values

REMOVE_MINIMA

public static final char REMOVE_MINIMA
The minus character. Used for the file format written to log.

See Also:
Constant Field Values

COMMENT

public static final char COMMENT
The # character. Used for the file format written to log.

See Also:
Constant Field Values

log

private static PrintStream log
The information gathered by all type tracers is written to this stream. Is set to the file referred by the property tudresden.ocl.injection.lib.TypeTracer.log if this property is defined, otherwise points to System.out. May also be set by the user code. A description of the file format follows:

Constructor Detail

TypeTracer

private TypeTracer(String attr)
Method Detail

traceTypes

public static void traceTypes(String attr,
                              Collection c)

traceTypes

public static void traceTypes(String attr,
                              Map m)

traceTypes

private static void traceTypes(String attr,
                               Iterator i,
                               HashMap types,
                               String kind)

traceTypes

private void traceTypes(Iterator iterator,
                        String kind)

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.