org.apache.felix.ipojo.parser
Class PojoMetadata

java.lang.Object
  extended by org.apache.felix.ipojo.parser.PojoMetadata

public class PojoMetadata
extends java.lang.Object

Manipulation Metadata allows getting information about the implementation class without doing reflection.

Author:
Felix Project Team

Constructor Summary
PojoMetadata(org.apache.felix.ipojo.metadata.Element metadata)
          Constructor.
 
Method Summary
 FieldMetadata getField(java.lang.String name)
          Get the field metadata for the given name.
 FieldMetadata getField(java.lang.String name, java.lang.String type)
          Get the field metadata for the given name and type.
 FieldMetadata[] getFields()
           
 java.lang.String[] getInterfaces()
           
 MethodMetadata getMethod(java.lang.String name)
          Get the MethodMetadata corresponding to the method (contained in the implementation class) to given name.
 MethodMetadata getMethod(java.lang.String name, java.lang.String[] types)
          Get 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)
          Get the MethodMetadata list corresponding to the method (contained in the implementation class) to given name.
 java.lang.String getSuperClass()
           
 boolean isInterfaceImplemented(java.lang.String itf)
          Check 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)
Constructor. Manipulation Metadata object are created from component type metadata by parsing manipulation metadata.

Parameters:
metadata - : component type metadata
Method Detail

getMethods

public MethodMetadata[] getMethods()

getFields

public FieldMetadata[] getFields()

getInterfaces

public java.lang.String[] getInterfaces()

getField

public FieldMetadata getField(java.lang.String name)
Get the field metadata for the given name.

Parameters:
name - : 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)
Get the field metadata for the given name and type.

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

isInterfaceImplemented

public boolean isInterfaceImplemented(java.lang.String itf)
Check if the given interface name is implemented.

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

getMethod

public MethodMetadata getMethod(java.lang.String name)
Get the MethodMetadata corresponding to the method (contained in the implementation class) to given name. If several method match, the first one is returned.

Parameters:
name - : name of the method to look for.
Returns:
the Method Metadate or null if not found

getMethods

public MethodMetadata[] getMethods(java.lang.String name)
Get 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 - : name of the method to look for.
Returns:
the Method Metadata array or an empty array if not found

getMethod

public MethodMetadata getMethod(java.lang.String name,
                                java.lang.String[] types)
Get the MethodMetadata corresponding to the method (contained in the implementation class) to given name and argument types.

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

getSuperClass

public java.lang.String getSuperClass()