Interface WeightProvider.Descriptor.Registry
-
- All Known Implementing Classes:
WeightProviderDescriptorRegistryImpl
- Enclosing interface:
- WeightProvider.Descriptor
public static interface WeightProvider.Descriptor.Registry
Registry of weight provider descriptors.- Since:
- 3.1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Removes all extensions from this registry.Collection<WeightProvider.Descriptor>
getDescriptors()
This will return a copy of the registered weight providers list.WeightProvider
getHighestRankingWeightProvider(EPackage ePackage)
Retrieve the highest ranking weight provider from a givenePackage
.Collection<WeightProvider>
getWeightProviders(EPackage ePackage)
Retrieve the weight providers from a givenePackage
.WeightProvider.Descriptor
put(String key, WeightProvider.Descriptor descriptor)
Adds a weight provider to the registry.WeightProvider.Descriptor
remove(String key)
Removes a weight provider from this registry.
-
-
-
Method Detail
-
put
WeightProvider.Descriptor put(String key, WeightProvider.Descriptor descriptor)
Adds a weight provider to the registry.- Parameters:
key
- key with which the specified descriptor is to be associateddescriptor
- weight provider that is to be added to this registry.- Returns:
- the previous descriptor associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key, if the implementation supports null values.)
-
clear
void clear()
Removes all extensions from this registry.- Restriction:
- This method is not intended to be referenced by clients.
-
getDescriptors
Collection<WeightProvider.Descriptor> getDescriptors()
This will return a copy of the registered weight providers list.- Returns:
- A copy of the registered weight providers list.
-
remove
WeightProvider.Descriptor remove(String key)
Removes a weight provider from this registry.- Parameters:
key
- key of the weight provider descriptor that is to be removed from the registry.- Returns:
- the previous value associated with key, or null if there was no mapping for key.
-
getHighestRankingWeightProvider
WeightProvider getHighestRankingWeightProvider(EPackage ePackage)
Retrieve the highest ranking weight provider from a givenePackage
.- Parameters:
ePackage
- The given ePackage.- Returns:
- The associated weight provider with the highest ranking.
-
getWeightProviders
Collection<WeightProvider> getWeightProviders(EPackage ePackage)
Retrieve the weight providers from a givenePackage
.- Parameters:
ePackage
- The given ePackage.- Returns:
- The associated weight providers if any.
-
-