Google

JBoss API: Class ValueObjectHelper

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

java.lang.Object
  |
  +--org.jboss.ejb.plugins.jaws.metadata.ValueObjectHelper

public class ValueObjectHelper
extends java.lang.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.1 $
Author:
Vincent Harcq

Constructor Summary
ValueObjectHelper()
           
 
Method Summary
static java.lang.Class getNestedFieldType(java.lang.Class ejbClass, java.lang.String name)
           
static java.lang.Object getValue(java.lang.Object o, java.lang.String fieldName)
           
static void setValue(java.lang.Object o, java.lang.String fieldName, java.lang.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 java.lang.Object getValue(java.lang.Object o,
                                        java.lang.String fieldName)
                                 throws java.lang.NoSuchMethodException,
                                        java.lang.reflect.InvocationTargetException,
                                        java.lang.IllegalAccessException

setValue

public static void setValue(java.lang.Object o,
                            java.lang.String fieldName,
                            java.lang.Object value)
                     throws java.lang.NoSuchMethodException,
                            java.lang.reflect.InvocationTargetException,
                            java.lang.IllegalAccessException

getNestedFieldType

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


Copyright © 2000 The JBoss Organization. All Rights Reserved.