Class DataFlowNode


  • public class DataFlowNode
    extends Object
    A node in the data flow graph standing for a value or operation, with mutable taint state.
    • Method Detail

      • getId

        public int getId()
        Returns:
        the id
      • getName

        public String getName()
        Returns:
        the name
      • getDescription

        public String getDescription()
        Returns:
        the description
      • getSsaValue

        public SSAValue getSsaValue()
        Returns:
        the ssa value
      • getInstruction

        public IRInstruction getInstruction()
        Returns:
        the instruction
      • getBlockId

        public int getBlockId()
        Returns:
        the block id
      • getInstructionIndex

        public int getInstructionIndex()
        Returns:
        the instruction index
      • isTainted

        public boolean isTainted()
        Returns:
        whether tainted
      • getTaintSource

        public String getTaintSource()
        Returns:
        the taint source
      • setTainted

        public void setTainted​(boolean tainted)
        Sets the taint flag without touching the recorded source.
        Parameters:
        tainted - new taint state
      • setTaintSource

        public void setTaintSource​(String source)
        Records where the taint came from, setting the tainted flag to match.
        Parameters:
        source - origin description, or null to clear the taint
      • getLabel

        public String getLabel()
        Returns:
        the name, else the SSA value's name, else the type display name with the id appended
      • getLocation

        public String getLocation()
        Returns:
        the position formatted as "blockN:index"
      • getTooltip

        public String getTooltip()
        Builds multi-line hover text with the type, location, SSA type and taint state.
        Returns:
        the tooltip text
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • builder

        public static DataFlowNode.Builder builder()
        Returns:
        a new builder with type defaulted to LOCAL