Class CommonPlugin.SimpleTargetPlatformRegistryImpl<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
org.eclipse.emf.common.CommonPlugin.SimpleTargetPlatformRegistryImpl<K,V>
Type Parameters:
K - the type of the key.
V - the type of the value.
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>
Enclosing class:
CommonPlugin

public abstract static class CommonPlugin.SimpleTargetPlatformRegistryImpl<K,V> extends HashMap<K,V>
A specialized HashMap map that supports computing information from the target platform, if the PDE is available. It is abstract because the createKey(String) method must be specialized to convert each attribute's string value to a value of the map's key type.
Since:
2.14
See Also:
  • Constructor Details

    • SimpleTargetPlatformRegistryImpl

      public SimpleTargetPlatformRegistryImpl()
      Creates an instance.
  • Method Details

    • getTargetPlatformValues

      protected Set<K> getTargetPlatformValues(String extensionPoint, String attributeName)
      Returns the set of values computed by fetching all the given extension points and looking up the given attribute name in each element of that extension point. Each attribute value is converted to a value of the map's key type.
      Parameters:
      extensionPoint - the qualified extension point name.
      attributeName - the attribute name to query.
      Returns:
      the values computed from the target platform, if the Plug-in Development Environment is available, or a copy of the HashMap.keySet() otherwise.
      See Also:
    • createKey

      protected abstract K createKey(String attribute)
      Returns the attribute value converted to a value of the key type.
      Parameters:
      attribute - the attribute value.
      Returns:
      the attribute value converted to a value of the key type.