org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.util

## Class Elements

- java.lang.Object
- - org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.util.Elements

    public class Elements
    extends Object

Author:
  Felix Project Team

### Constructor Summary

Constructors
Constructor and Description
`Elements()`

### Method Summary

All Methods Static Methods Concrete Methods
`static org.apache.felix.ipojo.metadata.Element` `buildElement(String binding)` Build an `Element` using the provided binding information.
`static org.apache.felix.ipojo.metadata.Element` `buildElement(String namespace, String name)` Build an `Element` using the provided namespace and local name.
`static org.apache.felix.ipojo.metadata.Element` `buildElement(org.objectweb.asm.Type type)` Build the `Element` object from the given descriptor.
`static org.apache.felix.ipojo.metadata.Element` `getPropertiesElement(ComponentWorkbench workbench)` Return the Element named properties, creates one if missing.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Elements

    public Elements()

### Method Detail

#### buildElement

    public static org.apache.felix.ipojo.metadata.Element buildElement(org.objectweb.asm.Type type)

Build the `Element` object from the given descriptor. It splits the annotation's classname in 2 parts (up to the last '.') first part (package's name) becomes the Element's namespace, and second part (class simple name) becomes the Element's name.

Parameters:
  `type` - annotation descriptor
Returns:
  the new element

#### buildElement

    public static org.apache.felix.ipojo.metadata.Element buildElement(String namespace,
                                                                       String name)

Build an `Element` using the provided namespace and local name.

#### buildElement

    public static org.apache.felix.ipojo.metadata.Element buildElement(String binding)

Build an `Element` using the provided binding information. Expected format is [namespace:]name (eg: com.acme:foo or foo if namespace by default -org.apache.felix.ipojo- has to be used). Notice that the ':' character usage in namespace or name part may lead to unexpected results. In that case, the @HandlerBinding(namespace = "urn:my:namespace", value = "foo:handler") usage is preferred.

Parameters:
  `binding` - the condensed element name
Returns:
  the new element

#### getPropertiesElement

    public static org.apache.felix.ipojo.metadata.Element getPropertiesElement(ComponentWorkbench workbench)

Return the Element named properties, creates one if missing.

Parameters:
  `workbench` - source for search
Returns:
  the properties Element (never null).