org.apache.felix.ipojo.manipulator.util

## Class Metadatas

- java.lang.Object
- - org.apache.felix.ipojo.manipulator.util.Metadatas

    public class Metadatas
    extends Object

`Streams` is a utility class that helps to manipulate streams.

Author:
  Felix Project Team

### Method Summary

All Methods Static Methods Concrete Methods
`static Set<String>` `findAttributes(org.apache.felix.ipojo.metadata.Element metadata, String attributeName)` Find all the values of the specified attribute in the given element.
`static void` `findFields(List<String> fields, org.apache.felix.ipojo.metadata.Element metadata)` Looks for 'field' attribute in the given metadata.
`static Set<String>` `findReferredPackages(org.apache.felix.ipojo.metadata.Element metadata)` Get packages referenced by component.
`static String` `getComponentType(org.apache.felix.ipojo.metadata.Element meta)` Return the classname attribute value.

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

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

### Method Detail

#### getComponentType

    public static String getComponentType(org.apache.felix.ipojo.metadata.Element meta)

Return the classname attribute value.

Parameters:
  `meta` - metadata to be explored
Returns:
  the classname attribute value or null if the attribute does not exists.

#### findFields

    public static void findFields(List<String> fields,
                                  org.apache.felix.ipojo.metadata.Element metadata)

Looks for 'field' attribute in the given metadata.

Parameters:
  `fields` - discovered fields (accumulator)
  `metadata` - metadata to inspect

#### findReferredPackages

    public static Set<String> findReferredPackages(org.apache.felix.ipojo.metadata.Element metadata)

Get packages referenced by component.

Parameters:
  `metadata` - Element base for the search
Returns:
  the Set of referenced packages.

#### findAttributes

    public static Set<String> findAttributes(org.apache.felix.ipojo.metadata.Element metadata,
                                             String attributeName)

Find all the values of the specified attribute in the given element.

Parameters:
  `metadata` - Element to be traversed
  `attributeName` - Search attribute name
Returns:
  Set of attribute values (no duplicate).