Enum ControlFlowContext.StructuredRegion
- java.lang.Object
-
- java.lang.Enum<ControlFlowContext.StructuredRegion>
-
- com.tonic.analysis.source.recovery.ControlFlowContext.StructuredRegion
-
- All Implemented Interfaces:
Serializable,Comparable<ControlFlowContext.StructuredRegion>
- Enclosing class:
- ControlFlowContext
public static enum ControlFlowContext.StructuredRegion extends Enum<ControlFlowContext.StructuredRegion>
Represents a structured control flow region.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DO_WHILE_LOOPA loop whose test sits at the latch, so the body always runs once.FOR_LOOPA head-tested loop whose induction variable and increment block were both identified, so it can print as a for statement.GUARD_CLAUSEA conditional whose taken arm exits early, so it reads as a guard rather than an if/else with two live arms.IF_THENA conditional with one populated arm, the other edge running straight to the merge.IF_THEN_ELSEA conditional with both arms populated, reconverging at a merge block.IRREDUCIBLEA region no source construct matches, such as a loop entered at more than one header.SEQUENCEStraight-line code with no branching of its own; the fallback when no other shape fits.SWITCHA multi-way dispatch on one value, with an arm per case label and a default.TRY_CATCHA protected body with its handlers, whose edges come from the exception table rather than from branches.WHILE_LOOPA loop tested at its header, with no induction variable recognized to make it a for.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ControlFlowContext.StructuredRegionvalueOf(String name)Returns the enum constant of this type with the specified name.static ControlFlowContext.StructuredRegion[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
IF_THEN
public static final ControlFlowContext.StructuredRegion IF_THEN
A conditional with one populated arm, the other edge running straight to the merge.
-
IF_THEN_ELSE
public static final ControlFlowContext.StructuredRegion IF_THEN_ELSE
A conditional with both arms populated, reconverging at a merge block.
-
WHILE_LOOP
public static final ControlFlowContext.StructuredRegion WHILE_LOOP
A loop tested at its header, with no induction variable recognized to make it a for.
-
DO_WHILE_LOOP
public static final ControlFlowContext.StructuredRegion DO_WHILE_LOOP
A loop whose test sits at the latch, so the body always runs once.
-
FOR_LOOP
public static final ControlFlowContext.StructuredRegion FOR_LOOP
A head-tested loop whose induction variable and increment block were both identified, so it can print as a for statement.
-
SWITCH
public static final ControlFlowContext.StructuredRegion SWITCH
A multi-way dispatch on one value, with an arm per case label and a default.
-
TRY_CATCH
public static final ControlFlowContext.StructuredRegion TRY_CATCH
A protected body with its handlers, whose edges come from the exception table rather than from branches.
-
SEQUENCE
public static final ControlFlowContext.StructuredRegion SEQUENCE
Straight-line code with no branching of its own; the fallback when no other shape fits.
-
IRREDUCIBLE
public static final ControlFlowContext.StructuredRegion IRREDUCIBLE
A region no source construct matches, such as a loop entered at more than one header.
-
GUARD_CLAUSE
public static final ControlFlowContext.StructuredRegion GUARD_CLAUSE
A conditional whose taken arm exits early, so it reads as a guard rather than an if/else with two live arms.
-
-
Method Detail
-
values
public static ControlFlowContext.StructuredRegion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ControlFlowContext.StructuredRegion c : ControlFlowContext.StructuredRegion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ControlFlowContext.StructuredRegion valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
-