Class HashCodeAndEqualsPlugin

    • Constructor Detail

      • HashCodeAndEqualsPlugin

        public HashCodeAndEqualsPlugin()
    • Method Detail

      • matches

        public boolean matches​(TypeDescription target)
        Description copied from interface: ElementMatcher
        Matches a target against this element matcher.
        Specified by:
        matches in interface ElementMatcher<TypeDescription>
        Parameters:
        target - The instance to be matched.
        Returns:
        true if the given element is matched by this matcher or false otherwise.
      • apply

        public DynamicType.Builder<?> apply​(DynamicType.Builder<?> builder,
                                            TypeDescription typeDescription)
        Description copied from interface: Plugin
        Applies this plugin.
        Specified by:
        apply in interface Plugin
        Parameters:
        builder - The builder to use as a basis for the applied transformation.
        typeDescription - The type being transformed.
        Returns:
        The supplied builder with additional transformations registered.
      • nonNullable

        protected ElementMatcher<FieldDescription> nonNullable​(ElementMatcher<FieldDescription> matcher)
        Resolves the matcher to identify non-nullable fields.
        Parameters:
        matcher - The matcher that identifies fields that are either nullable or non-nullable.
        Returns:
        The actual matcher to identify non-nullable fields.