Class Model
java.lang.Object
org.microbean.bean.model.Model
An immutable model of a system's dependency resolutions.
- Author:
- Laird Nelson
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA representation of the attempted resolution of a dependency, represented by anAnnotated<? extends AnnotatedConstruct>, to aListofBeans that match it. -
Method Summary
Modifier and TypeMethodDescriptionfinal Set<Model.DependencyResolution> Returns a non-null, immutable, determinateSetof allModel.DependencyResolutions managed by thisModelthat are ambiguous.final booleanfinal inthashCode()static Modelof(Selectable<? super Annotated<? extends AnnotatedConstruct>, ? extends Bean<?>> s) final BiFunction<? super Annotated<? extends AnnotatedConstruct>, Function<? super Annotated<? extends AnnotatedConstruct>, ? extends List<Bean<?>>>, ? extends List<Bean<?>>> Returns a non-nullBiFunctionthat represents a compute-if-absent operation on an internal, unbounded, thread-safe cache.final Set<Model.DependencyResolution> Returns a non-null, immutable, determinateSetof allModel.DependencyResolutions managed by thisModelthat are unsatisfied.final booleanvalid()Returnstrueif and only if thisModelis valid.
-
Method Details
-
equals
-
hashCode
-
valid
-
ambiguousDependencyResolutions
Returns a non-null, immutable, determinateSetof allModel.DependencyResolutions managed by thisModelthat are ambiguous.- Returns:
- a non-
null, immutable, determinateSetof allModel.DependencyResolutions managed by thisModelthat are ambiguous - See Also:
-
unsatisfiedDependencyResolutions
Returns a non-null, immutable, determinateSetof allModel.DependencyResolutions managed by thisModelthat are unsatisfied.- Returns:
- a non-
null, immutable, determinateSetof allModel.DependencyResolutions managed by thisModelthat are unsatisfied - See Also:
-
toSelectionCache
public final BiFunction<? super Annotated<? extends AnnotatedConstruct>, Function<? super Annotated<? extends AnnotatedConstruct>, ? extends List<Bean<?>>>, ? extends List<Bean<?>>> toSelectionCache()Returns a non-nullBiFunctionthat represents a compute-if-absent operation on an internal, unbounded, thread-safe cache.The return value is suitable for passing to the
Selectables.caching(Selectable, BiFunction)method.- Returns:
- a non-
nullBiFunctionthat represents a compute-if-absent operation on an internal, unbounded, thread-safe cache - Throws:
IllegalStateException- if thisModelis not valid- See Also:
-
of
public static Model of(Selectable<? super Annotated<? extends AnnotatedConstruct>, ? extends Bean<?>> s) - Parameters:
s- a non-nullSelectable- Returns:
- a non-
nullModelbuilt from the suppliedSelectable - Throws:
NullPointerException- ifsisnull- See Also:
-