Package ghidra.program.model.listing

# Enum Class FlowOverride

java.lang.Object
java.lang.Enum<FlowOverride>
ghidra.program.model.listing.FlowOverride

All Implemented Interfaces:
  `Serializable`, `Comparable<FlowOverride>`, `Constable`

public enum FlowOverride extends Enum<FlowOverride>

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `BRANCH`
  Override the primary CALL or RETURN with a suitable JUMP operation.
  `CALL`
  Override the primary BRANCH or RETURN with a suitable CALL operation.
  `CALL_RETURN`
  Override the primary BRANCH, CALL, or RETURN with a suitable CALL/RETURN operation
  `NONE`
  No flow override has been established
  `RETURN`
  Override the primary BRANCH or CALL with a suitable RETURN operation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static FlowOverride`
  `getFlowOverride(int ordinal)`
  Return FlowOrdinal with the specified ordinal value.
  `static FlowType`
  `getModifiedFlowType(FlowType originalFlowType, FlowOverride flowOverride)`
  Get modified FlowType resulting from the application of the specified flowOverride
  `static FlowOverride`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static FlowOverride[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### NONE

    public static final FlowOverride NONE
    No flow override has been established

  - ### BRANCH

    public static final FlowOverride BRANCH
    Override the primary CALL or RETURN with a suitable JUMP operation.

           Pcode mapping:
              CALL -> BRANCH
              CALLIND -> BRANCHIND
              RETURN -> BRANCHIND

  - ### CALL

    public static final FlowOverride CALL
    Override the primary BRANCH or RETURN with a suitable CALL operation.

         	 Pcode mapping:
         		BRANCH -> CALL
              BRANCHIND -> CALLIND
              CBRANCH <addr>,<cond> -> (complex mapping)
                  tmp = BOOL_NEGATE <cond>
              	CBRANCH <label>,tmp
                  CALL <addr>
                <label>
              RETURN -> CALLIND

  - ### CALL_RETURN

    public static final FlowOverride CALL_RETURN
    Override the primary BRANCH, CALL, or RETURN with a suitable CALL/RETURN operation

         	 Pcode mapping:
         		BRANCH -> CALL/RETURN
              BRANCHIND -> CALLIND/RETURN
              CBRANCH <addr>,<cond> -> (complex mapping)
                  tmp = BOOL_NEGATE <cond>
              	CBRANCH <label>,tmp
                  CALL <addr>
                  RETURN 0
                <label>
              CALL -> CALL/RETURN
              CALLIND -> CALLIND/RETURN
              RETURN -> CALLIND/RETURN

  - ### RETURN

    public static final FlowOverride RETURN
    Override the primary BRANCH or CALL with a suitable RETURN operation.

           Pcode mapping:
              BRANCH <addr>  -> (complex mapping)
                  tmp = COPY &<addr>
                  RETURN tmp
              BRANCHIND -> RETURN
              CBRANCH <addr>,<cond>  -> (complex mapping)
              	tmp = BOOL_NEGATE <cond>
              	CBRANCH <label>,tmp
                  tmp2 = COPY &<addr>
                  RETURN tmp2
                <label>
              CALL <addr>    -> (complex mapping)
                  tmp = COPY &<addr>
                  RETURN tmp
              CALLIND -> RETURN

- ## Method Details

  - ### values

    public static FlowOverride[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static FlowOverride valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### getFlowOverride

    public static FlowOverride getFlowOverride(int ordinal)
    Return FlowOrdinal with the specified ordinal value. NONE will be returned for an unknown value.
    Parameters:
      `ordinal` -
    Returns:
      FlowOrdinal

  - ### getModifiedFlowType

    public static FlowType getModifiedFlowType(FlowType originalFlowType, FlowOverride flowOverride)
    Get modified FlowType resulting from the application of the specified flowOverride
    Parameters:
      `originalFlowType` -
      `flowOverride` -
    Returns:
      modified flow type