Class MethodOverrideMatcher<T extends MethodDescription>

    • Constructor Detail

      • MethodOverrideMatcher

        public MethodOverrideMatcher​(ElementMatcher<? super TypeDescription.Generic> matcher)
        Creates a new method override matcher.
        Parameters:
        matcher - The matcher that is to be applied to the type that declares a method of the same shape.
    • Method Detail

      • matches

        public boolean matches​(T target)
        Matches a target against this element matcher.
        Parameters:
        target - The instance to be matched.
        Returns:
        true if the given element is matched by this matcher or false otherwise.
      • matches

        private boolean matches​(MethodDescription target,
                                java.util.List<? extends TypeDefinition> typeDefinitions,
                                java.util.Set<TypeDescription> duplicates)
        Matches a method against a list of types.
        Parameters:
        target - The method that is matched as a target.
        typeDefinitions - The type definitions to check if they declare a method with the same signature as target.
        duplicates - A set containing duplicate interfaces that do not need to be revisited.
        Returns:
        true if any type defines a method with the same signature as the target method.
      • matches

        private boolean matches​(MethodDescription target,
                                TypeDefinition typeDefinition)
        Checks if a type declares a method with the same signature as target.
        Parameters:
        target - The method to be checked.
        typeDefinition - The type to check for declaring a method with the same signature as target.
        Returns:
        true if the supplied type declares a compatible method.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object