org.eclipse.cdt.managedbuilder.internal.core
Class DefaultManagedConfigElement

java.lang.Object
  extended by org.eclipse.cdt.managedbuilder.internal.core.DefaultManagedConfigElement
All Implemented Interfaces:
IManagedConfigElement

public class DefaultManagedConfigElement
extends java.lang.Object
implements IManagedConfigElement

Implements the ManagedConfigElement by delegate all calls to an IConfigurationElement instance. This is used to load configuration information from the extension point.


Constructor Summary
DefaultManagedConfigElement(org.eclipse.core.runtime.IConfigurationElement element, org.eclipse.core.runtime.IExtension extension)
           
 
Method Summary
static IManagedConfigElement[] convertArray(org.eclipse.core.runtime.IConfigurationElement[] elements, org.eclipse.core.runtime.IExtension extension)
          Convenience method for converting an array of IConfigurationElements into an array of IManagedConfigElements.
 java.lang.String getAttribute(java.lang.String name)
           
 IManagedConfigElement[] getChildren()
           
 IManagedConfigElement[] getChildren(java.lang.String elementName)
           
 org.eclipse.core.runtime.IConfigurationElement getConfigurationElement()
           
 org.eclipse.core.runtime.IExtension getExtension()
           
 java.lang.String getName()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultManagedConfigElement

public DefaultManagedConfigElement(org.eclipse.core.runtime.IConfigurationElement element,
                                   org.eclipse.core.runtime.IExtension extension)
Parameters:
element -
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface IManagedConfigElement
Returns:
the name of this config element (i.e. tag name of the corresponding xml element)

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Specified by:
getAttribute in interface IManagedConfigElement
Returns:
the value of the attribute with the given name, or null if the attribute is unset.

getChildren

public IManagedConfigElement[] getChildren()
Specified by:
getChildren in interface IManagedConfigElement
Returns:
all child elements of the current config element.

getChildren

public IManagedConfigElement[] getChildren(java.lang.String elementName)
Specified by:
getChildren in interface IManagedConfigElement
Returns:
all child elements of the current config element, such that child.getName().equals(elementName).

getExtension

public org.eclipse.core.runtime.IExtension getExtension()

getConfigurationElement

public org.eclipse.core.runtime.IConfigurationElement getConfigurationElement()
Returns:

convertArray

public static IManagedConfigElement[] convertArray(org.eclipse.core.runtime.IConfigurationElement[] elements,
                                                   org.eclipse.core.runtime.IExtension extension)
Convenience method for converting an array of IConfigurationElements into an array of IManagedConfigElements.