/** * Creates a matcher that matches any of the given methods as {@link MethodDescription}s * by the {@link java.lang.Object#equals(Object)} method. None of the values must be {@code null}. * * @param value The input values to be compared against. * @param <T> The type of the matched object. * @return A matcher that checks for the equality with any of the given objects. */ public static <T extends MethodDescription> ElementMatcher.Junction<T> anyOf(Method... value) { return definedMethod(anyOf(new MethodList.ForLoadedMethods(new Constructor<?>[0], value))); }
/** * Creates a matcher that matches any of the given constructors as {@link MethodDescription}s * by the {@link java.lang.Object#equals(Object)} method. None of the values must be {@code null}. * * @param value The input values to be compared against. * @param <T> The type of the matched object. * @return A matcher that checks for the equality with any of the given objects. */ public static <T extends MethodDescription> ElementMatcher.Junction<T> anyOf(Constructor<?>... value) { return definedMethod(anyOf(new MethodList.ForLoadedMethods(value, new Method[0]))); }
/** * Creates a matcher that matches none of the given methods as {@link MethodDescription}s * by the {@link java.lang.Object#equals(Object)} method. None of the values must be {@code null}. * * @param value The input values to be compared against. * @param <T> The type of the matched object. * @return A matcher that checks for the equality with none of the given objects. */ public static <T extends MethodDescription> ElementMatcher.Junction<T> noneOf(Method... value) { return definedMethod(noneOf(new MethodList.ForLoadedMethods(new Constructor<?>[0], value))); }
/** * Creates a matcher that matches none of the given constructors as {@link MethodDescription}s * by the {@link java.lang.Object#equals(Object)} method. None of the values must be {@code null}. * * @param value The input values to be compared against. * @param <T> The type of the matched object. * @return A matcher that checks for the equality with none of the given objects. */ public static <T extends MethodDescription> ElementMatcher.Junction<T> noneOf(Constructor<?>... value) { return definedMethod(noneOf(new MethodList.ForLoadedMethods(value, new Method[0]))); }
/** * {@inheritDoc} */ @CachedReturnPlugin.Enhance("declaredMethods") public MethodList<MethodDescription.InDefinedShape> getDeclaredMethods() { return new MethodList.ForLoadedMethods(type); }