org.apache.felix.ipojo.parser
Class PojoMetadata

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

public class PojoMetadata
extends 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
PojoMetadata(Element metadata)
          Creates Pojo metadata.
 
Method Summary
 FieldMetadata getField(String name)
          Gets the field metadata for the given name.
 FieldMetadata getField(String name, String type)
          Gets the field metadata for the given name and type.
 FieldMetadata[] getFields()
           
 String[] getInterfaces()
           
 MethodMetadata getMethod(String name)
          Gets the MethodMetadata corresponding to the method (contained in the implementation class) with the given name.
 MethodMetadata getMethod(String name, String[] types)
          Gets the MethodMetadata corresponding to the method (contained in the implementation class) to given name and argument types.
 MethodMetadata[] getMethods()
           
 MethodMetadata[] getMethods(String name)
          Gets the MethodMetadata list corresponding to the method (contained in the implementation class) to given name.
 String getSuperClass()
           
 boolean isInterfaceImplemented(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(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 String[] getInterfaces()

getField

public FieldMetadata getField(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(String name,
                              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(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(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(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

getMethod

public MethodMetadata getMethod(String name,
                                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

getSuperClass

public String getSuperClass()


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.