Package soot.util.dot
Class AbstractDotGraphElement
- java.lang.Object
-
- soot.util.dot.AbstractDotGraphElement
-
- Direct Known Subclasses:
DotGraph,DotGraphEdge,DotGraphNode
public abstract class AbstractDotGraphElement extends Object
- Author:
- Timothy Hoffman
-
-
Constructor Summary
Constructors Constructor Description AbstractDotGraphElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DotGraphAttributegetAttribute(String id)Collection<DotGraphAttribute>getAttributes()StringgetAttributeValue(String id)StringgetLabel()voidremoveAllAttributes()Removes all attributes from this dot element.voidremoveAttribute(String id)Removes the attribute with the givenidfrom this dot element.voidremoveAttribute(DotGraphAttribute attr)Removes the given attribute from this dot element.voidsetAttribute(String id, String value)Sets an attribute for this dot element.voidsetAttribute(DotGraphAttribute attr)Sets an attribute for this dot element.voidsetLabel(String label)Sets the label for this dot element.
-
-
-
Method Detail
-
setAttribute
public void setAttribute(String id, String value)
Sets an attribute for this dot element.- Parameters:
id- the attribute id to be setvalue- the attribute value
-
setAttribute
public void setAttribute(DotGraphAttribute attr)
Sets an attribute for this dot element.- Parameters:
attr-DotGraphAttributespecifying the attribute name and value
-
getAttributes
public Collection<DotGraphAttribute> getAttributes()
- Returns:
- unmodifiable
CollectionofDotGraphAttributefor thisAbstractDotGraphElement
-
getAttribute
public DotGraphAttribute getAttribute(String id)
- Parameters:
id-- Returns:
- the
DotGraphAttributewith the givenid
-
getAttributeValue
public String getAttributeValue(String id)
- Parameters:
id-- Returns:
- the value for the
DotGraphAttributewith the givenid
-
removeAttribute
public void removeAttribute(String id)
Removes the attribute with the givenidfrom this dot element.- Parameters:
id-
-
removeAttribute
public void removeAttribute(DotGraphAttribute attr)
Removes the given attribute from this dot element.- Parameters:
attr-DotGraphAttributespecifying the attribute to remove
-
removeAllAttributes
public void removeAllAttributes()
Removes all attributes from this dot element.
-
setLabel
public void setLabel(String label)
Sets the label for this dot element.- Parameters:
label- a label string
-
getLabel
public String getLabel()
- Returns:
- the label for this dot element
-
-