Class ItemRegistry<T>
java.lang.Object
org.eclipse.emf.compare.rcp.internal.extension.impl.ItemRegistry<T>
- Type Parameters:
T- one of the item class
- All Implemented Interfaces:
IItemRegistry<T>
Registry holding
IItemDescriptor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(IItemDescriptor<T> itemDescriptor) Add an item descriptor to the registry.voidclear()Clear the registry.Get the descriptor with the highest ranking in the registry.getItemDescriptor(String qualifiedClassName) Return the item descriptor.Get a list of allIItemDescriptorfrom the registry.Remove anIItemDescriptorusing its key.intsize()Get the size of the registry.
-
Constructor Details
-
ItemRegistry
public ItemRegistry()
-
-
Method Details
-
getHighestRankingDescriptor
Get the descriptor with the highest ranking in the registry.- Specified by:
getHighestRankingDescriptorin interfaceIItemRegistry<T>- Returns:
IItemDescriptorornullif none
-
getItemDescriptors
Get a list of allIItemDescriptorfrom the registry.- Specified by:
getItemDescriptorsin interfaceIItemRegistry<T>- Returns:
- List of
IItemDescriptor
-
add
Add an item descriptor to the registry.- Specified by:
addin interfaceIItemRegistry<T>- Parameters:
itemDescriptor- The descriptor to add- Returns:
- The previous
IItemDescriptorif any.
-
remove
Remove anIItemDescriptorusing its key.- Specified by:
removein interfaceIItemRegistry<T>- Parameters:
className- Unique identifier of theIItemDescriptor- Returns:
- true if an
IItemDescriptorhas been removed
-
clear
public void clear()Clear the registry.- Specified by:
clearin interfaceIItemRegistry<T>
-
size
public int size()Get the size of the registry.- Specified by:
sizein interfaceIItemRegistry<T>- Returns:
- the size of the registry
-
getItemDescriptor
Return the item descriptor.- Specified by:
getItemDescriptorin interfaceIItemRegistry<T>- Parameters:
qualifiedClassName- Id of the descriptor.- Returns:
- Engine descriptor
-