Package oracle.dbtools.plugin.api.di
Class Instances
java.lang.Object
oracle.dbtools.plugin.api.di.Instances
- All Implemented Interfaces:
InstanceLocator
Locates concrete instances of types
- Since:
- 19.3.0
- Author:
- cdivilly
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuildInstancesinstancesstatic classRepresents an individual instance of a qualified service -
Field Summary
Fields inherited from interface oracle.dbtools.plugin.api.di.InstanceLocator
INSTANCE_LOCATOR_ATTRIBUTE, INSTANTIATOR_TYPE_SUFFIX -
Method Summary
Modifier and TypeMethodDescriptionstatic Instances.Builderbuilder()Produce a newInstances.BuilderinstanceSet<Map.Entry<TypeQualifier<?>,InstanceProvider<?>>> entries()Enumerate each of the instances in this setbooleanisEmpty()Indicate if this set of instances is emptymodify()Produce aInstances.Builderinstance initialized with the state of this instance<T> List<Instances.QualifiedInstance<T>>qualifiedInstances(Class<T> type) ProvideInstances.QualifiedInstancefor each instance of the specified type<T> InstanceProvider<T>select(TypeQualifier<T> service) Select all services matching the specifiedTypeQualifiertoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface oracle.dbtools.plugin.api.di.InstanceLocator
select, select
-
Method Details
-
entries
Enumerate each of the instances in this set- Returns:
SetofMap.Entryelements, whose key is aTypeQualifierand it's value is anInstanceProvider
-
isEmpty
public boolean isEmpty()Indicate if this set of instances is empty- Returns:
- true if there are no instances in this set, false otherwise
-
modify
Produce aInstances.Builderinstance initialized with the state of this instance- Returns:
Instances.Builderinstance
-
qualifiedInstances
ProvideInstances.QualifiedInstancefor each instance of the specified type- Type Parameters:
T- The type of the instances to retrieve- Parameters:
type- the type of the instances to retrieve- Returns:
ListofInstances.QualifiedInstancematches
-
select
Description copied from interface:InstanceLocatorSelect all services matching the specifiedTypeQualifier- Specified by:
selectin interfaceInstanceLocator- Type Parameters:
T- The type of the service to locate- Parameters:
service- The qualifier that constrains which implementation to match- Returns:
InstanceProviderfor the specified type and qualifier. This value is never null.
-
toString
-
builder
Produce a newInstances.Builderinstance- Returns:
Instances.Builderinstance
-