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
-
Method Summary
Modifier and TypeMethodDescriptionadd
(IItemDescriptor<T> itemDescriptor) Add an item descriptor to the registry.void
clear()
Clear the registry.Get the descriptor with the highest ranking in the registry.getItemDescriptor
(String qualifiedClassName) Return the item descriptor.Get a list of allIItemDescriptor
from the registry.Remove anIItemDescriptor
using its key.int
size()
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:
getHighestRankingDescriptor
in interfaceIItemRegistry<T>
- Returns:
IItemDescriptor
ornull
if none
-
getItemDescriptors
Get a list of allIItemDescriptor
from the registry.- Specified by:
getItemDescriptors
in interfaceIItemRegistry<T>
- Returns:
- List of
IItemDescriptor
-
add
Add an item descriptor to the registry.- Specified by:
add
in interfaceIItemRegistry<T>
- Parameters:
itemDescriptor
- The descriptor to add- Returns:
- The previous
IItemDescriptor
if any.
-
remove
Remove anIItemDescriptor
using its key.- Specified by:
remove
in interfaceIItemRegistry<T>
- Parameters:
className
- Unique identifier of theIItemDescriptor
- Returns:
- true if an
IItemDescriptor
has been removed
-
clear
public void clear()Clear the registry.- Specified by:
clear
in interfaceIItemRegistry<T>
-
size
public int size()Get the size of the registry.- Specified by:
size
in interfaceIItemRegistry<T>
- Returns:
- the size of the registry
-
getItemDescriptor
Return the item descriptor.- Specified by:
getItemDescriptor
in interfaceIItemRegistry<T>
- Parameters:
qualifiedClassName
- Id of the descriptor.- Returns:
- Engine descriptor
-