agg.util
Class Debug

java.lang.Object
  extended by agg.util.Debug

public final class Debug
extends java.lang.Object

This class provides methods for debugging output. There should be no runtime overhead if DEBUG is set to false and inlining is activated by using the "-O" switch for javac.


Field Summary
static boolean ABSTRACTION
          Activates the debug output of the findAbstraction process
static boolean CSP_VAR
           
static boolean DEBUG
          Set this flag to false to suppress all debug output.
static boolean HASHCODE
          Will be used only for debug purposes to set current object hashcode (Object.hashCode()) of graph objects.
static boolean MATCH
           
static boolean PARSING
          Activates the debug output for some parsing stuff
 
Method Summary
static void closeFile(java.lang.String fname)
           
static void openFile(java.lang.String fname, java.lang.String text)
           
static void outInFile(java.lang.String fname, java.lang.String text)
           
static void print(java.lang.String msg)
          Write msg to standard output.
static void print(java.lang.String msg, java.lang.Object obj)
          Write msg to standard output, preceeded by the class name of obj.
static void println(java.lang.String msg)
          Write msg to standard output, succeeded by a newline character.
static void println(java.lang.String msg, java.lang.Object obj)
          Write msg to standard output, preceeded by the class name of obj, and succeeded by a newline character.
static void println(java.lang.String msg, java.lang.Object obj, boolean topic)
          Writes msg to standard output, preceeded by the class name of obj, and succeeded by a newline character.
static void printlnGraph(Graph g, java.lang.String name)
           
static void printlnGraph(Graph printGraph, java.lang.String name, boolean topic)
          Prints a graph with all nodes and edges
static void printlnMorph(Morphism morph, java.lang.String name)
          Prints a graph with all nodes and edges
static void printlnMorph(Morphism morph, java.lang.String name, boolean topic)
          Prints a graph with all nodes and edges
static void printlnNode(GraphObject o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG
Set this flag to false to suppress all debug output. This flag is the master flag. It activates the output in general. It doesn't matter if any other flag is set to true.


ABSTRACTION

public static boolean ABSTRACTION
Activates the debug output of the findAbstraction process


PARSING

public static boolean PARSING
Activates the debug output for some parsing stuff


HASHCODE

public static boolean HASHCODE
Will be used only for debug purposes to set current object hashcode (Object.hashCode()) of graph objects. A new attribute member String HASHCODE will be added to the attribute of a graph object and its value will be set to hashcode. The name "HASHCODE" is reserved for debugging. Do not use this name for an attribute member. This attribute member will be ignored during graph transformation. Do not save grammar if HASHCODE is true!


MATCH

public static boolean MATCH

CSP_VAR

public static boolean CSP_VAR
Method Detail

println

public static final void println(java.lang.String msg)
Write msg to standard output, succeeded by a newline character.


print

public static final void print(java.lang.String msg)
Write msg to standard output.


println

public static final void println(java.lang.String msg,
                                 java.lang.Object obj)
Write msg to standard output, preceeded by the class name of obj, and succeeded by a newline character.


print

public static final void print(java.lang.String msg,
                               java.lang.Object obj)
Write msg to standard output, preceeded by the class name of obj.


println

public static final void println(java.lang.String msg,
                                 java.lang.Object obj,
                                 boolean topic)
Writes msg to standard output, preceeded by the class name of obj, and succeeded by a newline character. Additionally it takes care if the debug topic is set.


printlnGraph

public static void printlnGraph(Graph printGraph,
                                java.lang.String name,
                                boolean topic)
Prints a graph with all nodes and edges

Parameters:
printGraph - The graph will be printed
name - Just a short word so it is easier to identify the beginning and end
topic - takes care if the debug is set.

printlnGraph

public static void printlnGraph(Graph g,
                                java.lang.String name)

printlnNode

public static void printlnNode(GraphObject o)

printlnMorph

public static void printlnMorph(Morphism morph,
                                java.lang.String name,
                                boolean topic)
Prints a graph with all nodes and edges

Parameters:
morph - The morphism which will be printed
name - Just a short word so it is easier to identify the beginning and end
topic - takes care if the debug is set.

printlnMorph

public static void printlnMorph(Morphism morph,
                                java.lang.String name)
Prints a graph with all nodes and edges

Parameters:
morph - The morphism which will be printed
name - Just a short word so it is easier to identify the beginning and end

openFile

public static void openFile(java.lang.String fname,
                            java.lang.String text)

closeFile

public static void closeFile(java.lang.String fname)

outInFile

public static void outInFile(java.lang.String fname,
                             java.lang.String text)