public class RegistryManagement
extends java.lang.Object
Constructor and Description |
---|
RegistryManagement() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Boolean |
existsAttribute(org.eclipse.core.runtime.IConfigurationElement element,
java.lang.String attribute)
Method to know if a element of the Eclipse Registry have an attribute defined.
|
static java.lang.Boolean |
existsId(java.lang.String extensionId)
Method to know if exist some elements for an extension point id.
|
static java.lang.String |
getAttribute(org.eclipse.core.runtime.IConfigurationElement element,
java.lang.String attribute)
Method to get the attribute of a Eclipse Registry Element.
|
static org.eclipse.core.runtime.IConfigurationElement[] |
getElementsFor(java.lang.String extensionId)
Generic method to get the Eclipse Registry Elements given a extension id.
|
static java.lang.Object |
getInstance(org.eclipse.core.runtime.IConfigurationElement element,
java.lang.String attributeName)
Method to get a new instance of the attribute.
|
static java.lang.Object |
getInstance(java.lang.String extensionId,
java.lang.String className)
Method to get an instance of a class in an extension point using its class canonical name
|
static <T> T |
getInstanceOf(org.eclipse.core.runtime.IConfigurationElement element,
java.lang.Class<T> clazz)
Method to get the first instance of a class from an element.
|
static <T> T |
getInstanceOf(java.lang.String extensionId,
java.lang.Class<T> clazz)
Method analogous to getInstance(String, String) but now recieves the Class object instead
its canonical name.
|
static java.util.Collection<java.lang.Object> |
getInstances(org.eclipse.core.runtime.IConfigurationElement element)
Method to get all the objects instantiables of an element of Eclipse Regsitry
|
static java.util.Collection<java.lang.Object> |
getInstances(java.lang.String extensionId,
java.lang.String className)
Method to get all the instances of a certain class in an extension point.
|
static <T> java.util.Collection<T> |
getInstancesOf(org.eclipse.core.runtime.IConfigurationElement element,
java.lang.Class<T> clazz)
Method to get all the instances that extend a given class.
|
static <T> java.util.Collection<T> |
getInstancesOf(java.lang.String extensionId,
java.lang.Class<T> clazz)
Method that returns all the objects that are instantiable in an extension point and extend
the class given.
|
static java.util.Collection<java.lang.String> |
getInstanciableElements(org.eclipse.core.runtime.IConfigurationElement element)
Method to get the names of the attributes which are instanciable
|
static <T> java.lang.Boolean |
haveInstancesOf(org.eclipse.core.runtime.IConfigurationElement element,
java.lang.Class<T> clazz)
Method to know if there is any instantiable object of a certain class.
|
static java.lang.Boolean |
isInstanciable(org.eclipse.core.runtime.IConfigurationElement element)
Method to know if an element has any attribute instanciable
|
static java.lang.Boolean |
isIntanciable(org.eclipse.core.runtime.IConfigurationElement element,
java.lang.String attributeName)
Method to know if an attribute of an Eclipse Registry Element is instanciable
|
public static org.eclipse.core.runtime.IConfigurationElement[] getElementsFor(java.lang.String extensionId)
extensionId
- Name of the extension we want to get.public static java.lang.Boolean existsId(java.lang.String extensionId)
extensionId
- Name of the extension we want to check.public static java.lang.String getAttribute(org.eclipse.core.runtime.IConfigurationElement element, java.lang.String attribute)
element
- Eclipse Registry element to searchattribute
- Name of the attribute we want to getpublic static java.lang.Boolean existsAttribute(org.eclipse.core.runtime.IConfigurationElement element, java.lang.String attribute)
element
- Element where we are going to look intoattribute
- Name of the attribute we want to searchpublic static java.util.Collection<java.lang.String> getInstanciableElements(org.eclipse.core.runtime.IConfigurationElement element)
element
- Eclipse Registry Element where we want to get the instanciable elementspublic static java.lang.Boolean isInstanciable(org.eclipse.core.runtime.IConfigurationElement element)
element
- Eclipse Registry Element where we want to checkpublic static java.lang.Boolean isIntanciable(org.eclipse.core.runtime.IConfigurationElement element, java.lang.String attributeName)
element
- Eclipse Registry Element where we want to checkattributeName
- String with the name of the attribute we want to checkpublic static java.lang.Object getInstance(org.eclipse.core.runtime.IConfigurationElement element, java.lang.String attributeName)
element
- The Eclipse Registry Element we want to useattributeName
- String with the name of the attribute we want to instantiate.public static java.util.Collection<java.lang.Object> getInstances(org.eclipse.core.runtime.IConfigurationElement element)
element
- Eclipse Registry Element we want to fully instantiatepublic static <T> T getInstanceOf(org.eclipse.core.runtime.IConfigurationElement element, java.lang.Class<T> clazz)
T
- The class we want to search used as a parameter of this method.element
- Eclipse Registry Element we want to useclazz
- Class we want to instantiate.public static <T> java.lang.Boolean haveInstancesOf(org.eclipse.core.runtime.IConfigurationElement element, java.lang.Class<T> clazz)
T
- The class we want to check used as a parameter of this method.element
- Eclipse Registry Element we want to checkclazz
- Class we want to searchpublic static <T> java.util.Collection<T> getInstancesOf(org.eclipse.core.runtime.IConfigurationElement element, java.lang.Class<T> clazz)
T
- The class we want to instantiate used as a parameter of this method.element
- Eclipse Registry Element we want to useclazz
- Class we want to getpublic static java.lang.Object getInstance(java.lang.String extensionId, java.lang.String className)
extensionId
- Identifier of the extension point where we want to searchclassName
- Canonical name of the class we want to instantiatepublic static java.util.Collection<java.lang.Object> getInstances(java.lang.String extensionId, java.lang.String className)
extensionId
- Identifier of the extension point where we want to searchclassName
- Canonical name of the class we want to instantiatepublic static <T> T getInstanceOf(java.lang.String extensionId, java.lang.Class<T> clazz)
T
- The class we want to instantiate used as a parameter of this method.extensionId
- Identifier of the extension point where we want to searchclazz
- Class we want to findpublic static <T> java.util.Collection<T> getInstancesOf(java.lang.String extensionId, java.lang.Class<T> clazz)
T
- The class we want to instantiate used as a parameter of this method.extensionId
- Identifier of the extension point where we want to searchclazz
- Class we want to find