org.apache.felix.ipojo.parser

## Class PojoMetadata

- java.lang.Object
- - org.apache.felix.ipojo.parser.PojoMetadata

    public class PojoMetadata
    extends java.lang.Object

Manipulation Metadata allows getting information about the implementation class without using reflection such as implemented interfaces, super class, methods and fields. This method allows getting object to register `FieldInterceptor` and `MethodInterceptor`.

Author:
  Felix Project Team

### Constructor Summary

Constructors
Constructor and Description
`PojoMetadata(org.apache.felix.ipojo.metadata.Element metadata)` Creates Pojo metadata.

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `getClassName()`
`MethodMetadata` `getConstructor(java.lang.String[] types)` Gets the constructor corresponding to the given argument types.
`MethodMetadata[]` `getConstructors()` Gets the MethodMetadata list corresponding to the constructors (contained in the implementation class).
`FieldMetadata` `getField(java.lang.String name)` Gets the field metadata for the given name.
`FieldMetadata` `getField(java.lang.String name, java.lang.String type)` Gets the field metadata for the given name and type.
`FieldMetadata[]` `getFields()`
`java.lang.String[]` `getInnerClasses()` Gets the inner classes from the manipulated class
`java.lang.String[]` `getInterfaces()`
`MethodMetadata` `getMethod(java.lang.String name)` Gets the MethodMetadata corresponding to the method (contained in the implementation class) with the given name.
`MethodMetadata` `getMethod(java.lang.String name, java.lang.String[] types)` Gets the MethodMetadata corresponding to the method (contained in the implementation class) to given name and argument types.
`MethodMetadata[]` `getMethods()`
`MethodMetadata[]` `getMethods(java.lang.String name)` Gets the MethodMetadata list corresponding to the method (contained in the implementation class) to given name.
`MethodMetadata[]` `getMethodsFromInnerClass(java.lang.String inner)` Gets the methods from the given inner class.
`java.lang.String` `getSuperClass()`
`boolean` `isInterfaceImplemented(java.lang.String itf)` Checks if the given interface name is implemented.

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

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

### Constructor Detail

#### PojoMetadata

    public PojoMetadata(org.apache.felix.ipojo.metadata.Element metadata)
                 throws ConfigurationException

Creates Pojo metadata. Manipulation Metadata object are created from component type metadata by parsing manipulation metadata.

Parameters:
  `metadata` - the component type metadata
Throws:
  `ConfigurationException` - if the manipulation metadata cannot be found

### Method Detail

#### getMethods

    public MethodMetadata[] getMethods()

#### getFields

    public FieldMetadata[] getFields()

#### getInterfaces

    public java.lang.String[] getInterfaces()

#### getClassName

    public java.lang.String getClassName()

#### getInnerClasses

    public java.lang.String[] getInnerClasses()

Gets the inner classes from the manipulated class

Returns:
  the list of the inner class names.

#### getMethodsFromInnerClass

    public MethodMetadata[] getMethodsFromInnerClass(java.lang.String inner)

Gets the methods from the given inner class.

Parameters:
  `inner` - the inner class name
Returns:
  the list of method, empty if none.

#### getField

    public FieldMetadata getField(java.lang.String name)

Gets the field metadata for the given name.

Parameters:
  `name` - : the name of the field
Returns:
  the corresponding field metadata or `null` if not found

#### getField

    public FieldMetadata getField(java.lang.String name,
                                  java.lang.String type)

Gets the field metadata for the given name and type.

Parameters:
  `name` - : the name of the field
  `type` - : the type of the field
Returns:
  the corresponding field metadata or `null` if not found

#### isInterfaceImplemented

    public boolean isInterfaceImplemented(java.lang.String itf)

Checks if the given interface name is implemented. This methods checks on interface directly implemented by the implementation class.

Parameters:
  `itf` - the interface to check.
Returns:
  `true` if the implementation class implements the given interface.

#### getMethod

    public MethodMetadata getMethod(java.lang.String name)

Gets the MethodMetadata corresponding to the method (contained in the implementation class) with the given name. If several methods match, the first one is returned.

Parameters:
  `name` - the name of the method to find.
Returns:
  the method metadata object or `null` if not found

#### getMethods

    public MethodMetadata[] getMethods(java.lang.String name)

Gets the MethodMetadata list corresponding to the method (contained in the implementation class) to given name. All methods contained in the implementation class matching with the name are in the returned list.

Parameters:
  `name` - the name of the method to look for.
Returns:
  the Method Metadata array or an empty array if not found

#### getConstructors

    public MethodMetadata[] getConstructors()

Gets the MethodMetadata list corresponding to the constructors (contained in the implementation class).

Returns:
  the Method Metadata array or an empty array if not found

#### getMethod

    public MethodMetadata getMethod(java.lang.String name,
                                    java.lang.String[] types)

Gets the MethodMetadata corresponding to the method (contained in the implementation class) to given name and argument types.

Parameters:
  `name` - the name of the method to look for.
  `types` - the array of the argument types of the method
Returns:
  the Method Metadata or `null` if not found

#### getConstructor

    public MethodMetadata getConstructor(java.lang.String[] types)

Gets the constructor corresponding to the given argument types.

Parameters:
  `types` - the argument types
Returns:
  the matching constructor or `null` if not found.

#### getSuperClass

    public java.lang.String getSuperClass()