Enum Class EmptyBlockStyle.BlockPolicy

java.lang.Object
java.lang.Enum<EmptyBlockStyle.BlockPolicy>
org.openrewrite.java.style.EmptyBlockStyle.BlockPolicy
All Implemented Interfaces:
Serializable, Comparable<EmptyBlockStyle.BlockPolicy>, Constable
Enclosing class:
EmptyBlockStyle

public static enum EmptyBlockStyle.BlockPolicy extends Enum<EmptyBlockStyle.BlockPolicy>
  • Enum Constant Details

    • TEXT

      public static final EmptyBlockStyle.BlockPolicy TEXT
      Require that there is some text in the block. For example: catch (Exception ex) { // This is a bad coding practice }
    • STATEMENT

      public static final EmptyBlockStyle.BlockPolicy STATEMENT
      Require that there is a statement in the block. For example: finally { lock.release(); }
  • Method Details

    • values

      public static EmptyBlockStyle.BlockPolicy[] 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 EmptyBlockStyle.BlockPolicy 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