站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 server API Documentation 英文版文档

ValueObjectHelper (JBoss Server API) - JBoss 3.2.7 server API Documentation 英文版文档


org.jboss.ejb.plugins.jaws.metadata
Class ValueObjectHelper

java.lang.Object
  extended byorg.jboss.ejb.plugins.jaws.metadata.ValueObjectHelper

public class ValueObjectHelper
extends Object

Provide static method to obtain a private attribute of a value object using its get method, and to set the value of a private attribute using its set method.

WARNING : These methods use Reflection so OK to run them at deployment time but at run time, we should better catch the Method get/set at CMPFieldMetaData level. So that the only invoke() method will be called at run time. This still needs to be done.

Version:
$Revision: 1.3 $
Author:
Vincent Harcq

Constructor Summary
ValueObjectHelper()
           
 
Method Summary
static Class getNestedFieldType(Class ejbClass, String name)
           
static Object getValue(Object o, String fieldName)
           
static void setValue(Object o, String fieldName, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueObjectHelper

public ValueObjectHelper()
Method Detail

getValue

public static Object getValue(Object o,
                              String fieldName)
                       throws NoSuchMethodException,
                              InvocationTargetException,
                              IllegalAccessException
Throws:
NoSuchMethodException
InvocationTargetException
IllegalAccessException

setValue

public static void setValue(Object o,
                            String fieldName,
                            Object value)
                     throws NoSuchMethodException,
                            InvocationTargetException,
                            IllegalAccessException
Throws:
NoSuchMethodException
InvocationTargetException
IllegalAccessException

getNestedFieldType

public static Class getNestedFieldType(Class ejbClass,
                                       String name)
                                throws NoSuchMethodException
Parameters:
ejbClass - the class in which the first occurance of name will be found
name - must be in the form address.line1
Throws:
NoSuchMethodException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.