org.apache.ws.jaxme.generator.util

Class Reflect

public class Reflect extends Object

A set of utility methods for using Java reflection.

Author: Jochen Wiedmann

Method Summary
static voidassignBeanValue(Object pBean, String pPropertyName, String pValue)

Assigns the value pValue to the beans pBean property pPropertyName.

static voidassignBeanValue(Object pBean, String pPropertyName, String pValue, ReflectResolver pResolver)

Assigns the value pValue to the beans pBean property pPropertyName.

Method Detail

assignBeanValue

public static void assignBeanValue(Object pBean, String pPropertyName, String pValue)

Assigns the value pValue to the beans pBean property pPropertyName. For example, if the property name is type and the String pValue is 2, calls

   pBean.setType("2");
 
or
   pBean.setType(2);
 
if the respective method exists. Does nothing, if no matching method can be found.

assignBeanValue

public static void assignBeanValue(Object pBean, String pPropertyName, String pValue, ReflectResolver pResolver)

Assigns the value pValue to the beans pBean property pPropertyName. For example, if the property name is type and the String pValue is 2, calls

   pBean.setType("2");
 
or
   pBean.setType(2);
 
if the respective method exists. Does nothing, if no matching method can be found.