Class HashCodeAndEqualsPlugin.WithNonNullableFields

java.lang.Object
net.bytebuddy.build.HashCodeAndEqualsPlugin
net.bytebuddy.build.HashCodeAndEqualsPlugin.WithNonNullableFields
All Implemented Interfaces:
Closeable, AutoCloseable, Plugin, Plugin.Factory, MethodAttributeAppender, MethodAttributeAppender.Factory, ElementMatcher<TypeDescription>
Enclosing class:
HashCodeAndEqualsPlugin

@Enhance public static class HashCodeAndEqualsPlugin.WithNonNullableFields extends HashCodeAndEqualsPlugin
A version of the HashCodeAndEqualsPlugin that assumes that all fields are non-nullable unless they are explicitly marked.
  • Constructor Details

    • WithNonNullableFields

      public WithNonNullableFields()
      Creates a new hash code equals plugin where fields are assumed nullable by default.
    • WithNonNullableFields

      public WithNonNullableFields(@MaybeNull String annotationType)
      Creates a new hash code equals plugin where fields are assumed nullable by default.
      Parameters:
      annotationType - Defines the binary name of a runtime-visible annotation type that should be added to the parameter of the Object.equals(Object) method, or null if no such name should be defined.
  • Method Details