soot
Interface Host

All Known Subinterfaces:
AddInst, AndInst, ArrayLengthInst, ArrayReadInst, ArrayWriteInst, AssignStmt, BreakpointStmt, CmpgInst, CmpInst, CmplInst, DefinitionStmt, DivInst, Dup1_x1Inst, Dup1_x2Inst, Dup1Inst, Dup2_x1Inst, Dup2_x2Inst, Dup2Inst, DupInst, EnterMonitorInst, EnterMonitorStmt, ExitMonitorInst, ExitMonitorStmt, FieldArgInst, FieldGetInst, FieldPutInst, GotoInst, GotoStmt, IdentityInst, IdentityStmt, IdentityUnit, IfCmpEqInst, IfCmpGeInst, IfCmpGtInst, IfCmpLeInst, IfCmpLtInst, IfCmpNeInst, IfEqInst, IfGeInst, IfGtInst, IfLeInst, IfLtInst, IfNeInst, IfNonNullInst, IfNullInst, IfStmt, IncInst, Inst, InstanceCastInst, InstanceOfInst, InterfaceInvokeInst, InvokeStmt, LoadInst, LookupSwitchInst, LookupSwitchStmt, MethodArgInst, MonitorStmt, MulInst, NegInst, NewArrayInst, NewInst, NewMultiArrayInst, NoArgInst, NopInst, NopStmt, OpTypeArgInst, OrInst, PopInst, PrimitiveCastInst, PushInst, RemInst, RetInst, RetStmt, ReturnInst, ReturnStmt, ReturnVoidInst, ReturnVoidStmt, ShlInst, ShrInst, SpecialInvokeInst, StaticGetInst, StaticInvokeInst, StaticPutInst, Stmt, StoreInst, SubInst, SwapInst, TableSwitchInst, TableSwitchStmt, TargetArgInst, ThrowInst, ThrowStmt, Unit, UshrInst, VirtualInvokeInst, XorInst
All Known Implementing Classes:
AbstractHost

public interface Host

A "taggable" object. Implementing classes can have arbitrary labelled data attached to them. Currently, only classes, fields, methods and the Scene are Hosts. One example of a tag would be to store Boolean values, associated with array accesses, indicating whether bounds checks can be omitted.


Method Summary
 void destroyTag(java.lang.String name)
          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 name)
          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 name)
          Increments the given tag, if it is either Long or Double.
 void incTagValue(java.lang.String name, double inc)
          Increments the given tag by the given amount.
 void incTagValue(java.lang.String name, long inc)
          Increments the given tag by the given amount.
 Tag newTag(java.lang.String name)
          Creates a new Tag object, attaches it to the tags list, and returns it.
 Tag newTag(java.lang.String name, 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 name, java.lang.Object v)
          Sets the value associated with the given tag.
 

Method Detail

getTags

public java.util.List getTags()
Get a list of tags associated with the current object.

destroyTag

public void destroyTag(java.lang.String name)
Remove the tag with the given name.

getTagValue

public java.lang.Object getTagValue(java.lang.String name)
Returns the value attached to the given tag.

setTagValue

public void setTagValue(java.lang.String name,
                        java.lang.Object v)
Sets the value associated with the given tag.

incTagValue

public void incTagValue(java.lang.String name)
Increments the given tag, if it is either Long or Double.

incTagValue

public void incTagValue(java.lang.String name,
                        long inc)
Increments the given tag by the given amount.

incTagValue

public void incTagValue(java.lang.String name,
                        double inc)
Increments the given tag by the given amount.

newTag

public Tag newTag(java.lang.String name,
                  java.lang.Object v)
Creates a new Tag object with given initial value, attaches it to the tags list, and returns it.

newTag

public Tag newTag(java.lang.String name)
Creates a new Tag object, attaches it to the tags list, and returns it.

getTag

public Tag getTag(java.lang.String aName)
Returns the tag with the given name.

hasTag

public boolean hasTag(java.lang.String aName)
Returns true if this host has a tag with the given name.