Package net.bytebuddy.build
Class HashCodeAndEqualsPlugin.WithNonNullableFields
- java.lang.Object
-
- net.bytebuddy.build.HashCodeAndEqualsPlugin
-
- net.bytebuddy.build.HashCodeAndEqualsPlugin.WithNonNullableFields
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Plugin
,Plugin.Factory
,ElementMatcher<TypeDescription>
- Enclosing class:
- HashCodeAndEqualsPlugin
@Enhance public static class HashCodeAndEqualsPlugin.WithNonNullableFields extends HashCodeAndEqualsPlugin
A version of theHashCodeAndEqualsPlugin
that assumes that all fields are non-nullable unless they are explicitly marked.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.bytebuddy.build.HashCodeAndEqualsPlugin
HashCodeAndEqualsPlugin.AnnotationOrderComparator, HashCodeAndEqualsPlugin.Enhance, HashCodeAndEqualsPlugin.Sorted, HashCodeAndEqualsPlugin.ValueHandling, HashCodeAndEqualsPlugin.ValueMatcher, HashCodeAndEqualsPlugin.WithNonNullableFields
-
Nested classes/interfaces inherited from interface net.bytebuddy.matcher.ElementMatcher
ElementMatcher.Junction<S>
-
Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin
Plugin.Engine, Plugin.Factory, Plugin.ForElementMatcher, Plugin.NoOp, Plugin.WithPreprocessor
-
Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Factory
Plugin.Factory.Simple, Plugin.Factory.UsingReflection
-
-
Constructor Summary
Constructors Constructor Description WithNonNullableFields()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ElementMatcher<FieldDescription>
nonNullable(ElementMatcher<FieldDescription> matcher)
Resolves the matcher to identify non-nullable fields.-
Methods inherited from class net.bytebuddy.build.HashCodeAndEqualsPlugin
apply, close, make, matches
-
-
-
-
Method Detail
-
nonNullable
protected ElementMatcher<FieldDescription> nonNullable(ElementMatcher<FieldDescription> matcher)
Resolves the matcher to identify non-nullable fields.- Overrides:
nonNullable
in classHashCodeAndEqualsPlugin
- Parameters:
matcher
- The matcher that identifies fields that are either nullable or non-nullable.- Returns:
- The actual matcher to identify non-nullable fields.
-
-