Class DataFlowNode.Builder

  • Enclosing class:
    DataFlowNode

    public static class DataFlowNode.Builder
    extends Object
    Mutable accumulator for the immutable fields of a DataFlowNode.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • id

        public DataFlowNode.Builder id​(int id)
        Parameters:
        id - identity used for equality and hashing
        Returns:
        this builder
      • name

        public DataFlowNode.Builder name​(String name)
        Parameters:
        name - display name, overriding the one derived from an SSA value
        Returns:
        this builder
      • description

        public DataFlowNode.Builder description​(String description)
        Parameters:
        description - free-form detail text
        Returns:
        this builder
      • ssaValue

        public DataFlowNode.Builder ssaValue​(SSAValue value)
        Sets the SSA value this node stands for, defaulting the name to the value's name.
        Parameters:
        value - backing SSA value, may be null
        Returns:
        this builder
      • instruction

        public DataFlowNode.Builder instruction​(IRInstruction instruction)
        Sets the IR instruction this node stands for.
        Parameters:
        instruction - backing instruction, may be null
        Returns:
        this builder
      • location

        public DataFlowNode.Builder location​(int blockId,
                                             int instructionIndex)
        Sets the block and instruction position the node came from.
        Parameters:
        blockId - owning basic block id
        instructionIndex - index within that block
        Returns:
        this builder
      • build

        public DataFlowNode build()
        Creates the node from the values collected so far.
        Returns:
        the built node