Package io.smallrye.beanbag
Interface DependencyFilter
-
public interface DependencyFilterA filter which can be used to reject dependency candidates.
-
-
Field Summary
Fields Modifier and Type Field Description static DependencyFilterACCEPTstatic DependencyFilterREJECT
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default DependencyFilterand(DependencyFilter other)Create a new filter which returnstruewhen both this filter and the given filter returntrue.default DependencyFilteror(DependencyFilter other)Create a new filter which returnstruewhen either this filter or the given filter returntrue.booleantest(Class<?> concreteType, String name, int priority)Test to see whether the dependency is acceptable.
-
-
-
Field Detail
-
ACCEPT
static final DependencyFilter ACCEPT
-
REJECT
static final DependencyFilter REJECT
-
-
Method Detail
-
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 (notnull)name- the name of the bean (maybe empty, notnull)priority- the priority of the bean (higher has precedent)- Returns:
trueto accept the dependency, orfalseto reject it
-
and
default DependencyFilter and(DependencyFilter other)
Create a new filter which returnstruewhen both this filter and the given filter returntrue.- Parameters:
other- the other filter (must not benull)- Returns:
- the combined filter (not
null)
-
or
default DependencyFilter or(DependencyFilter other)
Create a new filter which returnstruewhen either this filter or the given filter returntrue.- Parameters:
other- the other filter (must not benull)- Returns:
- the combined filter (not
null)
-
-