Enum Class JavaBeanTester
- All Implemented Interfaces:
Serializable, Comparable<JavaBeanTester>, Constable
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();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe Class CanEqualInterceptor.static final classThe Class InstanceOfEqualsInterceptor.Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> JavaBeanTesterBuilder<T, ?> Creates a builder for the supplied class using the default extension strategy.static <T,E> JavaBeanTesterBuilder <T, E> Creates a builder with an explicitly supplied extension type.static JavaBeanTesterReturns the enum constant of this class with the specified name.static JavaBeanTester[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
builder
Creates a builder for the supplied class using the default extension strategy.This overload is the preferred entry point. Final classes fall back to
Objectfor 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
Creates a builder with an explicitly supplied extension type.Pass
nullto 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 testE- the extension type used for equality-related checks- Parameters:
clazz- the class under testextension- the extension type to use, ornullto disable extension generation- Returns:
- a builder for configuring and running bean tests
-