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>
public class ItemRegistry<T> extends Object implements IItemRegistry<T>
Registry holdingIItemDescriptor.
-
-
Constructor Summary
Constructors Constructor Description ItemRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IItemDescriptor<T>add(IItemDescriptor<T> itemDescriptor)Add an item descriptor to the registry.voidclear()Clear the registry.IItemDescriptor<T>getHighestRankingDescriptor()Get the descriptor with the highest ranking in the registry.IItemDescriptor<T>getItemDescriptor(String qualifiedClassName)Return the item descriptor.List<IItemDescriptor<T>>getItemDescriptors()Get a list of allIItemDescriptorfrom the registry.IItemDescriptor<T>remove(String className)Remove anIItemDescriptorusing its key.intsize()Get the size of the registry.
-
-
-
Method Detail
-
getHighestRankingDescriptor
public IItemDescriptor<T> getHighestRankingDescriptor()
Get the descriptor with the highest ranking in the registry.- Specified by:
getHighestRankingDescriptorin interfaceIItemRegistry<T>- Returns:
IItemDescriptorornullif none
-
getItemDescriptors
public List<IItemDescriptor<T>> getItemDescriptors()
Get a list of allIItemDescriptorfrom the registry.- Specified by:
getItemDescriptorsin interfaceIItemRegistry<T>- Returns:
- List of
IItemDescriptor
-
add
public IItemDescriptor<T> add(IItemDescriptor<T> itemDescriptor)
Add an item descriptor to the registry.- Specified by:
addin interfaceIItemRegistry<T>- Parameters:
itemDescriptor- The descriptor to add- Returns:
- The previous
IItemDescriptorif any.
-
remove
public IItemDescriptor<T> remove(String className)
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
public IItemDescriptor<T> getItemDescriptor(String qualifiedClassName)
Return the item descriptor.- Specified by:
getItemDescriptorin interfaceIItemRegistry<T>- Parameters:
qualifiedClassName- Id of the descriptor.- Returns:
- Engine descriptor
-
-