soot
Class AbstractHost

java.lang.Object
  |
  +--soot.AbstractHost
Direct Known Subclasses:
AbstractUnit, Scene, SootClass, SootField, SootMethod

public class AbstractHost
extends java.lang.Object
implements Host

This class is the reference implementation for the Host interface, which allows arbitrary taggable data to be stored with Soot objects.


Constructor Summary
AbstractHost()
           
 
Method Summary
 void destroyTag(java.lang.String aName)
          Remove the tag with the given name.
 Tag getTag(java.lang.String aName)
          Returns the tag with the given name.
 java.util.List getTags()
          Get a list of tags associated with the current object.
 java.lang.Object getTagValue(java.lang.String aName)
          Returns the value attached to the given tag.
 boolean hasTag(java.lang.String aName)
          Returns true if this host has a tag with the given name.
 void incTagValue(java.lang.String aName)
          Increments the given tag, if it is either Long or Double.
 void incTagValue(java.lang.String aName, double inc)
          Increments the given tag by the given amount.
 void incTagValue(java.lang.String aName, long inc)
          Increments the given tag by the given amount.
 Tag newTag(java.lang.String aName)
          Creates a new Tag object, attaches it to the tags list, and returns it.
 Tag newTag(java.lang.String aName, java.lang.Object v)
          Creates a new Tag object with given initial value, attaches it to the tags list, and returns it.
 void setTagValue(java.lang.String aName, java.lang.Object v)
          Sets the value associated with the given tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractHost

public AbstractHost()
Method Detail

getTags

public java.util.List getTags()
Description copied from interface: Host
Get a list of tags associated with the current object.
Specified by:
getTags in interface Host

destroyTag

public void destroyTag(java.lang.String aName)
Description copied from interface: Host
Remove the tag with the given name.
Specified by:
destroyTag in interface Host

getTag

public Tag getTag(java.lang.String aName)
Description copied from interface: Host
Returns the tag with the given name.
Specified by:
getTag in interface Host

hasTag

public boolean hasTag(java.lang.String aName)
Description copied from interface: Host
Returns true if this host has a tag with the given name.
Specified by:
hasTag in interface Host

getTagValue

public java.lang.Object getTagValue(java.lang.String aName)
Description copied from interface: Host
Returns the value attached to the given tag.
Specified by:
getTagValue in interface Host

setTagValue

public void setTagValue(java.lang.String aName,
                        java.lang.Object v)
Description copied from interface: Host
Sets the value associated with the given tag.
Specified by:
setTagValue in interface Host

incTagValue

public void incTagValue(java.lang.String aName)
Description copied from interface: Host
Increments the given tag, if it is either Long or Double.
Specified by:
incTagValue in interface Host

incTagValue

public void incTagValue(java.lang.String aName,
                        long inc)
Description copied from interface: Host
Increments the given tag by the given amount.
Specified by:
incTagValue in interface Host

incTagValue

public void incTagValue(java.lang.String aName,
                        double inc)
Description copied from interface: Host
Increments the given tag by the given amount.
Specified by:
incTagValue in interface Host

newTag

public Tag newTag(java.lang.String aName,
                  java.lang.Object v)
Description copied from interface: Host
Creates a new Tag object with given initial value, attaches it to the tags list, and returns it.
Specified by:
newTag in interface Host

newTag

public Tag newTag(java.lang.String aName)
Description copied from interface: Host
Creates a new Tag object, attaches it to the tags list, and returns it.
Specified by:
newTag in interface Host