sota
Class IScheme

java.lang.Object
  extended by sota.IScheme
All Implemented Interfaces:
java.lang.Comparable<IScheme>
Direct Known Subclasses:
GlobalIScheme

public class IScheme
extends java.lang.Object
implements java.lang.Comparable<IScheme>

This class provides an instrumentation scheme (IScheme). Every source file, class and function can be assigned one of the following instrumentation level:

Instrumentation levels are inherited to enclosed classes and functions if no explicit instrumentation level is assigned. ID strings are created like this:


Constructor Summary
IScheme(java.lang.String name)
          Instantiates a new IScheme with the given name.
 
Method Summary
 void addInstrumentationLevel(java.lang.String idString, int level)
          Adds a new instrumentation level for a file, class or function to the level map.
 int compareTo(IScheme o)
          (non-Javadoc)
 java.lang.String getDescription()
          Returns the description.
 java.util.Set<java.lang.String> getInstrumentationIds()
          Returns a set of all ID strings of the level map.
 int getInstrumentationLevel(java.lang.String idString)
          Returns the instrumentation level of a file, class or function.
 java.util.HashMap<java.lang.String,java.lang.Integer> getLevelMap()
          Returns the level map, a mapping from ID strings of files, classes and functions to an instrumentation level.
 java.lang.String getName()
          Returns the name.
 boolean hasInstrumentationLevel(java.lang.String idString)
          Tests whether the level map contains the ID string.
 void removeInstrumentierungsLevel(java.lang.String string)
          Removes a mapping from the level map.
 void setDescription(java.lang.String description)
          Sets a new description.
 void setLevelMap(java.util.HashMap<java.lang.String,java.lang.Integer> levelMap)
          Sets a new level map.
 void setName(java.lang.String name)
          Sets a new name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IScheme

public IScheme(java.lang.String name)
Instantiates a new IScheme with the given name.

Parameters:
name - the name
Method Detail

addInstrumentationLevel

public void addInstrumentationLevel(java.lang.String idString,
                                    int level)
Adds a new instrumentation level for a file, class or function to the level map.

Parameters:
idString - the ID string
level - the instrumentation level (0-3)

compareTo

public int compareTo(IScheme o)
(non-Javadoc)

Specified by:
compareTo in interface java.lang.Comparable<IScheme>
See Also:
Comparable.compareTo(java.lang.Object)

getDescription

public java.lang.String getDescription()
Returns the description.

Returns:
the desciption

getInstrumentationIds

public java.util.Set<java.lang.String> getInstrumentationIds()
Returns a set of all ID strings of the level map.

Returns:
the set of ID strings

getInstrumentationLevel

public int getInstrumentationLevel(java.lang.String idString)
Returns the instrumentation level of a file, class or function.

Parameters:
idString - the ID string
Returns:
the instrumentation level

getLevelMap

public java.util.HashMap<java.lang.String,java.lang.Integer> getLevelMap()
Returns the level map, a mapping from ID strings of files, classes and functions to an instrumentation level.

Returns:
the level map

getName

public java.lang.String getName()
Returns the name.

Returns:
the name

hasInstrumentationLevel

public boolean hasInstrumentationLevel(java.lang.String idString)
Tests whether the level map contains the ID string.

Parameters:
idString - the ID string
Returns:
true if contained, otherwise false

removeInstrumentierungsLevel

public void removeInstrumentierungsLevel(java.lang.String string)
Removes a mapping from the level map.

Parameters:
string - the ID string

setDescription

public void setDescription(java.lang.String description)
Sets a new description.

Parameters:
description - the new description

setLevelMap

public void setLevelMap(java.util.HashMap<java.lang.String,java.lang.Integer> levelMap)
Sets a new level map.

Parameters:
levelMap - the new level map.

setName

public void setName(java.lang.String name)
Sets a new name.

Parameters:
name - the new name