org.apache.felix.ipojo.parser

## Class MethodMetadata

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

    public class MethodMetadata
    extends java.lang.Object

A Method Metadata represents a method from the implementation class. This class allows getting information about a method : name, arguments, return type...

Author:
  Felix Project Team

### Field Summary

Fields
`static java.lang.String` `BC_CONSTRUCTOR_ID` Bundle Context Constructor Method Id.
`static java.lang.String` `CONSTRUCTOR_PREFIX` Constructor Prefix.
`static java.lang.String` `EMPTY_CONSTRUCTOR_ID` Empty Constructor Method Id.

### Constructor Summary

Constructors
Constructor and Description
`MethodMetadata(org.apache.felix.ipojo.metadata.Element metadata)` Creates a Method Metadata.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static java.lang.String` `computeMethodId(java.lang.reflect.Constructor method)` Computes the method id for the given Constructor object.
`static java.lang.String` `computeMethodId(java.lang.reflect.Method method)` Computes the method id for the given Method object.
`java.util.Map<java.lang.String,java.lang.String>` `getArguments()` Gets the method arguments.
`java.lang.String[]` `getMethodArgumentNames()`
`java.lang.String[]` `getMethodArguments()`
`java.lang.String` `getMethodIdentifier()` Gets the method unique identifier.
`java.lang.String` `getMethodName()`
`java.lang.String` `getMethodReturn()`

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

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

### Field Detail

#### EMPTY_CONSTRUCTOR_ID

    public static final java.lang.String EMPTY_CONSTRUCTOR_ID

Empty Constructor Method Id.

See Also:
  Constant Field Values

#### BC_CONSTRUCTOR_ID

    public static final java.lang.String BC_CONSTRUCTOR_ID

Bundle Context Constructor Method Id.

See Also:
  Constant Field Values

#### CONSTRUCTOR_PREFIX

    public static final java.lang.String CONSTRUCTOR_PREFIX

Constructor Prefix.

See Also:
  Constant Field Values

### Constructor Detail

#### MethodMetadata

    public MethodMetadata(org.apache.felix.ipojo.metadata.Element metadata)

Creates a Method Metadata.

Parameters:
  `metadata` - the method manipulation element.

### Method Detail

#### getMethodName

    public java.lang.String getMethodName()

#### getMethodArguments

    public java.lang.String[] getMethodArguments()

#### getMethodArgumentNames

    public java.lang.String[] getMethodArgumentNames()

#### getArguments

    public java.util.Map<java.lang.String,java.lang.String> getArguments()

Gets the method arguments. The keys are the argument names, while the values are the argument type.

Returns:
  the map of argument
Since:
  1.10.2

#### getMethodReturn

    public java.lang.String getMethodReturn()

#### getMethodIdentifier

    public java.lang.String getMethodIdentifier()

Gets the method unique identifier. For internal usage only. A method identifier is a unique string that can be a java field that identify the method.

Returns:
  the method identifier.

#### computeMethodId

    public static java.lang.String computeMethodId(java.lang.reflect.Method method)

Computes the method id for the given Method object.

Parameters:
  `method` - the Method object.
Returns:
  the method id.

#### computeMethodId

    public static java.lang.String computeMethodId(java.lang.reflect.Constructor method)

Computes the method id for the given Constructor object.

Parameters:
  `method` - the Method object.
Returns:
  the method id.