Enum Class JavaBeanTester

java.lang.Object
java.lang.Enum<JavaBeanTester>
com.codebox.bean.JavaBeanTester
All Implemented Interfaces:
Serializable, Comparable<JavaBeanTester>, Constable

public enum JavaBeanTester extends Enum<JavaBeanTester>
Entry point for configuring tests of JavaBean-style value objects.

Start with one of the builder(...) factory methods, enable any optional checks, and finish with a terminal method on JavaBeanTesterBuilder.

JavaBeanTester.builder(SampleBean.class).checkEquals().loadData().test();
  • Method Details

    • values

      public static JavaBeanTester[] 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 JavaBeanTester 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
    • builder

      public static <T> JavaBeanTesterBuilder<T,?> builder(Class<T> clazz)
      Creates a builder for the supplied class using the default extension strategy.

      This overload is the preferred entry point. Final classes fall back to Object for extension comparisons, Lombok builder classes skip generated extensions, and other classes receive a generated Byte Buddy extension when equality-related checks need one.

      Type Parameters:
      T - the type under test
      Parameters:
      clazz - the class under test
      Returns:
      a builder for configuring and running bean tests
    • builder

      public static <T,E> JavaBeanTesterBuilder<T,E> builder(Class<T> clazz, Class<E> extension)
      Creates a builder with an explicitly supplied extension type.

      Pass null to disable extension generation entirely, or provide a custom extension type when equality verification should use a known subclass instead of the generated one.

      Type Parameters:
      T - the type under test
      E - the extension type used for equality-related checks
      Parameters:
      clazz - the class under test
      extension - the extension type to use, or null to disable extension generation
      Returns:
      a builder for configuring and running bean tests