Interface DependencyFilter


public interface DependencyFilter
A filter which can be used to reject dependency candidates.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final DependencyFilter
     
    static final DependencyFilter
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Create a new filter which returns true when both this filter and the given filter return true.
    Create a new filter which returns true when either this filter or the given filter return true.
    boolean
    test(Class<?> concreteType, String name, int priority)
    Test to see whether the dependency is acceptable.
  • Field Details

  • Method Details

    • test

      boolean test(Class<?> concreteType, String name, int priority)
      Test to see whether the dependency is acceptable.
      Parameters:
      concreteType - the type of the bean which is to be instantiated (not null)
      name - the name of the bean (maybe empty, not null)
      priority - the priority of the bean (higher has precedent)
      Returns:
      true to accept the dependency, or false to reject it
    • and

      default DependencyFilter and(DependencyFilter other)
      Create a new filter which returns true when both this filter and the given filter return true.
      Parameters:
      other - the other filter (must not be null)
      Returns:
      the combined filter (not null)
    • or

      default DependencyFilter or(DependencyFilter other)
      Create a new filter which returns true when either this filter or the given filter return true.
      Parameters:
      other - the other filter (must not be null)
      Returns:
      the combined filter (not null)